Get Wikipedia Article
wikipedia_get_articleFetch article content as clean plain text. Without section_index: returns the full article with == Section == markers preserved for structure — or, when the article exceeds the size budget, a compact section outline (truncated: true) that points to wikipedia_get_sections plus a section_index read instead of the full text. With section_index (from wikipedia_get_sections): returns that section and every subsection nested under it, each heading above its own body. section_index 0 is the lead section, the text above the first heading, which is the full prose wikipedia_get_summary returns only a truncated fragment of. Section-targeted reads are faster and smaller when only part of the article is needed. Both paths keep superscripts and subscripts apart from the text beside them (10²³, H₂O), render formulas as their TeX, and render code samples as fenced blocks with their indentation intact. A section read also renders data tables as pipe-delimited rows (header row first) and infoboxes as "label: value" lines; a table too large to include leaves a "[table omitted: N rows]" marker in its place. The full-article path carries no data tables or infoboxes, so read the section for those. Tables used only for layout, such as multi-column lists, keep their content as ordinary text. Page furniture is omitted as well — maintenance banners, sister-project and library-resource boxes, portal bars, and spoken-article notices — while a hatnote naming a related article is kept. Every read returns the canonical article URL and the ID of the revision it was read from, for citation; a full read also returns that revision's timestamp. Redirect pages are followed automatically, and the citation fields name the target article.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Article title (e.g. "Python (programming language)"). A trailing #fragment is accepted and ignored; the characters < > [ ] { } and | cannot appear in a Wikipedia page name. | |
| language | No | Wikipedia language edition code (default "en"). Examples: "fr", "de", "ja". | en |
| section_index | No | Section index from wikipedia_get_sections. 0 reads the lead section (Introduction) — the text above the first heading. Omit for the full article. Providing this returns the targeted section plus every subsection nested under it, as plain text. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Canonical desktop URL of the article (e.g. "https://en.wikipedia.org/wiki/Eiffel_Tower"), for citing the page rather than composing a URL from the title. | |
| error | No | Present when the call failed. Absent on success. | |
| title | No | Resolved article title. | |
| pageid | No | Wikipedia page ID. Absent on API parse responses that omit it. | |
| content | No | Plain-text article content. Both full articles and section reads carry == Section == markers above the text each one heads, code samples as ``` fenced blocks, and superscripts and subscripts as Unicode characters (10²³, H₂O), or as ^x / ^(…) and _x / _(…) where a character has none. Section reads also carry data tables as | cell | cell | rows with a | --- | row under the header. When truncated is true, this instead carries a section outline (heading names and byte sizes) plus a pointer to the targeted-read path. | |
| language | No | Language edition queried. | |
| truncated | No | True when a full-article read exceeded the size budget and content is a section outline instead of the full text. Always false for section reads and for full articles within budget. | |
| revision_id | No | ID of the revision the content was read from. "https://<edition>.wikipedia.org/w/index.php?oldid=<revision_id>" is a permanent link to exactly that version. | |
| content_type | No | Content type: "full_article" or "section". | |
| last_modified | No | ISO 8601 timestamp of that revision, for dating the content. Full-article reads only; a section read carries none. | |
| section_title | No | Section title when section_index was provided — "Introduction" for the lead, which has no heading of its own. Absent for full-article reads. | |
| original_length | No | Character length of the full article text before outlining. Present only when truncated is true. | |
| sections_suggested | No | True when content is an outline — call wikipedia_get_sections, then wikipedia_get_article with a section_index to read a specific section. Present only when truncated is true. |