API Anything

Wikipedia APIunofficial

English Wikipedia: search, article text, links, sections, categories, summaries, languages, Main Page highlights and public revision history. Public, logged out.

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 setup

Then 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_Lovelace

Run 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

OperationMethodLoginWritesStatus
getArticleText(title) -> text

Article paragraphs in page order as plain text, including citation markers.

GET no no Live0 confirmations · success unknown; last worked unknown
getCategories(title) -> category, url

Visible article categories and their links, excluding hidden maintenance categories.

GET no no Live0 confirmations · success unknown; last worked unknown
getLanguages(title) -> code, language, title, url

Other-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, url

Titled 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, items

Current 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, sizeChange

Recent 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, anchor

Article 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, type

One 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, description

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 (the article's short description, when it has one).

GET no no Live0 confirmations · success unknown; last worked unknown
searchText(q) -> title, url, snippet, size

Full-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.

  • searchArticles matches titles by prefix, giving an article key (Ada_Lovelace) for the other ops; for a topic, use searchText (page 1, 20 hits; the key ends its url).
  • getSummary follows redirects (USA -> United States); a missing title answers input. 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 like 3.2 are 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-tfa featured article, mp-itn news, mp-otd anniversaries, mp-dyk facts); 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.

← All shared sites