Search Wikidata Entities
wikidata_search_entitiesSearch Wikidata for items or properties by text query. Returns QIDs or PIDs with labels, descriptions, and match metadata indicating whether the hit was on a label or alias. Use type="item" for real-world concepts (people, places, works) and type="property" to find predicate P-IDs. The API returns no total count — pagination is offset-based with no result ceiling indicator.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Entity type to search. Use "item" for Q-IDs (people, places, concepts) or "property" for P-IDs (predicates). | item |
| limit | No | Maximum number of results to return. Range: 1–50. | |
| query | Yes | Search terms to match against entity labels, aliases, and descriptions. | |
| offset | No | Pagination offset. Start at 0; increment by limit to page through results. | |
| language | No | BCP 47 language code for returned labels and descriptions (e.g., "en", "de", "zh"). | en |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cap | No | The limit parameter in effect. | |
| error | No | Present when the call failed. Absent on success. | |
| shown | No | Number of results returned on this page. | |
| notice | No | Recovery hint when results are empty — echoes filters and suggests how to broaden. Absent when results are present. | |
| results | No | Ranked list of matching entities. Empty when no results found. | |
| language | No | The language used for label and description display. | |
| truncated | No | True when results were capped at the limit. The Wikidata search API returns no total count — use offset pagination to retrieve more. | |
| searchType | No | The entity type that was searched ("item" or "property"). | |
| effectiveQuery | No | The search query that was executed. |