# Wikipedia Articles Scraper (`properscraper/wikipedia-articles-scraper`) Actor

Export Wikipedia articles as clean text by title, link or search: summary, full text, categories, main image, Wikidata ID and last edit date, in any language edition. Uses the official Wikipedia API.

- **URL**: https://apify.com/properscraper/wikipedia-articles-scraper.md
- **Developed by:** [jake mcclure](https://apify.com/properscraper) (community)
- **Categories:** AI, Education
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 article saveds

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 Articles Scraper

Export Wikipedia articles as clean plain text, by title, by link or by search, from any language edition. For each article you get its summary, the full text with section headings, the short description, categories, main image, Wikidata ID and the date of its last edit.

It uses the official Wikipedia API, so the text is exactly what Wikipedia publishes, with no page furniture to clean up. No login or API key is needed.

Use it to:

- build a knowledge base or a retrieval (RAG) dataset for an AI assistant
- collect reference text on a list of companies, people, places or topics
- gather training or evaluation text in dozens of languages
- enrich a spreadsheet of names with a one-line description, a summary and a Wikidata ID
- find the articles Wikipedia has on a subject

### Input

Give it articles, searches, or both.

| Field | What it does |
|---|---|
| **Articles** | One per line: a title such as `Web scraping`, or a link such as `https://de.wikipedia.org/wiki/Berlin`. A link is read from the language edition it points to. |
| **Searches** | One per line. Each search saves the best-matching articles, as Wikipedia's own search ranks them. |
| **Articles per search** | The most articles saved for each search. Default 10. |
| **Language edition** | The code at the start of the Wikipedia address: `en`, `de`, `es`, `fr`, `ja`, `simple` and so on. Default `en`. |
| **Include the full article text** | On by default. Off saves the summary only, which is much faster for long lists. |

```json
{
    "articles": ["Web scraping", "https://de.wikipedia.org/wiki/Berlin"],
    "searches": ["open data"],
    "maxArticlesPerSearch": 25,
    "language": "en"
}
```

### Output

One record per article:

```json
{
    "search": null,
    "input": "Web scraping",
    "language": "en",
    "title": "Web scraping",
    "pageId": 2696619,
    "url": "https://en.wikipedia.org/wiki/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…",
    "text": "Web scraping, web harvesting, or web data extraction is data scraping used for extracting data from websites…\n\n\n== History ==\nAfter the birth of the World Wide Web in 1989…",
    "wordCount": 3215,
    "categories": ["Web scraping"],
    "imageUrl": null,
    "wikidataId": "Q665452",
    "isDisambiguation": false,
    "lastEditedAt": "2026-11-16T04:13:23.000Z",
    "pageLength": 34956,
    "scrapedAt": "2026-11-18T12:00:00.000Z"
}
```

- `summary` is the article's opening section. `text` is the whole article as plain text, with headings marked the way Wikipedia marks them (`== History ==`); it is `null` when the full text is turned off.
- `input` is the title or link you gave; `title` is the article it led to, after Wikipedia's own redirects (`UK` leads to `United Kingdom`). `search` is the search that found it.
- `description` is Wikipedia's one-line description of the subject. `imageUrl` is the article's main image, where it has one.
- `isDisambiguation` is `true` for pages that only list the meanings of a name.
- `wordCount` counts the words in the text saved. `pageLength` is the size of the article's source in bytes.
- An article reached twice, by a redirect or by a title and a search, is saved once.

A `SUMMARY` record in the run's key-value store lists how many articles each search or batch saved and any titles that were not found.

### Pricing

Pay per result. You are charged once for each article saved to the dataset, at the per-result price shown on this page, with or without the full text. Titles that do not exist are not saved and cost nothing. The run stops as soon as it reaches the maximum charge you set for it.

### Limits

- Tables, infoboxes, image captions, references and formulas are not part of the plain text Wikipedia's API provides.
- Wikipedia asks API users to send requests one after another. A run reads about three full articles a second, or about fifty summaries a second.
- A search returns at most 10,000 articles.
- Only articles are read, not talk pages, categories or user pages.

### Is this allowed, and how may I use the text?

Wikipedia provides this API for exactly this purpose. The Actor identifies itself, sends its requests in series and backs off when the servers are busy, as Wikipedia's API guidelines ask.

Wikipedia's text is free to reuse under the Creative Commons Attribution-ShareAlike licence: credit Wikipedia (the `url` field is the link to give) and share any adapted text under the same licence. Images have their own licences; check each image's page before reusing it.

# Actor input Schema

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

One per line: an article title such as Web scraping, or a link such as https://de.wikipedia.org/wiki/Berlin. A link is read from the language edition it points to.

## `searches` (type: `array`):

One per line. Each search saves the best-matching articles, as Wikipedia's own search ranks them.

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

The most articles saved for each search.

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

The code at the start of the Wikipedia address: en, de, es, fr, ja, simple and so on. Used for titles and searches; links carry their own.

## `includeFullText` (type: `boolean`):

On: the whole article as plain text, plus its summary. Off: the summary only, which is much faster for long lists.

## Actor input object example

```json
{
  "articles": [
    "Web scraping",
    "https://en.wikipedia.org/wiki/Open_data"
  ],
  "maxArticlesPerSearch": 10,
  "language": "en",
  "includeFullText": true
}
```

# Actor output Schema

## `articles` (type: `string`):

Every article saved by the run, one record per article.

## `summary` (type: `string`):

Totals for the run and, for each search or batch of articles, how many results were saved and any error.

# 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": [
        "Web scraping",
        "https://en.wikipedia.org/wiki/Open_data"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("properscraper/wikipedia-articles-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": [
        "Web scraping",
        "https://en.wikipedia.org/wiki/Open_data",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("properscraper/wikipedia-articles-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": [
    "Web scraping",
    "https://en.wikipedia.org/wiki/Open_data"
  ]
}' |
apify call properscraper/wikipedia-articles-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,properscraper/wikipedia-articles-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/ZaHKMbg1H6mXNz2q4/builds/bxoiixa7RVDXWEcbg/openapi.json
