Documentation menu
On-demand API
Our On-demand REST API returns the current version of any article from all supported Wikimedia projects. Query by article name across all projects or use fields and filtering to restrict which projects or languages to query, and to define which fields should be returned. On-demand endpoints return JSON by default. Include Accept: application/x-ndjson in the request header to receive a response in NDJSON format.
At a glance
- Base URL:
https://api.enterprise.wikimedia.com - Auth: JWT Bearer access token (Authentication)
- Formats: JSON (default); NDJSON if the
Accept: application/x-ndjsonheader is present - Response models: article, structured_content (beta), wikidata_article (beta)
- Access: free account: 50,000 lookups per month
- Status: Article Lookup endpoint is fully released, Structured Contents and Wikidata endpoints are in beta
When to use
Use On-demand when you need the current version of specific articles you have the exact name of. On-demand endpoints aren't search endpoints, they only return payloads for exact name matches. If you want every article in a project, download it once from the Snapshot API instead. And if you want changes pushed to you as they happen, connect to the Realtime API.
Endpoints
/v2/articles/{name}Download the current revision of one articleGETPOST/v2/structured-contents/{name}Download the current revision of one pre-parsed articleBetaGETPOST/v2/wikidata/items/{identifier}Download one Wikidata item by QIDBetaGETPOST/v2/wikidata/properties/{identifier}Download one Wikidata property by PIDBetaGETPOST/v2/wikidata/labels/{identifier}List every language label for a QID or PIDBetaGETPOST
Article Lookup is the production endpoint: GET by article name, or POST with filters, fields, and limit to narrow the response. Structured Contents return pre-parsed Structured Contents JSON, and the Wikidata endpoints look up an item, a property, or a set of labels by Wikidata identifier.
Worked examples
Article lookup
Look up the current version of Squirrel on English Wikipedia. It uses filters to only return matches in English Wikipedia, enwiki. The fields parameter narrows the response to just nine specific fields. The result comes back as an array of exact matches against this query. Since there is only one article for 'Squirrel' in English Wikipedia, the request returns one matching article.
Article names are case sensitive, and spaces in names are passed as underscores, e.g. Josephine_Baker, or percent-encoded, e.g. Josephine%20Baker.
curl -X POST 'https://api.enterprise.wikimedia.com/v2/articles/Squirrel' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "filters": [ { "field": "is_part_of.identifier", "value": "enwiki" } ], "fields": [ "name", "identifier", "abstract", "url", "date_modified", "version.identifier", "version.editor.name", "event.type", "event.date_created" ] }'[ { "abstract": "Squirrels are members of the family Sciuridae, a family that includes small or medium-sized rodents. ...", "date_modified": "2026-06-10T08:38:57Z", "event": { "date_created": "2026-06-10T08:39:03.755241Z", "type": "update" }, "identifier": 28492, "name": "Squirrel", "url": "https://en.wikipedia.org/wiki/Squirrel", "version": { "editor": { "name": "Orenburg1" }, "identifier": 1358688336 } }]Structured Contents lookup (beta)
The Structured Contents Article Lookup endpoint functions the same as the Article Lookup endpoint, but returns info from the article_body extracted into neatly parsed JSON objects. Learn more about how Structured Contents works on our Structured Contents initiative page. The following example looks up the Structured Contents article for Josephine Baker, in English Wikipedia.
curl -X POST 'https://api.enterprise.wikimedia.com/v2/structured-contents/Josephine_Baker' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "filters": [ { "field": "is_part_of.identifier", "value": "enwiki" } ] }'[ { "name": "Josephine Baker", "identifier": 255083, "abstract": "Freda Josephine Baker, also spelled Joséphine Baker, was an American-born French dancer, singer, actress, and spy for the French Resistance. ...", "description": "American-born French entertainer (1906–1975)", "url": "https://en.wikipedia.org/wiki/Josephine_Baker", "date_modified": "2026-07-08T21:32:39Z", "in_language": { "identifier": "en" }, "is_part_of": { "identifier": "enwiki" }, "image": { "content_url": "https://upload.wikimedia.org/wikipedia/commons/0/0b/Baker_Harcourt_1940_2.jpg", "width": 540, "height": 756 }, "infoboxes": [ { "name": "Infobox person", "type": "infobox", "has_parts": "... (truncated)" } ], "sections": [ { "name": "Abstract", "type": "section", "has_parts": "... (truncated)" } ], "references": "... (232 items, truncated)" }]Wikidata item lookup (beta)
Fetch a Wikidata entity by its Q-number. The entity object carries the item's labels, descriptions, aliases, sitelinks, and statements. For the whole Main Graph at once, use Wikidata snapshots.
Items whose JSON exceeds 1 MiB currently return 500 on every request. Retrying does not help; read those items from the Wikidata items snapshot.
curl -H 'Authorization: Bearer ACCESS_TOKEN' \ https://api.enterprise.wikimedia.com/v2/wikidata/items/Q42{ "name": "Q42", "identifier": 138, "date_modified": "2026-07-12T21:34:04Z", "url": "https://www.wikidata.org/wiki/Q42", "version": { "identifier": 2516783698 }, "event": { "type": "update" }, "entity": { "identifier": "Q42", "type": "item", "labels": { "ar": "دوغلاس آدمز", "bg": "Дъглас Адамс" }, "descriptions": { "en": "British science fiction writer and humorist (1952–2001)" }, "sitelinks": { "enwiki": { "badges": [ "Q17437798" ], "title": "Douglas Adams", "url": "" } }, "statements": "... (truncated)" }}Requesting exactly what you need
The On-demand API only returns exact matches for an article name across all supported projects. An unfiltered lookup returns the latest article revision from every project that has an article by that name. Use the is_part_of.identifier response field to filter down to specific projects. Use the in_language.identifier field to filter down to specific project languages. The fields, filters, and limit request parameters work identically on all Enterprise API endpoints: see Fields, Filters, and Limit for the full syntax guide. Include the Accept: application/x-ndjson header in your request to return NDJSON instead of the default JSON.
Response model
Article lookups return the article model (25 properties), which is also the line format of Snapshot NDJSON files, so one parser covers both. Structured Contents lookups return the structured_content model: it adds description, infoboxes, sections, references, and tables, but does not carry article_body, categories, templates, redirects, protection, visibility, watchers_count, event, or previous_version. Wikidata lookups return the wikidata_article model.
See also
- Fields, Filters, and Limit - narrow any lookup to just the fields you need.
- Identifiers - information about article names, how to find identifiers to use in
fieldsandfilters, and where to find Wikidata Q-numbers. - Structured Contents Initiative - how Structured Contents works and how you can best leverage it.
- Credibility Signals - deciding what content to trust.