Skip to content
Steve edited this page Apr 16, 2017 · 14 revisions

We get an extract of only the "lead section" (content before the first heading) using action=query with &prop=extracts and &exintro. We consider this lead section to be essentially a summary of the article.

Example

https://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=Abraham_Lincoln

We get the extract in HTML and put it in the attribute extract, which we convert to Markdown text and put that into extext.

{
  exhtml: extract as HTML
  extext: extract as Markdown text
  extract: plain text extract
}
Clone this wiki locally