> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/wikipedia/wikidata-search>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/wikipedia/wikidata-search.mdx>

---

# Wikidata Search API

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

`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.

## Request

- **Endpoint:** `GET /v1/wikipedia/wikidata/search`
- **Credits:** 1 credit
Failed requests are free
- **Input:** by query
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/wikipedia/wikidata/search/get)
- **Platform page:** [/platforms/wikipedia](https://www.socialfetch.dev/platforms/wikipedia)

## 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.
