# Wikidata Entity Lookup — QID to Structured Facts API (`accountable_eel/wikidata-entity-lookup`) Actor

Look up Wikidata entities by QID against the official, free Wikidata API. Get label, description, aliases, and key claims — instance-of, inception date, website, country, founder, headquarters, industry — resolved to plain-English labels, not raw property IDs. Pay only for QIDs that resolve.

- **URL**: https://apify.com/accountable\_eel/wikidata-entity-lookup.md
- **Developed by:** [Adrian Voss](https://apify.com/accountable_eel) (community)
- **Categories:** Developer tools, Education
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 1,000 successful lookups

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Wikidata Entity Lookup

Look up any [Wikidata](https://www.wikidata.org) entity by QID against the official,
free `Special:EntityData` JSON export at www.wikidata.org — label, description,
aliases, and a curated set of key claims (instance-of, inception date, official
website, country, founder, headquarters, industry) resolved to human-readable
labels, not raw property IDs. No API key, no scraping — this hits Wikidata's
own public data export directly.

### Features

- **QID → structured entity record.** Label, description, aliases, and a
  Wikidata URL for every entity that resolves.
- **Claims resolved to labels, not raw IDs.** Wikidata entities carry
  property-ID claims like `P31` and `P571` that mean nothing on their own.
  This actor resolves the common ones — instance-of, inception date, official
  website, country, founder, headquarters, industry — to plain-English labels
  via a single follow-up batch request, instead of dumping bare QIDs like
  `Q6881511` in your data.
- **Accepts QIDs or Wikidata URLs.** Paste `Q95` or
  `https://www.wikidata.org/wiki/Q95` — both normalize the same way.
- **Pay only for hits.** QIDs that don't resolve cost nothing — see
  [Pricing](#pricing).
- **Built for bulk.** Feed in thousands of QIDs; concurrency, keyword
  filtering, and column selection are all configurable.

### How to use Wikidata Entity Lookup — QID to Structured Facts API

1. **In the Apify Console.** Open the actor page and click **Start** — the `qids` field is already pre-filled with a working example. Results land in the run's dataset as soon as each item is found.
2. **Via the API.** Call it directly with a POST request — no Console needed once you have an API token:
   ```bash
   curl "https://api.apify.com/v2/acts/accountable_eel~wikidata-entity-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
     -X POST \
     -H "Content-Type: application/json" \
     -d '{"qids":["Q95"]}'
   ```
3. **On a schedule.** Save this actor as an Apify **Task** with the input you want, then add a **Schedule** (hourly, daily, weekly) so it runs on its own — no server of your own required.

### Input

```json
{
  "qids": [
    "Q95"
  ]
}
```

One Wikidata entity ID per line, e.g. Q95. Accepted formats: Q95, https://www.wikidata.org/wiki/Q95.

```json
{
  "qids": ["Q95", "https://www.wikidata.org/wiki/Q95"],
  "testRun": false,
  "onlyFound": false,
  "maxConcurrency": 5
}
```

`qids` is a list of Wikidata entity IDs, one per line. Accepted formats are a
bare QID (`Q95`) or a full Wikidata URL (`https://www.wikidata.org/wiki/Q95`)
— both are normalized to the QID before lookup. You're only charged for QIDs
that actually resolve; a miss costs nothing.

Other inputs:

- **`testRun`** — process only the first 5 QIDs, useful for a cheap sanity
  check before running the full list.
- **`onlyFound`** — drop rows with no result from the output. Misses are
  always free whether or not you show them.
- **`includeKeywords`** / **`excludeKeywords`** — optionally keep or drop rows
  based on whether the result text contains given words.
- **`maxResults`** — stop the run once this many results have been found.
- **`columns`** — pick which fields to include per row: `label`, `qid`,
  `description`, `aliases`, `instanceOf`, `inceptionDate`, `officialWebsite`,
  `country`, `founder`, `headquarters`, `industry`, `wikidataUrl`. All are
  included by default.
- **`maxConcurrency`** — parallel requests, default 5, max 20. This target
  has no browser fallback, so keeping it conservative avoids getting blocked.
- **`proxyConfiguration`** — Apify Proxy config; residential is recommended
  for anti-bot-sensitive targets.

### Output

| query | found | status | label | qid | description | aliases | instanceOf | inceptionDate | officialWebsite | country | founder | headquarters | industry | wikidataUrl | scrapedAt |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Q95 | true | OK | Google | Q95 | American multinational technology company, a subsidiary of Alphabet Inc. | \[] | business | 1998-09-04 | https://about.google/ | United States | Sergey Brin | Mountain View | Internet industry | https://www.wikidata.org/wiki/Q95 | 2026-08-23T21:05:20.041Z |

One row per QID, for example:

```json
{
  "query": "Q95",
  "found": true,
  "status": "OK",
  "label": "Google",
  "qid": "Q95",
  "description": "American multinational technology company",
  "aliases": ["Google LLC", "Google Inc."],
  "instanceOf": "technology company",
  "inceptionDate": "1998-09-04",
  "officialWebsite": "https://www.google.com/",
  "country": "United States of America",
  "founder": "Larry Page",
  "headquarters": "Mountain View",
  "industry": "computer software",
  "wikidataUrl": "https://www.wikidata.org/wiki/Q95",
  "scrapedAt": "2026-08-21T00:00:00.000Z"
}
```

QIDs that don't resolve still get a row (unless `onlyFound` is on) with
`found: false` and a `status` of `NOT_FOUND` (no such entity) or
`BAD_FORMAT` (input wasn't a recognizable QID) plus a plain-English
`message` — these rows are never charged.

### Use cases

- **Enrich a list of companies, people, or products** you only have Wikidata
  QIDs for with readable names, founders, countries, and websites.
- **Bulk-resolve entity references** found in other datasets (e.g. Wikipedia
  infoboxes, knowledge-graph exports) into structured, labeled facts.
- **Build a lightweight company or organization directory** using inception
  date, headquarters, and industry pulled straight from Wikidata.
- **Cross-check or backfill official websites and founders** for a list of
  organizations without manually opening each Wikidata page.
- **Feed a research or fact-checking pipeline** with clean, labeled claims
  instead of raw Wikidata property IDs.

### Pricing

$4 per 1,000 QIDs, plus a $0.005 start fee. Misses (`found:false`) are never charged.

### Use it from Clay, n8n, Make, or an AI agent

This actor runs synchronously over plain HTTP — call it directly from a script, a workflow tool, or an AI agent, no Apify Console needed once you have an API token.

```bash
curl "https://api.apify.com/v2/acts/accountable_eel~wikidata-entity-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"qids":["Q95"]}'
```

**n8n.** Add an HTTP Request node: Method `POST`, URL `https://api.apify.com/v2/acts/accountable_eel~wikidata-entity-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>`, Body Content Type `JSON`, JSON Body `{"qids":["Q95"]}` (swap in an expression from an earlier node for a real value).

**Clay.** Add an "HTTP API" column: Method `POST`, URL `https://api.apify.com/v2/acts/accountable_eel~wikidata-entity-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>`, Body `{"qids":["{{QID}}"]}`, mapping the row's QID into the `qids` array.

**MCP.** In Claude, Cursor, or any MCP client with the Apify MCP server, ask for "Wikidata API — QID to Structured Entity Facts" — the agent will find and run this actor.

### FAQ

**What counts as a "found" entity?**
Any QID for which Wikidata's `Special:EntityData` export returns an entity
that isn't marked missing. That entity's label, description, aliases, and
claims are extracted even if some individual claims (e.g. no founder on
file) are empty.

**What if I paste a full Wikidata URL instead of a QID?**
Both work. `https://www.wikidata.org/wiki/Q95` and `Q95` normalize to the
same QID before lookup.

**Why are some claim fields empty even when the entity is found?**
Only entities that actually have that property populated in Wikidata will
return a value — e.g. many entities have no `founder` or `headquarters`
claim at all. That's a gap in the source data, not a failure of the lookup.

**Does this cover every Wikidata property?**
No. Wikidata entities can carry hundreds of raw property-ID claims. This
actor resolves a curated, commonly-useful set (instance-of, inception date,
official website, country, founder, headquarters, industry) rather than
dumping every unlabeled property ID.

**How does `testRun` work?**
Turn it on to process only the first 5 QIDs from your list — useful to
confirm your input and column choices look right before running the full
batch.

**Should I use a proxy?**
Apify Proxy is enabled by default. Residential proxies are recommended if
you're running high volumes, since this target has no browser fallback and
getting blocked costs more than running slow and steady — keep
`maxConcurrency` conservative for large batches.

# Actor input Schema

## `qids` (type: `array`):

One Wikidata entity ID per line, e.g. Q95. Accepted formats: Q95, https://www.wikidata.org/wiki/Q95. You're only charged for the ones we actually find — a miss costs nothing.

## `testRun` (type: `boolean`):

Turn this on to test your input on a small sample before running the full list. Turn it off to process everything.

## `onlyFound` (type: `boolean`):

Only keep rows where something was actually found. Misses are always free, whether or not you show them here.

## `includeKeywords` (type: `array`):

Optional. Only keep results that mention at least one of these words (e.g. a job title, a city, a product name). Leave empty to keep everything.

## `excludeKeywords` (type: `array`):

Optional. Drop any result that mentions one of these words. Leave empty to skip nothing.

## `maxResults` (type: `integer`):

Optional. Stop the run once this many results have been found — useful for a quick, cheap sample. Leave blank for no limit.

## `columns` (type: `array`):

Choose which pieces of information to include in each result row. All are included by default.

## `maxConcurrency` (type: `integer`):

Parallel requests. Keep conservative — this target has no browser fallback, so getting blocked costs more than slow-and-steady.

## `proxyConfiguration` (type: `object`):

Apify Proxy config. Residential recommended for anti-bot-sensitive targets.

## Actor input object example

```json
{
  "qids": [
    "Q95"
  ],
  "testRun": false,
  "onlyFound": false,
  "includeKeywords": [],
  "excludeKeywords": [],
  "columns": [
    "label",
    "qid",
    "description",
    "aliases",
    "instanceOf",
    "inceptionDate",
    "officialWebsite",
    "country",
    "founder",
    "headquarters",
    "industry",
    "wikidataUrl"
  ],
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "qids": [
        "Q95"
    ],
    "includeKeywords": [],
    "excludeKeywords": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("accountable_eel/wikidata-entity-lookup").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "qids": ["Q95"],
    "includeKeywords": [],
    "excludeKeywords": [],
}

# Run the Actor and wait for it to finish
run = client.actor("accountable_eel/wikidata-entity-lookup").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "qids": [
    "Q95"
  ],
  "includeKeywords": [],
  "excludeKeywords": []
}' |
apify call accountable_eel/wikidata-entity-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,accountable_eel/wikidata-entity-lookup"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/0I4B3doqdxh7S3Pe8/builds/hhFYNwflAUMBdCNZc/openapi.json
