Wikipedia hub

Wikidata Search API

Find entities by label, alias or description, with what matched.

GET /v1/wikipedia/wikidata/search

1 credit Failed requests are free

About this endpoint

GET /v1/wikipedia/wikidata/search?query=einstein&lang=en returns data.results, one row per entity. Each row has id, title, pageId, conceptUri, repository, url, display, label, description, match and aliases. match reports what matched, with its type, language and text.

lang is the edition code for labels, aliases and descriptions and defaults to en. type chooses the entity kind: item (the default), property, lexeme, form or sense. limit is 1 to 50 and defaults to 50. cursor continues with data.page.nextCursor. The response echoes query, lang and type. The walk stops at 100 results in total.

No match is found with empty: true. Use the entity route to fetch the full record for an id from the results.

Wikidata Search API FAQ

What is the difference between label and match?

label is the entity's label as displayed. match is the part of the label, alias or description that the query matched, with its type and language. Both can be present.

Can I search properties or lexemes?

Yes. Set type=property, lexeme, form or sense. The default is item. A type outside those values is a 400.

How many results can one page hold?

From 1 to 50, with 50 as the default. Follow data.page.nextCursor while data.page.hasMore is true to continue. The walk stops at 100 results in total. No match is found with empty set to true.

How is Wikidata search paging billed?

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. Each paginated page is a separate billed request.