Wikidata API
A dataset is only joinable when the same thing has the same name everywhere, and free text never does — "OpenAI", "OpenAI Inc" and "openai" are three strings for one entity. Wikidata fixes this by giving every concept a stable Q-id, and this endpoint runs its entity search to turn a name into those ids: each candidate comes back with its Q-id, label, description, the canonical concept URI and the page URL.
$0.0003 per delivered entity · $2 free every month · Failed runs never billed
$ curl $QD/wikidata/run \
-H "Authorization: Bearer $QD_API_KEY" \
-d '{"query": "OpenAI", "max_results": 10}'
{ "status": "done", "count": 10,
"results": [
{
"id": "…",
"label": "…",
"description": "…",
"concept_uri": "…" } ],
"cost": 0.003 }
# 10 entitys × $0.0003 · nothing delivered, nothing charged
What a Wikidata API does
Send a string and Wikidata's search returns the entities it might mean, ranked, each with a short description that disambiguates them — the "Q21708200, the AI company" from an identically-named band. The concept_uri on every row is the canonical identifier you store as a foreign key, so the next time that entity appears under a different spelling you resolve it to the same id instead of minting a new string.
This is the entity-linking step that makes the rest of a pipeline work. Resolve company names, people, places or products to Q-ids once and disparate datasets — your records, a scraped table, an LLM's extraction — all point at the same node. It works in any language, so "Leonardo da Vinci" in English and the same person queried in Italian collapse to one id.
What one entity looks like
Every delivered entity carries these fields. Nullable means the source did not publish it — the field stays empty instead of being guessed.
| Field | Type | What it holds |
|---|---|---|
rank | integer | 1-based relevance rank. |
id | string | Wikidata entity id (Q…). |
label | string · nullable | Entity label. |
description | string · nullable | Short description. |
concept_uri | string · nullable | Canonical entity URI (join key). |
url | string | Wikidata page URL. |
matched | string · nullable | The text that matched the query. |
match_type | string · nullable | How it matched (label, alias…). |
Inputs
The whole request. Anything you leave out falls back to the default shown in the catalog.
| Input | Type | Required | What it does |
|---|---|---|---|
query | string | yes | Name or term to resolve to entities. |
lang | string | no | Language for labels/descriptions (default en). |
max_results | integer | no | How many entities to deliver at most (1–50). You pay only for delivered entities. |
Pricing
Wikidata API pricing
$0.0003 per delivered entity. A run that delivers nothing costs nothing: blocked pages, challenges and retries are on us, and the $2 monthly allowance covers about 6,666 entitys before you spend anything.
Pay as you go
- $2 free credit / month
- 60 requests / min
- List unit prices
Starter
- $15 free credit / month
- 300 requests / min
- 10% off unit prices
Growth
- $50 free credit / month
- 600 requests / min
- 20% off unit prices
Scale
- $250 free credit / month
- 1,200 requests / min
- 30% off unit prices
Same wallet, same key and same $2 monthly allowance as every other Data API. Prices are launch pricing read live from the billing config — GET /v1/scraper/collectors returns the price your key actually pays.
Integration
One POST, typed rows
Base URL https://api.quanticdata.io/v1, Bearer auth, the same key as every other Data API. Endpoint: POST /v1/.
curl -X POST https://api.quanticdata.io/v1/scraper/collectors/wikidata/run \
-H "Authorization: Bearer $QD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"OpenAI","max_results":10}'
What people build with the Wikidata API
Three shapes of work this endpoint was designed around.
Entity resolution
Map a column of messy names to stable Q-ids so records that spell an entity differently still join to one row.
Knowledge-graph seeding
Take the Q-id and concept URI as the anchor nodes of your own graph, then attach attributes and relationships around them.
LLM output grounding
Resolve the names a model extracts to Wikidata ids, turning free-text mentions into linked entities you can verify and deduplicate.
Wikidata API versus rolling your own
The differences that actually cost time when you build this in-house.
| DIY scraper | This collector | |
|---|---|---|
| Match key | Fuzzy string comparison | A stable Q-id per entity |
| Disambiguation | Hope the top hit is right | Ranked candidates with descriptions |
| Cross-language | A different string per language | One id for every language |
What exactly do I get back — the full entity or just an id?
The identifiers and the labels to choose among candidates: the Q-id, the entity's label and description, the canonical concept URI and the page URL, plus what text matched and how. It resolves a name to the right entity; you then use the Q-id to pull whatever attributes you need.
Is this the SPARQL endpoint?
No. This is entity search — a string in, ranked candidate entities out — which is the resolution step. It is not the SPARQL query service for traversing relationships; use the Q-id it returns as the entry point for that if you need it.
Do I need an API key, and does it work in other languages?
No key, and yes — pass lang and labels and descriptions come back in that language. The Q-id is the same regardless of query language, which is what lets multilingual records reconcile to one entity.
How do I pick the right entity when several come back?
Each candidate carries a short description and a relevance rank, so "OpenAI the company" is distinguishable from a same-named entity at a glance. Store the concept_uri of the one you pick as the join key.
Is there a free Wikidata API?
Every account gets $2 of credit every month with no card, which is about 6,666 delivered entitys on this endpoint at $0.0003 each. It renews monthly, and a run that delivers nothing is never billed — so a failed or blocked attempt does not eat the allowance.
How much does one run cost?
Multiply the rows you actually receive by $0.0003. A run capped at 50 entitys — the maximum for this collector — costs $0.015 if every row comes back, and less when the source has fewer. Volume tiers take up to 30% off, and GET /v1/scraper/collectors returns the price your key actually pays.
Run the Wikidata API now
$2 of free credit every month, no card. Your key returns its own prices from GET /v1/scraper/collectors.