# Wikipedia & Wikidata Scraper: Entity Facts, Links & Summaries (`physealabs/wikipedia-wikidata-entity-extractor`) Actor

Type names, Wikipedia URLs or Wikidata IDs and get one structured record per entity: summary, description, type, labelled facts (founders, HQ, revenue, birth date, population...), identifiers (ISIN, LEI, VIAF, socials), links and categories, in any language.

- **URL**: https://apify.com/physealabs/wikipedia-wikidata-entity-extractor.md
- **Developed by:** [jay casey](https://apify.com/physealabs) (community)
- **Categories:** AI, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 entity extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Wikipedia & Wikidata Scraper: Entity Facts, Links & Summaries

Turn a list of names into structured knowledge: each entity is matched to its Wikipedia article and Wikidata item and returned as one record with a summary, labelled facts and identifiers you can join to other datasets.

> **Launch Sale: 90% OFF for the first week!** Every price below is cut by 90% during launch week, and you still pay only for results that come back.

### Quick start

Press **Start**. The sample extracts Marie Curie, Apple (by Wikidata ID Q312) and Berlin in about 5 seconds. Paste your own list of companies, people or places.

### What you get

- Wikipedia title, intro summary (plain text), short description, URL, main image, coordinates
- Wikidata QID, aliases, types (`instance_of`) and labelled facts with human-readable values: founders, CEO, HQ, employees, revenue (with currency), stock exchange, birth/death, occupation, awards, population, area, capital...
- External identifiers in one object: ISIN, LEI, SEC CIK, VIAF, ORCID, GND, IMDb, X/Twitter, Instagram, LinkedIn, GitHub and more
- Official website, categories, linked articles, external links, number of language editions
- Fuzzy name matching through Wikipedia search when the exact title does not exist
- Status rows for unmatched names, which are never charged

### Good for

- Enriching CRM or lead lists with company facts and identifiers
- Knowledge-graph and entity-resolution pipelines (QIDs as join keys)
- Grounding LLM answers and RAG chunks with clean, cited facts
- Quick research briefs on people, organisations and places in any language

### Pricing

**Launch Sale: 90% OFF for the first week!**

- $0.002 per entity — $2 per 1,000
- Unmatched names are free
- The sample run (3 entities) costs $0.006

You pay only for results that come back. Status rows (not found, errors, skipped) are free. Set a max cost per run in
the run options and the run stops cleanly when it hits it. Normal Apify platform usage applies.

### Input

| Field | What it does |
|---|---|
| `entities` | Names, Wikipedia URLs or Wikidata IDs, one per line. Examples: Marie Curie, https://en.wikipedia.org/wiki/OpenAI, Q312 |
| `language` | Wikipedia language code for summaries and labels: en, de, fr, es, ja, pt... A full Wikipedia URL keeps its own language. |
| `allFacts` | Off: about 80 high-signal properties (founders, HQ, revenue, birth date, population, socials, IDs...). On: everything Wikidata has. |
| `maxValuesPerFact` | Cap for multi-valued facts such as awards or subsidiaries. Preferred values come first. |
| `maxLinkedArticles` | Wikipedia articles linked from the page (alphabetical). |

### Output

Results go to the default dataset (table view in the Console, or JSON/CSV/Excel export).
A `RUN_SUMMARY.json` record in the key-value store has counts, failures and the prices used.

### Limits

- Data is only as complete as Wikipedia and Wikidata. Smaller companies may have few facts.
- Wikipedia text is CC BY-SA 4.0 (attribute when republishing); Wikidata is CC0.
- Name matching picks the top Wikipedia result; use a URL or QID when a name is ambiguous.
- All collection is done by this actor directly against public sources. It never calls other paid actors.

### Run it from code

Same input as the Console sample:

```json
{
  "entities": [
    "Marie Curie",
    "Q312",
    "https://en.wikipedia.org/wiki/Berlin"
  ],
  "language": "en",
  "maxLinkedArticles": 20
}
```

```sh
curl -X POST "https://api.apify.com/v2/acts/physealabs~wikipedia-wikidata-entity-extractor/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" -d @input.json
```

```python
from apify_client import ApifyClient
items = ApifyClient("YOUR_APIFY_TOKEN").actor("physealabs/wikipedia-wikidata-entity-extractor").call(run_input={"entities": ["Marie Curie", "Q312", "https://en.wikipedia.org/wiki/Berlin"], "language": "en", "maxLinkedArticles": 20})
```

It also works from Zapier, Make, n8n and Apify schedules.

### About

Built by **Physea Labs · Liminal**, the team behind Liminal, a router that turns hard questions into grounded, checkable answers.
Questions or a source you want added? Open an issue on the actor page.

# Actor input Schema

## `entities` (type: `array`):

Names, Wikipedia URLs or Wikidata IDs, one per line. Examples: Marie Curie, https://en.wikipedia.org/wiki/OpenAI, Q312

## `language` (type: `string`):

Wikipedia language code for summaries and labels: en, de, fr, es, ja, pt... A full Wikipedia URL keeps its own language.

## `allFacts` (type: `boolean`):

Off: about 80 high-signal properties (founders, HQ, revenue, birth date, population, socials, IDs...). On: everything Wikidata has.

## `maxValuesPerFact` (type: `integer`):

Cap for multi-valued facts such as awards or subsidiaries. Preferred values come first.

## `maxLinkedArticles` (type: `integer`):

Wikipedia articles linked from the page (alphabetical).

## Actor input object example

```json
{
  "entities": [
    "Marie Curie",
    "Q312",
    "https://en.wikipedia.org/wiki/Berlin"
  ],
  "language": "en",
  "allFacts": false,
  "maxValuesPerFact": 10,
  "maxLinkedArticles": 20
}
```

# Actor output Schema

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

One row per entity with summary, labelled Wikidata facts, identifiers, links and categories.

## `summary` (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 = {
    "entities": [
        "Marie Curie",
        "Q312",
        "https://en.wikipedia.org/wiki/Berlin"
    ],
    "language": "en",
    "maxLinkedArticles": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("physealabs/wikipedia-wikidata-entity-extractor").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 = {
    "entities": [
        "Marie Curie",
        "Q312",
        "https://en.wikipedia.org/wiki/Berlin",
    ],
    "language": "en",
    "maxLinkedArticles": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("physealabs/wikipedia-wikidata-entity-extractor").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 '{
  "entities": [
    "Marie Curie",
    "Q312",
    "https://en.wikipedia.org/wiki/Berlin"
  ],
  "language": "en",
  "maxLinkedArticles": 20
}' |
apify call physealabs/wikipedia-wikidata-entity-extractor --silent --output-dataset

```

## MCP server setup

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

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/0RznNBjHIDILqkmFU/builds/doAdnm7HatmAynPac/openapi.json
