# Wikipedia Scraper API — Articles, Summaries & Full Text (`factpipe/wikipedia-scraper`) Actor

Get Wikipedia articles by title, URL or keyword search in any language: summary, full plain text, categories, Wikidata ID, coordinates, thumbnail, last edit. Official API, no key. $1 per 1,000 articles.

- **URL**: https://apify.com/factpipe/wikipedia-scraper.md
- **Developed by:** [Neo B](https://apify.com/factpipe) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 article results

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?

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

## Wikipedia Scraper API — Articles, Summaries & Full Text

Get **Wikipedia articles** as clean, flat JSON — by title, by URL, or by **keyword search** — in **any Wikipedia language**. Every record has the lead summary, optional full plain text, categories, Wikidata ID, coordinates, thumbnail and last-edit timestamp. Uses only the **official MediaWiki API**: no HTML parsing, no proxies, no broken selectors. Built for RAG pipelines, knowledge graphs, content enrichment and AI agents.

### Quick start

1. Click **Start** with the prefilled article, title and search. It finishes in under a minute.
2. You get up to 5 Wikipedia articles as clean JSON with summary, categories and links.
3. That first run costs at most $0.005, well within Apify's free monthly credit. Then swap in your own input or schedule it.

### What you get

One record per article:

```json
{
  "query": "https://en.wikipedia.org/wiki/Web_scraping",
  "found": true,
  "language": "en",
  "page_id": 2696619,
  "title": "Web scraping",
  "description": "Method of extracting data from websites",
  "summary": "Web scraping, web harvesting, or web data extraction is data scraping used for extracting data from websites. Web scraping software may directly access the Worl...",
  "full_text": null,
  "word_count": null,
  "is_disambiguation": false,
  "categories": [
    "Web scraping"
  ],
  "wikidata_id": "Q665452",
  "thumbnail_url": null,
  "latitude": null,
  "longitude": null,
  "last_edited_at": "2026-09-09T23:43:46Z",
  "revision_id": 1374117169,
  "length_bytes": 34806,
  "article_url": "https://en.wikipedia.org/wiki/Web_scraping",
  "license": "CC BY-SA 4.0",
  "license_url": "https://creativecommons.org/licenses/by-sa/4.0/",
  "attribution_url": "https://en.wikipedia.org/w/index.php?curid=2696619&action=history",
  "source_url": "https://en.wikipedia.org/w/api.php?...",
  "fetched_at": "2026-09-13T12:27:04.922Z"
}
```

### Use cases

- **RAG & LLM grounding**: pull summaries or full text for a list of topics in one run, with stable page IDs and revision IDs for citations.
- **Entity enrichment**: map names or keywords to Wikipedia pages, Wikidata IDs, categories and coordinates.
- **Research datasets**: collect articles for a keyword in any of 300+ languages.
- **AI agents**: tiny input schema, deterministic output — ideal via API or MCP.

### Input

| Field | Type | Notes |
|---|---|---|
| `articles` | string\[] | Titles (`Eiffel Tower`) or URLs (`https://de.wikipedia.org/wiki/Berlin`) |
| `searchQueries` | string\[] | Keywords; top matching articles per query |
| `language` | string | Language code for titles and searches (default `en`) |
| `maxArticlesPerSearch` | integer | Top N per search query (default 10, max 500) |
| `fullText` | boolean | Include the complete plain-text body (default false) |

Redirects (e.g. `UK` → `United Kingdom`) are followed automatically. Disambiguation pages are flagged with `is_disambiguation: true`.

**Policy:** articles about individual people (Wikidata "instance of: human") are skipped and never charged. This Actor is for topics, places, organizations, products and concepts — not person profiles.

### Pricing (pay per event)

| Event | Price | Meaning |
|---|---|---|
| `article-result` | **$1.00 per 1,000** ($0.001 each) | One article delivered. **Not-found titles, skipped person articles, duplicates and empty runs are never charged.** No start fee. |

Example: 5,000 articles cost **$5.00**. You only pay for delivered results.

### Related factpipe Actors

- [Open Food Facts Scraper — Nutrition & Barcode Lookup API](https://apify.com/factpipe/open-food-facts-scraper) — food product and nutrition data
- [SEC EDGAR Filings Scraper API — 10-K, 10-Q, 8-K Full-Text](https://apify.com/factpipe/sec-edgar-filings-search) — full-text search of SEC filings

### FAQ

**Do I need a Wikipedia API key?**
No. The official MediaWiki API is open. The Actor identifies itself per Wikimedia's User-Agent policy and paces its requests.

**Can I get the full article text, not just the summary?**
Yes. Set `fullText: true` to add the complete plain-text body and a word count to every record.

**Which languages are supported?**
Every Wikipedia language edition. Set `language` (e.g. `de`, `fr`, `ja`) or pass URLs from any edition in the same run.

**Can I use Wikipedia content commercially?**
Wikipedia text is licensed CC BY-SA 4.0: reuse is allowed, including commercially, with attribution and share-alike. Every record carries `license`, `article_url` and `attribution_url` so you can attribute correctly.

**Can I call it from Python, JavaScript, Make, Zapier or an AI agent?**
Yes. Run it through the Apify API or official Python/JavaScript clients, connect it to Make, Zapier, n8n, Slack or Google Sheets via Apify integrations, or expose it to AI agents through the Apify MCP server. Input is small and output is deterministic flat JSON.

### Reliability

Official MediaWiki and Wikidata APIs, batched requests, retries with backoff, polite rate limiting, structured failure reporting, daily health checks and issue triage.

# Actor input Schema

## `articles` (type: `array`):

Article titles (e.g. Eiffel Tower) or full Wikipedia URLs in any language (e.g. https://de.wikipedia.org/wiki/Berlin).

## `searchQueries` (type: `array`):

Keywords to search; the top matching articles are returned for each.

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

Wikipedia language code for titles and searches, e.g. en, de, fr, es, ja. URLs keep their own language.

## `maxArticlesPerSearch` (type: `integer`):

Top N articles returned (and charged) per search query.

## `fullText` (type: `boolean`):

Add the complete plain-text article body (full\_text, word\_count). Summary is always included.

## Actor input object example

```json
{
  "articles": [
    "https://en.wikipedia.org/wiki/Web_scraping",
    "Eiffel Tower"
  ],
  "searchQueries": [
    "renewable energy storage"
  ],
  "language": "en",
  "maxArticlesPerSearch": 3,
  "fullText": false
}
```

# Actor output Schema

## `resultsDatasetUrl` (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 = {
    "articles": [
        "https://en.wikipedia.org/wiki/Web_scraping",
        "Eiffel Tower"
    ],
    "searchQueries": [
        "renewable energy storage"
    ],
    "maxArticlesPerSearch": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("factpipe/wikipedia-scraper").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 = {
    "articles": [
        "https://en.wikipedia.org/wiki/Web_scraping",
        "Eiffel Tower",
    ],
    "searchQueries": ["renewable energy storage"],
    "maxArticlesPerSearch": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("factpipe/wikipedia-scraper").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 '{
  "articles": [
    "https://en.wikipedia.org/wiki/Web_scraping",
    "Eiffel Tower"
  ],
  "searchQueries": [
    "renewable energy storage"
  ],
  "maxArticlesPerSearch": 3
}' |
apify call factpipe/wikipedia-scraper --silent --output-dataset

```

## MCP server setup

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

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/FFe1if47hnnV8Rejh/builds/SNQD54hCfDZDom3gI/openapi.json
