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

We get an extract of the "lead section" (content before the first heading) via the Mediawiki API and RESTBase. We consider this lead section to be essentially a summary of the article.

We get a full extract in limited HTML from Mediawiki, and truncated extracts, or summaries, from RESTBase. We convert the Mediawiki extract to Markdown text. Seee Attributes for descriptions of "ex" prefix attributes (extracts).

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

Examples:

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

https://en.wikipedia.org/api/rest_v1/page/summary/Abraham_Lincoln

Clone this wiki locally