# Wikipedia Scraper | $5 / 1k | Fast & Reliable (`fatihtahta/wikipedia-scraper`) Actor

Get full articles and detailed search results with the Wikipedia Scraper. Extract structured data including titles, summaries, citations, and full content. Ideal for market research, AI training, and competitive intelligence.

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

## Pricing

$4.99 / 1,000 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?

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 Scraper | $5 / 1k | Fast & Reliable

**Slug:** `fatihtahta/wikipedia-scraper`

Get full articles and detailed search results with the Wikipedia Scraper. Extract structured data including titles, summaries, citations, and full content. Ideal for market research, AI training, and competitive intelligence.

***

### Overview

Wikipedia is the world’s most comprehensive open encyclopedia, constantly updated across thousands of topics and languages. The **Wikipedia Scraper** automates the collection of article-level insights, transforming public encyclopedia pages into structured datasets ready for analysis.

The actor reliably gathers:

- Complete article content with metadata such as titles, summaries, and publication details.
- Reference counts, internal links, media assets, and infobox attributes for deeper context.
- Search and category results expanded into the full articles they reference.

Run it once and receive consistent, ready-to-use records—no manual browsing, copying, or formatting required.

***

### Why Use This Actor

- **Market researchers & analysts:** Track company histories, industry timelines, and competitive narratives straight from a trusted knowledge base.
- **Developers & data teams:** Feed LLM training pipelines, knowledge graphs, or semantic search indices with normalized Wikipedia data.
- **Content strategists & educators:** Assemble curated reading lists, bibliographies, or citation-rich briefings without handcrafting each entry.
- **Knowledge operations & directory builders:** Populate internal wikis, catalogues, or monitoring dashboards with up-to-date encyclopedia coverage.

Use it for lead and partner research, market landscaping, product discovery, directory building, due diligence prep, and any workflow that benefits from detailed, cited background information.

***

### Input Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `articleInputs` | array of strings | Provide Wikipedia article slugs or full URLs to fetch directly. | — |
| `searchInputs` | array of strings | Enter search queries or Wikipedia search result URLs to discover matching articles before scraping them. | — |
| `language` | string (select) | Choose the Wikipedia language edition that pairs with the provided slugs and targets. | `"en"` |
| `limit` | integer | Maximum number of articles saved per input. Useful for sampling or capping run size. | `50000` |
| `proxyConfiguration` | object | Configure the connection settings. The default Apify datacenter proxy keeps runs stable. | Apify datacenter proxy |

***

### Example Input

```json
{
  "articleInputs": [
    "YouTube",
    "https://en.wikipedia.org/wiki/OpenAI"
  ],
  "searchInputs": [
    "generative AI",
    "https://en.wikipedia.org/w/index.php?search=cloud%20computing&title=Special:Search&fulltext=1"
  ],
  "language": "en",
  "limit": 250,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

***

### Example Output

```json
{
  "title": "YouTube",
  "pageId": 3524766,
  "language": "en",
  "url": "https://en.wikipedia.org/wiki/YouTube",
  "referencesCount": 409,
  "internalLinks": [
    "https://en.wikipedia.org/wiki/Online_video_platform",
    "https://en.wikipedia.org/wiki/Alphabet_Inc.",
    "https://en.wikipedia.org/wiki/Social_media_platform"
  ],
  "imageUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/YouTube_2024.svg/330px-YouTube_2024.svg.png"
  ],
  "infobox": {
    "Type of business": "Subsidiary",
    "Founded": "February 14, 2005",
    "Headquarters": "San Bruno, California, United States",
    "Owner": "Alphabet Inc."
  },
  "mainContent": "YouTube is an American online video sharing platform owned by Google...",
  "fetchedAt": "2025-11-05T10:11:18.247Z"
}
```

**Field highlights**

- `title`, `pageId`, `language`, and `url` identify the article.
- `referencesCount`, `internalLinks`, and `imageUrls` show sourcing depth and media assets.
- `infobox` compiles structured summary facts.
- `mainContent` delivers the full article body for text analysis or summarization.
- `fetchedAt` records when the data was collected.

***

### Notes & Limitations

- Wikipedia content changes frequently; schedule runs to keep datasets current.
- Always review and respect Wikipedia’s licensing terms and robots guidelines when redistributing or republishing material.
- Use the data responsibly, especially when combining it with other datasets or personal information.

***

### Support

Questions or custom needs? Open an issue on the **Issues** tab of the actor page in Apify Console and it will be resolved around the clock.

Happy Scraping,

- Fatih

# Actor input Schema

## `articleInputs` (type: `array`):

Paste one or more Wikipedia article URLs or slugs to scrape directly.

## `searchInputs` (type: `array`):

Provide search terms or Wikipedia search result URLs. The scraper will discover the matching articles and scrape them.

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

Choose the Wikipedia language edition to combine with the slug and target.

## `limit` (type: `integer`):

Stop the run after this number of listings has been saved per input.

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

The default Apify Datacenter proxy keeps the scraper reliable.

## Actor input object example

```json
{
  "articleInputs": [
    "YouTube",
    "https://en.wikipedia.org/wiki/YouTube"
  ],
  "searchInputs": [
    "YouTube",
    "https://en.wikipedia.org/w/index.php?search=YouTube&title=Special%3ASearch&profile=advanced&fulltext=1&ns0=1"
  ],
  "language": "en",
  "limit": 50000,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": []
  }
}
```

# 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 = {
    "articleInputs": [
        "YouTube",
        "https://en.wikipedia.org/wiki/YouTube"
    ],
    "searchInputs": [
        "YouTube",
        "https://en.wikipedia.org/w/index.php?search=YouTube&title=Special%3ASearch&profile=advanced&fulltext=1&ns0=1"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fatihtahta/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 = {
    "articleInputs": [
        "YouTube",
        "https://en.wikipedia.org/wiki/YouTube",
    ],
    "searchInputs": [
        "YouTube",
        "https://en.wikipedia.org/w/index.php?search=YouTube&title=Special%3ASearch&profile=advanced&fulltext=1&ns0=1",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("fatihtahta/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 '{
  "articleInputs": [
    "YouTube",
    "https://en.wikipedia.org/wiki/YouTube"
  ],
  "searchInputs": [
    "YouTube",
    "https://en.wikipedia.org/w/index.php?search=YouTube&title=Special%3ASearch&profile=advanced&fulltext=1&ns0=1"
  ]
}' |
apify call fatihtahta/wikipedia-scraper --silent --output-dataset

```

## MCP server setup

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