Wikipedia APIunofficial
English Wikipedia: search, article text, links, sections, categories, summaries, languages, Main Page highlights and public revision history. Public, logged out.
- wikipedia.org
all live 10 operations, checked by the installs that call them.
Seeded by the maintainers.
Try it
Set up API Anything for your agents:
npx -y api-anything setupThen ask your agent, which finds this site by itself, or call it from a shell:
api-anything pull wikipedia
api-anything call wikipedia getArticleText title=Ada_LovelaceRun it here, no install
Run one of these from the catalog's server, with no install: one live read, sent once without cookies, limited per network and cached for 10 minutes. Your agent calls the site from your own machine instead.
searchArticles Article titles matching what is typed into the search box (prefix match, top 10): id (page id), key (the title as it appears in the URL), title and description…
curl -s 'https://api-anything-registry.forth-site.workers.dev/v1/try/wikipedia/searchArticles?q=octopus'getSummary One article's summary: title, description (short description), extract (the plain-text lead, usually its first paragraph), pageid, url, lastModified and type (…
curl -s 'https://api-anything-registry.forth-site.workers.dev/v1/try/wikipedia/getSummary?title=Octopus'Operations
| Operation | Method | Login | Writes | Status |
|---|---|---|---|---|
getArticleText(title) -> textArticle paragraphs in page order as plain text, including citation markers. |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
getCategories(title) -> category, urlVisible article categories and their links, excluding hidden maintenance categories. |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
getLanguages(title) -> code, language, title, urlOther-language versions linked from an article, with language code, local language name, article title and URL. |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
getLinks(title) -> title, urlTitled links in article paragraphs, in page order, including repeats and links to other Wikimedia sites. |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
getMainPage() -> section, summary, title, url, itemsCurrent Main Page featured article and daily news, anniversaries and facts, grouped by section. |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
getRevisions(title) -> timestamp, user, comment, sizeChangeRecent public page history, newest first: displayed timestamp, editor, edit summary and signed byte change. |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
getSections(title) -> heading, number, anchorArticle table of contents in page order: displayed heading and hierarchical number, and an anchor URL. |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
getSummary(title) -> title, description, extract, pageid, url, lastModified, typeOne article's summary: title, description (short description), extract (the plain-text lead, usually its first paragraph), pageid, url, lastModified and type ("standard", or "disambiguation" for a page listing meanings). |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
searchArticles(q) -> id, key, title, descriptionArticle titles matching what is typed into the search box (prefix match, top 10): id (page id), key (the title as it appears in the URL), title and description (the article's short description, when it has one). |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
searchText(q) -> title, url, snippet, sizeFull-text search of articles (main namespace), the site's Special:Search results page: up to 20 hits with title, url, snippet (text around the match) and size ("43 KB (4,432 words) – <time of last edit>"). |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
Notes
No account is needed. English Wikipedia only. Text is CC BY-SA: attribute on reuse. Long results (text, links, languages) can be truncated: check truncated and use more.
searchArticlesmatches titles by prefix, giving an articlekey(Ada_Lovelace) for the other ops; for a topic, usesearchText(page 1, 20 hits; thekeyends itsurl).getSummaryfollows redirects (USA->United States); a missing title answersinput.type: "disambiguation"means a page of meanings: search with a more specific title.getSections: the displayed table of contents; the first entry is the unnumbered top, and numbers like3.2are display numbers, not API section indexes.getCategories: visible categories only.getArticleText: paragraphs in order, no headings, tables or lists; may include empty paragraphs and citation markers.getLinks: titled links in paragraphs (not navboxes); may repeat or leave the article namespace.getRevisions: the first history page (about 50); dates and byte changes are display strings; anonymous editors appear as IPs.getMainPage: today's Main Page by section (mp-tfafeatured article,mp-itnnews,mp-otdanniversaries,mp-dykfacts); items are plain text.getLanguages: language names in their own language; codes need not match subdomains. A page with no language links may answer drift instead of an empty list.
About these operations
Each operation is a request learned from Wikipedia's own web pages: API Anything replays it over plain HTTP and falls back to a browser when it must. Read them as JSON.