Wikipedia API

The summary, the facts behind it, and how many people read it

The Wikipedia API returns encyclopedia data as clean JSON.

no credit card1,000 free credits · instant API key · live in 10 seconds
Missing a Wikipedia endpoint, or need a source we don't have yet?Contact us real people · same-day reply.
W
/wikipedia/v1

16 active endpoints, on 0, 1 and 2 credit tiers.

  • POST/wikipedia/v1/summary
  • POST/wikipedia/v1/page
  • POST/wikipedia/v1/search
  • POST/wikipedia/v1/entity_facts
  • POST/wikipedia/v1/pageviews
  • POST/wikipedia/v1/related
  • POST/wikipedia/v1/autocomplete
  • +9 more

What Wikipedia endpoints does ReefAPI ship?

16 live read endpoints. Read-only data API: no writes, no account actions, no dashboard access on the target site.

16 endpoints

summary

1 cr

page summary.

required
title
optional
lang

page

1 cr

full article.

required
title
optional
lang, content, links_limit, images_limit

search

1 cr

full-text search → ranked pages (snippet/pageid/wordcount) + totalhits.

required
query
optional
lang, limit, offset, enrich

entity_facts

2 cr

Wikidata facts for a QID or title.

required
optional
id, qid, title, query, lang, value_cap

pageviews

1 cr

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

required
title
optional
lang, start, end, days, granularity, access, agent

related

1 cr

pages related to a title.

required
title
optional
lang, limit, enrich

autocomplete

0 cr

typeahead title suggestions.

required
q
optional
lang, limit

geosearch

1 cr

Wikipedia pages near a coordinate or around a title.

required
optional
lat, lon, coord, title, radius, limit, lang

on_this_day

1 cr

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

required
optional
month, day, date, kind, limit, lang

top_articles

1 cr

most-viewed articles for a given date (trending).

required
optional
date, limit, access, include_special, lang

category_members

1 cr

list the pages, sub-categories or files that belong to a Wikipedia category (cmtype=page|subc…

required
category
optional
lang, limit, cmtype, cmcontinue

langlinks

1 cr

full cross-language map for a title.

required
title
optional
lang, limit

random

1 cr

one or more random articles.

required
optional
lang, limit, enrich

revisions

1 cr

edit history of an article.

required
title
optional
lang, limit, from, to

html

2 cr

rendered article HTML (REST Parsoid).

required
title
optional
lang, format

featured

1 cr

Wikimedia featured-content feed for a date.

required
optional
date, lang

Every parameter, every allowed value →

Wikipedia API

3 of 16 endpoints, ready to run

View docs ↗

The lead extract with a short description, the thumbnail and full image, coordinates where the subject has a place, and the page's last-edit timestamp.

1 credit1 required · 1 optional
POST/wikipedia/v1/summary
ok241 ms · 1 records · sample
{
  "ok": true,
  "meta": {
    "api": "wikipedia",
    "endpoint": "summary",
    "mode": "live",
    "latency_ms": 240.8,
    "record_count": 1,
    "cache_hit": false,
    "completeness_pct": 100
  },
  "data": {
    "summary": {
      "title": "Istanbul",
      "displaytitle": "Istanbul",
      "description": "Largest city in Turkey",
      "extract": "Istanbul is the largest city in Turkey, a megacity, constituting the country's economic, cultural, and historical center. With a population of over 15 million, it is home to 18% of the population of Turkey. Istanbul is among the largest cities in Europe and in the world by population. It is a city on two continents; about two-thirds of its population live in Europe and the rest in Asia. Istanbul straddles the Bosphorus – one of the world's busiest waterways – in northwestern Turkey, between the Sea of Marmara and the Black Sea. Its area of 5,461 square kilometers (2,109 mi2) is coterminous with Istanbul Province.",
      "extract_html": "<p><b>Istanbul</b> is the largest city in Turkey, a megacity, constituting the country's economic, cultural, and historical center. With a population of over 15 million, it is home to 18% of the population of Turkey. Istanbul is among the largest cities in Europe and in the world by population. It is a city on two continents; about two-thirds of its population live in Europe and the rest in Asia. Istanbul straddles the Bosphorus – one of the world's busiest waterways – in northwestern Turkey, between the Sea of Marmara and the Black Sea. Its area of 5,461 square kilometers (2,109 mi<sup>2</sup>) is coterminous with Istanbul Province.</p>",
      "pageid": 3391396,
      "lang": "en",
      "dir": "ltr",
      "wikibase_item": "Q406",
      "thumbnail": {
        "source": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Historical_peninsula_and_modern_skyline_of_Istanbul.jpg/330px-Historical_peninsula_and_modern_skyline_of_Istanbul.jpg?utm_source=en.wikipedia.org&utm_campaign=api&utm_content=thumbnail",
        "width": 330,
        "height": 159
      },
      "originalimage": {
        "source": "https://upload.wikimedia.org/wikipedia/commons/c/cb/Historical_peninsula_and_modern_skyline_of_Istanbul.jpg?utm_source=en.wikipedia.org&utm_campaign=api&utm_content=thumbnail_unscaled",
        "width": 3301,
        "height": 1595
      },
      "coordinates": {
        "lat": 41.01361111,
        "lon": 28.955
      },
      "type": "standard",
      "timestamp": "2026-08-23T13:59:26Z",
      "url": "https://en.wikipedia.org/wiki/Istanbul",
      "mobile_url": "https://en.wikipedia.org/wiki/Istanbul"
    },
    "attribution": {
      "source": "Wikipedia",
      "license": "CC-BY-SA 4.0",
      "note": "Text from Wikipedia, the free encyclopedia (wikipedia.org)"
    }
  }
}
Real response, fetched from the live endpoint with the parameters on the left — trimmed to the first few rows, with seller names left out. Press Try it for the untrimmed response.

How the Wikipedia API works

Wikipedia is a normal ReefAPI surface — the same four rules that hold for every other engine on the key.

01
Authenticate
x-api-key header

No OAuth app, no request signing, no per-site account. One key covers all 184 engines.

02
Call
POST /wikipedia/v1/…

Every route is a POST with a JSON body. Parameters are validated against the published schema before anything is charged.

03
Pay
0 or 1 or 2 credits per call

Credits, not seats. Failed and blocked calls are never charged, and cache hits cost nothing.

04
Read
{ ok, data, meta, error }

One envelope everywhere. meta carries latency_ms, record_count and the endpoint that answered.

Turning a name into an entity with identifiers

The hard part of entity resolution is not finding a description. It is getting an identifier you can join against other databases, and a set of aliases so the next mention matches too.

01summary
POST/wikipedia/v1/summary
{"title": "Istanbul"}

The human-readable half — a short description, the lead paragraph, an image and coordinates.

02entity_facts
POST/wikipedia/v1/entity_facts
{"title": "Istanbul"}

The machine half: the entity id, what it is an instance of, its aliases, its key facts and its identifiers in other databases.

The identifiers block is the payoff — it maps one entity onto every other database that has an entry for it, which is what makes enrichment possible rather than fuzzy.

request
curl -X POST https://api.reefapi.com/wikipedia/v1/summary \
  -H "x-api-key: $REEF_KEY" \
  -H "content-type: application/json" \
  -d '{"title":"Albert Einstein"}'
response envelope
{
  "ok": true,
  "data": { … },
  "meta": {
    "api": "wikipedia",
    "endpoint": "summary",
    "mode": "live",
    "latency_ms": …,
    "record_count": …
  },
  "error": null
}

Three ways to name the same subject, and only one of them travels

A Wikipedia record carries several identifiers and they are not interchangeable. Picking the wrong one is why a stored reference breaks after an article is renamed, or points at something unrelated the moment you switch languages. Values measured on the Ada Lovelace article.

IdentifierMeasured valueWhat it survives
title"Ada Lovelace"nothing — it changes when editors rename the article, and it is different in every language
pageid974renames, but NOT languages. Page 974 on en.wikipedia is an entirely unrelated article on de.wikipedia.
wikibase_item / qidQ7259both. The Wikidata QID is the same subject in all 360+ language editions — this is the one to store.
url / mobile_urlhttps://en.wikipedia.org/wiki/Ada_Lovelacenothing — it is built from the current title, underscores and all
thumbnail330 × 427a pre-scaled image for lists
originalimage957 × 1239the full-resolution file — do not load it into a grid

Two different licences ship in the same API and both arrive in an attribution object on the response. Article text and geosearch are Wikipedia content under CC-BY-SA 4.0, which obliges you to attribute and to share alike. Pageview traffic comes from the Wikimedia Analytics API under CC0 1.0, with no obligation at all. Keep the attribution object with the data; it is the record of which rule applies to which field.

What is prose, what is structured, and who is credited

Measured on major articles and their entities.

Prose and structured facts are different endpoints for a reason

The summary is written for humans and reads well; the entity facts are typed values written for machines. Parsing facts out of the prose is how entity extraction goes wrong, and it is unnecessary when the same subject has a structured record.

Entities carry identifiers in other databases

An entity returns its ids elsewhere, which is what turns a name into a join key. Alongside them come the aliases, which is what makes the next mention of the same thing matchable.

Pageviews are a genuine attention signal

Article readership over time, daily or monthly, by access method. It is one of the few large public time series of what people are actually curious about, and it moves ahead of most other trend indicators.

Attribution comes with the data

Every response carries the source and the licence. This content is free to reuse under conditions, and the conditions include crediting it — having that in the payload is what makes complying easy rather than something to remember.

Language editions are different encyclopedias

The same article in another language is not a translation; it is a separate article with different length, different facts and sometimes a different emphasis. The language parameter selects which encyclopedia you are reading, not which translation.

What people build with Wikipedia

The jobs this data is most often used for.

16

endpoints

0/1/2

credits per call

01

RAG pipelines call summary to ground an AI assistant in encyclopedic facts.

02

Knowledge apps use entity_facts and related to build topic pages.

03

Research tools use pageviews to measure public attention on a subject.

What Wikipedia data costs

The cheapest call here is 0 credits, so $15/mo (Pro) buys 10,000 of them — $1.50 per 1,000 credits. Credits roll over and never expire, and failed or blocked calls are not charged.

Full pricing →
$0.67–$1.50 / 1,000 credits
  • 1,000 free credits on signup, no card
  • One key, all 184 APIs, one credit pool
  • Failed and blocked calls are never charged
  • Credits roll over and never expire

Call it in two lines

Sign up, get 1,000 credits and one key that works on every engine. Then this is the whole protocol.

curl
curl -X POST https://api.reefapi.com/wikipedia/v1/summary \
  -H "x-api-key: $REEF_KEY" \
  -H "content-type: application/json" \
  -d '{"title":"Albert Einstein"}'
python
import requests

r = requests.post(
    "https://api.reefapi.com/wikipedia/v1/summary",
    headers={"x-api-key": REEF_KEY},
    json={
  "title": "Albert Einstein"
},
)
print(r.json()["data"])
FAQ

Have a question? We got answers.

The questions people actually ask before wiring up Wikipedia.

Get a free key →
Which identifier should I store in my database?

The QID. A measured summary of Ada Lovelace returned title "Ada Lovelace", pageid 974 and wikibase_item "Q7259" side by side. Titles get renamed by editors and differ per language. pageids survive renames but are scoped to one language edition, so 974 means something completely different on the German wiki. Q7259 is the same human on every one of the 360+ editions, which is what makes it the only safe join key — and langlinks turns it back into whatever title you need.

Why does entity_facts return the same information twice?

Because the two shapes serve different code. key_facts is a normalized set with predictable snake_case keys — instance_of, born, died, birthplace, deathplace, citizenship, occupation, spouse, father, mother, children — which is what you bind to a UI. facts is the raw Wikidata property set with human labels and spaces in the keys: "birth name", "place of birth", "field of work", "Commons category". Measured, both were present in one response. Use key_facts unless you need a property the normalized set does not cover, then fall back to facts.

Are the values in key_facts strings?

Sometimes. In a single measured response, sex_or_gender was the string "female" while occupation was an array of eight entries and children was an array of three. The type follows the underlying Wikidata property's cardinality, so a person with one occupation and a person with eight do not return the same shape. Normalize every value to an array on the way in, or your renderer will print a string character by character the first time it meets a single-valued field. value_cap limits how many entries a multi-valued property returns.

How accurate are the entity facts?

They are Wikidata statements passed through unchanged, which means they are as good as Wikidata is — and Wikidata contains contested, outdated and occasionally plainly wrong claims, especially for historical figures where statements get attached loosely. We do not correct or filter them, because a silent correction would leave you unable to tell our guess from the source. If a fact matters, the QID gives you the Wikidata item to check the statement's own references.

What date format does pageviews use?

Two, in the same response, so read carefully. A measured 7-day pull returned start "20260819" and end "20260826" — compact YYYYMMDD with no separators — while every entry inside daily[] used ISO "2026-08-19". Alongside the series you get total 26637 and average 3805.3 precomputed. The response also echoes project, granularity, access and agent, which matters because the default agent is all-agents: that figure includes bot traffic, and filtering to human users gives a materially lower and usually more honest number.

What does country "XX" mean in geosearch results?

It is a placeholder for a location Wikipedia could not attribute to a country, not a real ISO code. A measured search around Istanbul returned three results within 41 metres: a landmark with country "TR", an event page with country "XX", and a third with country null. Filter on it and you will silently drop historical events, undersea features and disputed places. dist_m is a float in metres and is reliable — a result at dist_m 0 sits exactly on the coordinate you passed.

Why is coordinates null on an article?

Because the subject is not a place. Measured, the summary and the entity record for a person both returned coordinates null, while geosearch results carry lat and lon directly. Only articles about a physical location have coordinates, so treat null as the normal case and use type to tell what kind of article you are looking at — the measured summary reported type "standard", and disambiguation pages and redirects report their own values.

How do I read the same article in another language?

Pass lang on any action for a direct read, and use langlinks when you want to know which editions exist for a subject before you ask. The QID from a summary is the reliable bridge: get Q7259 once, then resolve it wherever you need it rather than translating the title yourself. Coverage depth varies enormously between editions — an article that is comprehensive in English can be two sentences elsewhere — so check the extract length before you treat a translation as equivalent content.

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.

25 Media, Film & Knowledge APIs on the same key

One key, one credit pool, one response envelope. If you are pulling Wikipedia, you are one call away from the rest of the category — no second contract, no second integration.

Need something this API does not do?

Name the endpoint, the field, or a source we do not carry yet. We ship new APIs every week and you would be first to get the key. Real people read every message and reply the same day.

0/4000

No account needed · we reply from [email protected]

Try it on your own data before you pay anything

The call above is the real endpoint, not a recording. A free key gives you 1,000 credits, the other 183 APIs, and the same envelope everywhere.

Endpoints, parameters and credit costs on this page are read from the live catalog and cannot drift from what the API accepts. Field notes were captured on 2026-08-30.