Wikidata Entity API
An item, property, lexeme or media entity by id, or the entity behind a wiki title.
GET /v1/wikipedia/wikidata/entities/{id}1 credit Failed requests are free
About this endpoint
GET /v1/wikipedia/wikidata/entities/Q937 returns data.entity for an item, property, lexeme or media entity. id accepts Q items, P properties, L lexemes and M media ids. The entity has id, type, datatype, pageId, ns, lastRevisionId, modified, labels, descriptions, aliases, claims and sitelinks.
Labels, descriptions and aliases are keyed by language, and each entry has language and value. claims groups statements by property id and keeps qualifiers, references and rank. sitelinks groups links by site, with site, title, badges and url. Lexeme entities also fill lemmas, lexicalCategory, language, forms and senses.
A prop you do not request is null. An empty object or array means the entity has no entries for that part, so the two cases are never confused. The answer is capped at 4,000,000 bytes; for a very large entity, ask for only the props and languages you need.
To resolve a title instead of an id, set site=enwiki and pass the title as id, with props set. languages narrows labels, descriptions and aliases to the codes you need. A missing entity is lookupStatus: not_found with entity: null.
Wikidata Entity API FAQ
How do I resolve a Wikipedia title to its Wikidata item?
Set site to an edition such as enwiki, put the page title in id, and set props. The answer reports site, title and the resolved entity id. props is required for a title lookup.
Which props should I request?
props is comma- or pipe-separated and accepts info, sitelinks, labels, descriptions, aliases and claims. Ask for only the parts you need. A title lookup requires props.
Can I read a media entity?
Yes. M ids are media file entities, where their labels, descriptions and claims live. Item, property and lexeme ids are Wikidata entities.
How many credits does an entity cost?
Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth.
Other Wikipedia endpoints
- PageGET /v1/wikipedia/pages/{title}
- Pages by titleGET /v1/wikipedia/pages
- Page contentGET /v1/wikipedia/pages/{title}/content
- RevisionsGET /v1/wikipedia/pages/{title}/revisions
- History statsGET /v1/wikipedia/pages/{title}/history-stats
- BacklinksGET /v1/wikipedia/pages/{title}/backlinks
- LinksGET /v1/wikipedia/pages/{title}/links
- LanguagesGET /v1/wikipedia/pages/{title}/languages