-
Notifications
You must be signed in to change notification settings - Fork 78
Extracts
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.
- https://www.mediawiki.org/wiki/Extension:TextExtracts
- https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Lead_section
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
}