# Wikipedia Scraper - Articles, Categories & Pageviews (`goat255/wikipedia-scraper`) Actor

Search any language edition and get the full plain text of every matching article, with a summary, categories, image, last edited date and optional 30 day view counts. One clean row per article.

- **URL**: https://apify.com/goat255/wikipedia-scraper.md
- **Developed by:** [Goutam Soni](https://apify.com/goat255) (community)
- **Categories:** Automation, Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.40 / 1,000 article scrapeds

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/platform/actors/running/actors-in-store#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

Search any language edition and get the full text of every matching article, with a summary, categories and image. No login and no API key.

### What it does

- **Full article text**, not just the opening paragraph. A long article comes back complete, several thousand words of clean plain text with the markup removed.
- **Summary separated out** - the opening paragraph is its own field, so you can use a short version without splitting the text yourself.
- **Three ways in** - search a topic, name exact articles, or pull an entire category.
- **Any language edition** - pass a code such as `en`, `de`, `fr`, `es`, `hi` or `ja`.
- **Categories, image, last edited date** and a word count on every row.
- **Pageviews on request** - the last 30 days of views plus the daily average, which is the quickest way to rank topics by real interest.
- **Skip stubs** with a minimum word count.

Common uses: building a training or research corpus, topic and content research, competitor and market background, populating a knowledge base, and ranking topics by attention.

### Input

| Field | Type | Description |
|---|---|---|
| `searchTerms` | array | Topics to search. Every match is fetched in full. |
| `titles` | array | Specific articles by exact title. |
| `categories` | array | Every article in a category. |
| `language` | string | Language edition code. Default `en`. |
| `maxResultsPerTerm` | integer | Cap per term or category. Default 100. |
| `minWordCount` | integer | Skip articles shorter than this. |
| `includePageviews` | boolean | Add 30 day view counts. |
| `contactEmail` | string | Optional. See the note below. |
| `proxyConfiguration` | object | Optional. Enable to spread requests across IPs. |

#### Example input

```json
{
  "searchTerms": ["machine learning"],
  "language": "en",
  "maxResultsPerTerm": 300,
  "minWordCount": 100,
  "includePageviews": true
}
```

### Output

Each item is one article.

```json
{
  "pageId": 233488,
  "title": "Example Article",
  "language": "en",
  "summary": "The opening paragraph of the article as plain text.",
  "extract": "The complete article as plain text, with the markup removed.",
  "wordCount": 8528,
  "categories": ["Example category", "Another category"],
  "categoryCount": 20,
  "imageUrl": "https://example.com/image.jpg",
  "thumbnailUrl": "https://example.com/thumb.jpg",
  "url": "https://en.wikipedia.org/wiki/Example_Article",
  "lastEdited": "2026-07-11T09:32:04Z",
  "pageviews30d": 412553,
  "pageviewsDailyAverage": 13751.8,
  "isRedirect": false,
  "searchTerm": "machine learning"
}
```

### Notes

- No login and no API key. Enter a topic and run.
- Articles are fetched one at a time on purpose. The service returns the complete text of only one article per request, so fetching them in batches would leave most rows with empty content.
- The service limits how fast anonymous callers may read. Large runs slow down and retry rather than failing, so they finish.
- Setting `contactEmail` is optional but recommended for very large runs.
- Articles are deduplicated across search terms, titles and categories, so one reached two ways is delivered once and charged once.
- `pageviews30d` is `null` unless you turn pageviews on.

To improve our actors we collect anonymized usage telemetry (run stats and input patterns). No personal account data is collected.

# Actor input Schema

## `searchTerms` (type: `array`):

Topics to search. Every matching article is fetched in full.

## `titles` (type: `array`):

Specific articles by exact title.

## `categories` (type: `array`):

Pull every article in a category. The Category prefix is optional.

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

Which language edition to read, as a code such as en, de, fr, es, hi or ja.

## `maxResultsPerTerm` (type: `integer`):

Cap per search term or category. Default 100, up to 5000.

## `minWordCount` (type: `integer`):

Skip short stub articles below this length.

## `includePageviews` (type: `boolean`):

Add the last 30 days of view counts and the daily average. This adds one request per article.

## `contactEmail` (type: `string`):

Optional. The service asks callers to identify themselves and is friendlier to large runs that do.

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

Optional. Enable to spread requests across IP addresses.

## Actor input object example

```json
{
  "searchTerms": [
    "machine learning",
    "renewable energy"
  ],
  "titles": [
    "Machine learning"
  ],
  "categories": [
    "Machine learning"
  ],
  "language": "en",
  "maxResultsPerTerm": 100,
  "includePageviews": false,
  "contactEmail": "you@example.com"
}
```

# Actor output Schema

## `articles` (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 = {
    "searchTerms": [
        "machine learning"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("goat255/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 = { "searchTerms": ["machine learning"] }

# Run the Actor and wait for it to finish
run = client.actor("goat255/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 '{
  "searchTerms": [
    "machine learning"
  ]
}' |
apify call goat255/wikipedia-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,goat255/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/79kNHowZ4rsBE854r/builds/sUD4hFgX2I5hSm3Sh/openapi.json
