Wikipedia

Get Wikidata entity

Get a Wikidata item, property, lexeme or media entity, or resolve a wiki title to its entity.

GET/v1/wikipedia/wikidata/entities/{id}
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
4
idstringrequiredpath

Wikidata entity id (`Q937`, `P31`, `L1`, `M925243`), or a page title when `site` is given; `props` is then required.

min 1 chars · max 300 chars

sitestringoptionalquery

Wikimedia site id (`enwiki`, `dewiki`, `commonswiki`). When set, `id` is a page title on that site and the entity it links to is returned; `props` is required.

pattern: ^[a-z0-9-]{2,32}$

languagesarrayoptionalquery

Languages to return labels, descriptions and aliases in, comma-separated, e.g. `en,de`. Default: every language.

propsarrayoptionalquery

Entity parts to return, comma- or pipe-separated: `info`, `sitelinks`, `labels`, `descriptions`, `aliases`, `claims`. Required with `site`. Default: all six; without `site` or `languages`, the full entity.

Response fields
29

Endpoint-specific response payload.

datalookupStatus
string

Whether the entity, page or data set exists. A missing entity is `not_found`; an existing entity with no rows is `found` with `empty: true`.

one of: found, not_found

dataid
string

Entity id asked for, or the id the title resolved to.

The entity when found; otherwise null.

dataentityid
string

Entity id, e.g. `Q937`, `P31`, `L1`.

dataentitytype
stringnullable

`item`, `property`, `lexeme` or `mediainfo`.

dataentitydatatype
stringnullable

Property datatype.

dataentitypageId
integernullable

Wikidata page id.

dataentityns
integernullable

Wikidata namespace id.

dataentitylastRevisionId
integernullable

Latest revision id.

dataentitymodified
stringnullable

When it was last changed.

dataentitylabels
objectnullable

Labels in every language; null when not requested.

dataentitydescriptions
objectnullable

Descriptions in every language; null when not requested.

dataentityaliases
objectnullable

Aliases in every language; null when not requested.

dataentityclaims
objectnullable

Statements by property, with qualifiers, references and rank; null when not requested.

dataentitysitelinks
objectnullable

Sitelinks by site; null when not requested.

dataentitylemmas
objectnullable

Lexeme lemmas; null when not requested.

dataentitylexicalCategory
stringnullable

Lexeme lexical category id.

dataentitylanguage
stringnullable

Lexeme language id.

Lexeme forms; null when not requested.

dataentityforms[]
objectoptional

Lexeme senses; null when not requested.

dataentitysenses[]
objectoptional
datasite
stringnullable

Site used for a title lookup.

datatitle
stringnullable

Title used for a title lookup.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/wikipedia/wikidata/entities/Q937" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Get Wikidata entity