Media, Film & Knowledge

Wikipedia API

The Wikipedia API returns encyclopedia data as clean JSON.

16 actionsLive JSON1,000 free creditsMCP-ready
Get a free keyOpen in playground

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

Live example

Real request and response JSON

Captured from the indexed primary action, search, on .

Captured request
{
  "method": "POST",
  "url": "https://api.reefapi.com/wikipedia/v1/search",
  "headers": {
    "x-api-key": "$REEF_KEY",
    "content-type": "application/json"
  },
  "body": {
    "query": "quantum computing"
  }
}
Captured response
{
  "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 &#039;n.<span class=\"searchmatch\">quantum</span> <span class=\"searchmatch\">computing</span>&#039;) 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)"
    }
  }
}
Actions

What the Wikipedia API does

ActionDescriptionConcrete use caseKey params
summarypage summary: extract, description, thumbnail, coordinates, wikibase QID, urls (lang= any of 360+ editions)Content platforms call summary to get page summary.title, lang
pagefull 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
searchfull-text search → ranked pages (snippet/pageid/wordcount) + totalhits; enrich= adds extract/thumbnail/QIDCommunity analysts call search to get full-text search → ranked pages (snippet/pageid/wordcount) + totalhits; enrich= adds extract/….query, lang, limit, offset, enrich
entity_factsWikidata facts for a QID or title: label/description/aliases + resolved human-readable facts{prop:value} + key_facts + identifiers + image/coordsMedia monitors call entity_facts to get wikidata facts for a QID or title.id, qid, title, query, lang, ...
pageviewsdaily/monthly traffic for an article over a date range → series + total + averageContent platforms call pageviews to get daily/monthly traffic for an article over a date range → series + total + average.title, lang, start, end, days, ...
relatedpages related to a title; enrich= adds extract/thumbnailResearch tools call related to get pages related to a title; enrich= adds extract/thumbnail.title, lang, limit, enrich
autocompletetypeahead title suggestionsCommunity analysts call autocomplete to get typeahead title suggestions.q, lang, limit
geosearchWikipedia pages near a coordinate or around a titleMedia monitors call geosearch to get wikipedia pages near a coordinate or around a title.lat, lon, coord, title, radius, ...
on_this_dayhistorical 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_articlesmost-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_memberslist the pages, sub-categories or files that belong to a Wikipedia category (cmtype=page|subcat|file); paginate with meta.next/cmcontinueCommunity 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
langlinksfull 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
randomone or more random articles; enrich= adds extract/thumbnail/QIDContent platforms call random to get one or more random articles; enrich= adds extract/thumbnail/QID.lang, limit, enrich
revisionsedit history of an article: revid, parentid, timestamp, user, comment, size, tags; from/to window the rangeResearch tools call revisions to get edit history of an article.title, lang, limit, from, to
htmlrendered article HTML (REST Parsoid) — or raw wiki markup with format=wikitextCommunity analysts call html to get rendered article HTML (REST Parsoid).title, lang, format
featuredWikimedia 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
Code samples

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"}'
MCP one-liner
Ask your MCP-connected assistant: call reefapi.wikipedia.search with {"query":"quantum computing"}.
Use cases

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

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.

docs / wikipedia

Wikipedia

Article summaries, search and structured facts.

base /wikipedia/v116 endpoints
post/wikipedia/v1/summary1 credit

page summary: extract, description, thumbnail, coordinates, wikibase QID, urls (lang= any of 360+ editions)

ParameterAllowed / rangeDescription
titlerequiredExact article title (case-sensitive first letter aside).
lang = enoptionalWikipedia language edition code (en, de, fr, ja, … 360+ editions). Default en.
Try in playground →
post/wikipedia/v1/page1 credit

full article: plain-text body + internal links + image list + categories + external links (content=false → structure only)

ParameterAllowed / rangeDescription
titlerequiredExact article title (case-sensitive first letter aside).
lang = enoptionalWikipedia language edition code (en, de, fr, ja, … 360+ editions). Default en.
content = trueoptionalfalse (or 0/no) → return article STRUCTURE only (links/images/categories), skip the plain-text body.
links_limit = 100optional1–500Max internal links to return (1-500); clamped.
images_limit = 50optional1–200Max images to return (1-200); clamped.
Try in playground →
post/wikipedia/v1/entity_facts2 credits

Wikidata facts for a QID or title: label/description/aliases + resolved human-readable facts{prop:value} + key_facts + identifiers + image/coords

ParameterAllowed / rangeDescription
idoptionalWikidata QID (e.g. Q937). Supply this OR `title`/`query` to resolve one.
titleoptionalArticle/entity title to resolve to a Wikidata QID. Supply this OR `id`.
lang = enoptionalWikipedia language edition code (en, de, fr, ja, … 360+ editions). Default en.
value_cap = 50optional1–200Max values kept per multi-valued Wikidata property (1-200); clamped.
Try in playground →
post/wikipedia/v1/pageviews1 credit

daily/monthly traffic for an article over a date range → series + total + average

ParameterAllowed / rangeDescription
titlerequiredArticle title to pull traffic for.
lang = enoptionalWikipedia language edition code (en, de, fr, ja, … 360+ editions). Default en.
startoptionalRange start date, YYYYMMDD or YYYY-MM-DD. Supply both start AND end, or use `days` instead.
endoptionalRange end date, YYYYMMDD or YYYY-MM-DD. Supply both start AND end, or use `days` instead.
days = 30optional1–1000Look-back window ending today, used when start/end are omitted (1-1000).
granularity = dailyoptionaldaily · monthlyBucket size. Anything not starting with 'month' is treated as daily.
access = all-accessoptionalall-access · desktop · mobile-app · mobile-webWikimedia Pageviews access channel (passed through to the REST API).
agent = all-agentsoptionalall-agents · user · spider · automatedWikimedia Pageviews agent class (passed through to the REST API).
Try in playground →
post/wikipedia/v1/autocompletefree

typeahead title suggestions

ParameterAllowed / rangeDescription
qrequiredTypeahead prefix to autocomplete.
lang = enoptionalWikipedia language edition code (en, de, fr, ja, … 360+ editions). Default en.
limit = 10optional1–50Max results (1-50, default 10); clamped.
Try in playground →
post/wikipedia/v1/geosearch1 credit

Wikipedia pages near a coordinate or around a title

ParameterAllowed / rangeDescription
latoptional-90–90Latitude. Provide lat+lon, OR `coord`, OR `title` for geosearch.
lonoptional-180–180Longitude (pairs with lat).
coordoptional'lat,lon' string — alternative to separate lat/lon params.
titleoptionalFind pages near THIS article's coordinates (alternative to lat/lon/coord).
radius = 1000optional10–10000Search radius in metres (10-10000); clamped.
limit = 10optional1–50Max results (1-50, default 10); clamped.
lang = enoptionalWikipedia language edition code (en, de, fr, ja, … 360+ editions). Default en.
Try in playground →
post/wikipedia/v1/on_this_day1 credit

historical events/births/deaths/holidays for a month-day (kind=all|selected|events|births|deaths|holidays)

ParameterAllowed / rangeDescription
monthoptional1–12Month 1-12 (pair with `day`), OR supply `date` instead. Defaults to today.
dayoptional1–31Day-of-month 1-31 (pairs with `month`).
dateoptionalDate whose month-day is used (MM-DD or YYYY-MM-DD). Alternative to month/day.
kind = alloptionalall · selected · events · births · deaths · holidaysWhich on-this-day category. An unknown value falls back to 'all'.
limit = 30optional1–100Max results (1-100, default 30); clamped.
lang = enoptionalWikipedia language edition code (en, de, fr, ja, … 360+ editions). Default en.
Try in playground →
post/wikipedia/v1/top_articles1 credit

most-viewed articles for a given date (trending)

ParameterAllowed / rangeDescription
dateoptionalDay to rank, YYYY-MM-DD or YYYYMMDD. Defaults to yesterday (today lags).
limit = 50optional1–1000Max results (1-1000, default 50); clamped.
access = all-accessoptionalall-access · desktop · mobile-app · mobile-webWikimedia Pageviews access channel (passed through to the REST API).
include_special = falseoptionalKeep special pages (Main_Page, Special:Search) in the ranking; default drops them.
lang = enoptionalWikipedia language edition code (en, de, fr, ja, … 360+ editions). Default en.
Try in playground →
post/wikipedia/v1/category_members1 credit

list the pages, sub-categories or files that belong to a Wikipedia category (cmtype=page|subcat|file); paginate with meta.next/cmcontinue

ParameterAllowed / rangeDescription
categoryrequiredCategory name, with or without the 'Category:' prefix (e.g. 'Physicists' or 'Category:1879 births').
lang = enoptionalWikipedia language edition code (en, de, fr, ja, … 360+ editions). Default en.
limit = 20optional1–500Max results (1-500, default 20); clamped.
cmtype = pageoptionalpage · subcat · fileWhich kind of category member to list. Unknown values fall back to 'page'.
cmcontinueoptionalPagination token from a previous response's meta.next — fetch the next batch.
Try in playground →
post/wikipedia/v1/random1 credit

one or more random articles; enrich= adds extract/thumbnail/QID

ParameterAllowed / rangeDescription
lang = enoptionalWikipedia language edition code (en, de, fr, ja, … 360+ editions). Default en.
limit = 1optional1–50Max results (1-50, default 1); clamped.
enrich = falseoptionalIf true, hydrate each result with extract + thumbnail + Wikidata QID (extra requests).
Try in playground →
post/wikipedia/v1/revisions1 credit

edit history of an article: revid, parentid, timestamp, user, comment, size, tags; from/to window the range

ParameterAllowed / rangeDescription
titlerequiredExact article title (case-sensitive first letter aside).
lang = enoptionalWikipedia language edition code (en, de, fr, ja, … 360+ editions). Default en.
limit = 10optional1–500Max results (1-500, default 10); clamped.
fromoptionalWindow start (ISO timestamp). Returns revisions at/after this point (newest-first). Optional.
tooptionalWindow end (ISO timestamp). Returns revisions at/before this point. Optional.
Try in playground →
post/wikipedia/v1/html2 credits

rendered article HTML (REST Parsoid) — or raw wiki markup with format=wikitext

ParameterAllowed / rangeDescription
titlerequiredExact article title (case-sensitive first letter aside).
lang = enoptionalWikipedia language edition code (en, de, fr, ja, … 360+ editions). Default en.
format = htmloptionalhtml · wikitextOutput flavour: rendered 'html' (default) or raw 'wikitext' source.
Try in playground →