Wikipedia API
The Wikipedia API returns encyclopedia data as clean JSON.
🤖 Using an AI assistant? Copy this link into ChatGPT / Claude / Cursor — it reads every endpoint and parameter instantly and tells you if this API fits your use case.
The primary summary endpoint returns a page's title, extract, description, thumbnail, coordinates, Wikidata QID and content URL, and you can pull a full page, search, entity_facts, pageviews, related pages and autocomplete. It is built for knowledge apps, RAG pipelines and research that need Wikipedia and Wikidata content without a scraper. One ReefAPI key, one shared credit pool, the standard envelope.
Real request and response JSON
Captured from the indexed primary action, search, on .
{
"method": "POST",
"url": "https://api.reefapi.com/wikipedia/v1/search",
"headers": {
"x-api-key": "$REEF_KEY",
"content-type": "application/json"
},
"body": {
"query": "quantum computing"
}
}{
"ok": true,
"meta": {
"api": "wikipedia",
"endpoint": "search",
"mode": "live",
"latency_ms": 513.2,
"record_count": 10,
"bytes": 4896,
"cache_hit": false,
"completeness_pct": 100,
"requests": 1,
"lang": "en",
"total": 5988
},
"data": {
"results": [
{
"title": "Quantum computing",
"pageid": 25220,
"snippet": "quantum computing (abbreviated 'n.quantum computing') is an unconventional process of computing that uses neuromorphic computing to perform quantum operations",
"snippet_html": "<span class=\"searchmatch\">quantum</span> <span class=\"searchmatch\">computing</span> (abbreviated 'n.<span class=\"searchmatch\">quantum</span> <span class=\"searchmatch\">computing</span>') is an unconventional process of <span class=\"searchmatch\">computing</span> that uses neuromorphic <span class=\"searchmatch\">computing</span> to perform <span class=\"searchmatch\">quantum</span> operations",
"wordcount": 14328,
"size": 133478,
"timestamp": "[redacted-phone]T23:00:54Z"
},
{
"title": "Superconducting quantum computing",
"pageid": 1730328,
"snippet": "quantum computing is a branch of quantum computing and solid-state physics that implements superconducting electronic circuits as qubits in a quantum",
"snippet_html": "<span class=\"searchmatch\">quantum</span> <span class=\"searchmatch\">computing</span> is a branch of <span class=\"searchmatch\">quantum</span> <span class=\"searchmatch\">computing</span> and solid-state physics that implements superconducting electronic circuits as qubits in a <span class=\"searchmatch\">quantum</span>",
"wordcount": 10506,
"size": 98879,
"timestamp": "[redacted-phone]T06:38:04Z"
},
{
"title": "Timeline of quantum computing and communication",
"pageid": 191911,
"snippet": "timeline of quantum computing and communication. Erwin Schrödinger publishes a theorem setting the basis for quantum steering and the limits of quantum state",
"snippet_html": "timeline of <span class=\"searchmatch\">quantum</span> <span class=\"searchmatch\">computing</span> and communication. Erwin Schrödinger publishes a theorem setting the basis for <span class=\"searchmatch\">quantum</span> steering and the limits of <span class=\"searchmatch\">quantum</span> state",
"wordcount": 23262,
"size": 245064,
"timestamp": "[redacted-phone]T16:37:54Z"
}
],
"total": 5988,
"query": "quantum computing",
"suggestion": null,
"next_offset": 10,
"attribution": {
"source": "Wikipedia",
"license": "CC-BY-SA 4.0",
"note": "Text from Wikipedia, the free encyclopedia (wikipedia.org)"
}
}
}What the Wikipedia API does
| Action | Description | Concrete use case | Key params |
|---|---|---|---|
| summary | page summary: extract, description, thumbnail, coordinates, wikibase QID, urls (lang= any of 360+ editions) | Content platforms call summary to get page summary. | title, lang |
| page | full article: plain-text body + internal links + image list + categories + external links (content=false → structure only) | Research tools call page to get full article. | title, lang, content, links_limit, images_limit |
| search | full-text search → ranked pages (snippet/pageid/wordcount) + totalhits; enrich= adds extract/thumbnail/QID | Community analysts call search to get full-text search → ranked pages (snippet/pageid/wordcount) + totalhits; enrich= adds extract/…. | query, lang, limit, offset, enrich |
| entity_facts | Wikidata facts for a QID or title: label/description/aliases + resolved human-readable facts{prop:value} + key_facts + identifiers + image/coords | Media monitors call entity_facts to get wikidata facts for a QID or title. | id, qid, title, query, lang, ... |
| pageviews | daily/monthly traffic for an article over a date range → series + total + average | Content platforms call pageviews to get daily/monthly traffic for an article over a date range → series + total + average. | title, lang, start, end, days, ... |
| related | pages related to a title; enrich= adds extract/thumbnail | Research tools call related to get pages related to a title; enrich= adds extract/thumbnail. | title, lang, limit, enrich |
| autocomplete | typeahead title suggestions | Community analysts call autocomplete to get typeahead title suggestions. | q, lang, limit |
| geosearch | Wikipedia pages near a coordinate or around a title | Media monitors call geosearch to get wikipedia pages near a coordinate or around a title. | lat, lon, coord, title, radius, ... |
| on_this_day | historical events/births/deaths/holidays for a month-day (kind=all|selected|events|births|deaths|holidays) | Content platforms call on_this_day to get historical events/births/deaths/holidays for a month-day (kind=all|selected|events|births|dea…. | month, day, date, kind, limit, ... |
| top_articles | most-viewed articles for a given date (trending) | Research tools call top_articles to get most-viewed articles for a given date (trending). | date, limit, access, include_special, lang |
| category_members | list the pages, sub-categories or files that belong to a Wikipedia category (cmtype=page|subcat|file); paginate with meta.next/cmcontinue | Community analysts call category_members to list the pages, sub-categories or files that belong to a Wikipedia category (cmtype=page|subc…. | category, lang, limit, cmtype, cmcontinue |
| langlinks | full cross-language map for a title: every edition's {lang, title, url, langname, autonym} plus a langmap{lang:title} lookup (the page action only returns the count) | Media monitors call langlinks to get full cross-language map for a title. | title, lang, limit |
| random | one or more random articles; enrich= adds extract/thumbnail/QID | Content platforms call random to get one or more random articles; enrich= adds extract/thumbnail/QID. | lang, limit, enrich |
| revisions | edit history of an article: revid, parentid, timestamp, user, comment, size, tags; from/to window the range | Research tools call revisions to get edit history of an article. | title, lang, limit, from, to |
| html | rendered article HTML (REST Parsoid) — or raw wiki markup with format=wikitext | Community analysts call html to get rendered article HTML (REST Parsoid). | title, lang, format |
| featured | Wikimedia featured-content feed for a date: tfa (today's featured article), image-of-the-day, in-the-news, most-read and on-this-day (blocks vary by language/date) | Media monitors call featured to get wikimedia featured-content feed for a date. | date, lang |
Call search from your stack
curl -X POST https://api.reefapi.com/wikipedia/v1/search \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"query":"quantum computing"}'import requests
r = requests.post(
"https://api.reefapi.com/wikipedia/v1/search",
headers={"x-api-key": REEF_KEY},
json={
"query": "quantum computing"
},
)
print(r.json()["data"])const res = await fetch("https://api.reefapi.com/wikipedia/v1/search", {
method: "POST",
headers: {
"x-api-key": process.env.REEF_KEY,
"content-type": "application/json",
},
body: JSON.stringify({
"query": "quantum computing"
}),
});
const { ok, data, meta, error } = await res.json();Ask your MCP-connected assistant: call reefapi.wikipedia.search with {"query":"quantum computing"}.Who uses this API and why
- RAG pipelines call summary to ground an AI assistant in encyclopedic facts.
- Knowledge apps use entity_facts and related to build topic pages.
- Research tools use pageviews to measure public attention on a subject.
Questions developers ask before integrating
What is the Wikipedia API?
Wikipedia API is a ReefAPI endpoint group for article summaries, search and structured facts. It returns live JSON through POST requests under /wikipedia/v1.
Is the Wikipedia API free to try?
Yes. ReefAPI starts with 1,000 free credits, no card required. Wikipedia calls use the same shared credit balance as every other ReefAPI engine.
Do I need a Wikipedia login or account?
No login to Wikipedia is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.
How fresh is the Wikipedia data?
The page example is captured from a live summary call, and production requests fetch live data through ReefAPI rather than a static sample.
How many credits does the Wikipedia API use?
Wikipedia actions currently cost 1-2 credits per successful call. Failed or blocked calls are free, and all APIs draw from one credit pool.
Can I call Wikipedia from an AI assistant or MCP client?
Yes. Connect ReefAPI once through MCP and your assistant can call wikipedia actions with the same key, credit pool and JSON envelope used by normal REST requests.
Is the Wikipedia API a Wikipedia scraper?
It is the managed alternative to a DIY Wikipedia scraper. Instead of building and maintaining your own scraper — proxies, headless browsers, captcha and constant breakage — you call one ReefAPI endpoint and get the same article summaries, search and structured facts back as clean JSON.
Why does my Wikipedia scraper keep getting blocked?
Most Wikipedia scrapers break on anti-bot defenses, rate limits and IP bans that need rotating residential proxies and browser fingerprinting to clear. ReefAPI handles all of that for you — no proxies, no captchas, no maintenance — and returns live JSON. Blocked or failed calls are free.