# Wikidata API — $0.0003 per entity

> Wikidata API: Resolve a name to a stable Wikidata entity id — the join key for entity. $0.0003 per delivered entity, nothing delivered means nothing charged.

[Home](https://quanticdata.io/)/[Collectors](https://quanticdata.io/collectors/)/*Wikidata API*

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

[Get my free API key](https://app.quanticdata.io/register) [See the request](/collectors/wikidata-api/#integration)

$0.0003 per delivered entity · $2 free every month · Failed runs never billed

POST /v1/scraper/collectors/wikidata/run

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

**$0.0003 / entity**6,666 entitys on the free $2 every month

**Semantic input**query, lang, max_results — no URL lists

**Up to 50**entitys per run, pagination handled for you

**No browser**read over HTTP/TLS — cheaper and faster than rendering

On this page: [What it is](/collectors/wikidata-api/#what) [Output fields](/collectors/wikidata-api/#output) [Inputs](/collectors/wikidata-api/#input) [Pricing](/collectors/wikidata-api/#pricing) [Integration](/collectors/wikidata-api/#integration) [Use cases](/collectors/wikidata-api/#use-cases) [Versus the alternatives](/collectors/wikidata-api/#compare) [FAQ](/collectors/wikidata-api/#faq)

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

Input is meaning, not a URL *query* *lang* *max_results*

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

**$0.0003**per delivered entity*$0.3 per 1,000 delivered entitys*

**6,666 entitys**on the free allowance*$2 every month, no card*

**Zero rows**zero charge*blocks, captchas and retries are on us*

**−30%**on volume tiers*the catalog returns your key's price*

### Pay as you go

$0/mo

- $2 free credit / month

- 60 requests / min

- List unit prices

### Starter

$19/mo

- $15 free credit / month

- 300 requests / min

- 10% off unit prices

Most popular

### Growth

$79/mo

- $50 free credit / month

- 600 requests / min

- 20% off unit prices

### Scale

$299/mo

- $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](https://quanticdata.io/web-data-api-for-ai/). 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/scraper/collectors/wikidata/run`.

```
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}'
```

```
import requests

r = requests.post(
    "https://api.quanticdata.io/v1/scraper/collectors/wikidata/run",
    headers={"Authorization": f"Bearer {QD_API_KEY}"},
    json={
        "query": "OpenAI",
        "max_results": 10
    },
    timeout=120,
)
for row in r.json()["payload"]["results"]:
    print(row)
```

```
const res = await fetch(
  "https://api.quanticdata.io/v1/scraper/collectors/wikidata/run",
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.QD_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({"query":"OpenAI","max_results":10}),
  },
);
const { payload } = await res.json();
console.table(payload.results);
```

```
claude mcp add quantumproxies \
  -e QUANTUMPROXIES_API_KEY=qd_live_your_key_here \
  -- npx -y quantumproxies-mcp

# then, in the chat:
> run the wikidata collector with query="OpenAI" and 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 |

## FAQ

Questions we get about the Wikidata API.

[Something else? Ask us →](mailto:hello@quanticdata.io)

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

[Get my free API key](https://app.quanticdata.io/register)

Related: [All 65 collectors](https://quanticdata.io/collectors/) [Wikipedia API](https://quanticdata.io/collectors/wikipedia-api/) [Company Data API](https://quanticdata.io/collectors/company-data-api/) [SEC EDGAR API](https://quanticdata.io/collectors/sec-edgar-api/) [Documentation](https://quanticdata.io/docs/)

---

Source: https://quanticdata.io/collectors/wikidata-api/ · Site index for AI: https://quanticdata.io/llms.txt
