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

We get an extract of only the "lead section" (content before the first heading) using action=query with &prop=extracts&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&exintro&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.

page {
  exhtml: <str> RESTBase page extract in HTML
  exrest: <str> RESTBase page extract in plain text
  extext: <str> page extract in plain text
  extract: <str> page extract in limited HTML
}

The extract ("ex" prefix) attributes are described in Attributes on this wiki.

Clone this wiki locally