Wikipedia Scraper avatar

Wikipedia Scraper

Pricing

from $1.40 / 1,000 apify default dataset items

Go to Apify Store
Wikipedia Scraper

Wikipedia Scraper

Wikipedia API scraper and Wikipedia full text scraper: search by keyword or exact titles in any language edition. Get the Wikipedia summary or full text of articles as plaintext, with word count, categories and URL. A Wikipedia dataset for RAG or LLM training data via MediaWiki API.

Pricing

from $1.40 / 1,000 apify default dataset items

Rating

0.0

(0)

Developer

Flash Scrape

Flash Scrape

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

2

Monthly active users

17 days ago

Last modified

Features

Limited permissions

Share

Wikipedia Scraper reads the official MediaWiki API and turns Wikipedia articles into a clean dataset: one row per article with title, URL, intro summary or full plain text, word count, categories and thumbnail. Search by keyword or pass exact titles, in any language edition, with no API key. Built for RAG pipelines, LLM training data and research.

  • Full article text as plain text (fullContent: true), ready to chunk and embed, or just the intro summary.
  • Up to 500 articles per run; a run that delivers no rows costs nothing.

Why use it

  • Summary or full content — flip fullContent off for a tight intro summary (great for cards, previews, embeddings of short chunks), or on for the entire article as clean plaintext (great for chunking into a RAG store or a training corpus).
  • Clean plaintext, not HTML — the MediaWiki explaintext extract strips tables and reference clutter, so you get readable prose.
  • Any language edition — set language to en, es, fr, de, ar, zh or any other edition's code to build multilingual datasets.
  • Rich metadata per article — word_count, up to 10 categories, a thumbnail_url, last_edited timestamp, and the canonical article url for attribution.
  • Resilient — content is fetched with retry/backoff; if Wikipedia is briefly unavailable the run exits cleanly with a status message and you're not charged for an empty run.

Use cases

  • RAG / retrieval systems — build a knowledge base for a chatbot or agent. Pull full-content articles on a topic, chunk them, embed them, and ground your LLM in factual, citable sources with a real URL for each.
  • LLM training / fine-tuning data — assemble a clean, deduplicated text corpus on any domain or in any language edition without scraping raw HTML.
  • Research & literature scans — grab the top 100 articles on a subject and get an overview with summaries and categories in minutes.
  • Content aggregation & enrichment — pull authoritative summaries, thumbnails, and categories to enrich a product catalog, a glossary, a news app, or an internal wiki.
  • Multilingual datasets — run the same query across en, es, fr, and more to build parallel or comparative corpora.

How to use it

  1. Enter a search query (e.g. artificial intelligence) — or leave it and provide a list of exact titles instead.
  2. Set the language edition (default en).
  3. Turn full article content on for the whole article text, or leave it off for the intro summary.
  4. Set max articles and run → get a clean, deduped article dataset.

Input

FieldTypeDescription
searchQuerystringA search term; returns the top matching articles. Use this or titles.
titlesarrayA list of exact article titles to fetch (e.g. ["Alan Turing", "Python (programming language)"]).
languagestringWikipedia language edition code (en, es, fr, de, ar, zh, …). Default en.
fullContentbooleanfalse (default) returns an intro summary; true returns the full content.
maxItemsintegerMax articles to return (1–500). Default 25.

You must provide at least one of searchQuery or titles.

Example input:

{
"searchQuery": "artificial intelligence",
"language": "en",
"maxItems": 25,
"fullContent": false
}

Output fields

FieldDescription
titleArticle title
pageidWikipedia page ID (stable identifier)
urlCanonical article URL (use for attribution)
summaryIntro extract — present when fullContent is false
contentFull article plaintext — present when fullContent is true
word_countWord count of the returned text
categoriesUp to 10 article categories
thumbnail_urlLead image thumbnail URL (if the article has one)
last_editedMediaWiki's touched timestamp for the page
languageLanguage edition of the article

JSON output sample

{
"title": "Artificial intelligence",
"pageid": 1164,
"url": "https://en.wikipedia.org/wiki/Artificial_intelligence",
"summary": "Artificial intelligence (AI) is the capability of computational systems to perform tasks typically associated with human intelligence, such as learning, reasoning, problem-solving, perception, and decision-making...",
"word_count": 142,
"categories": [
"Category:Artificial intelligence",
"Category:Cybernetics",
"Category:Computational fields of study"
],
"thumbnail_url": null,
"last_edited": "2026-07-07T06:31:50Z",
"language": "en"
}

Example output

A real sample from a live run (searchQuery: "artificial intelligence", en):

TitlepageidWordsURL
Artificial intelligence1164142https://en.wikipedia.org/wiki/Artificial_intelligence
Artificial general intelligence586357118https://en.wikipedia.org/wiki/Artificial_general_intelligence
A.I. Artificial Intelligence14222496https://en.wikipedia.org/wiki/A.I._Artificial_Intelligence

Use with AI agents & automation

Run from the Apify MCP server so AI agents (Claude, ChatGPT, Cursor) can pull Wikipedia articles as a tool call, schedule runs via Make, n8n, or Zapier to feed a vector database, or sync the dataset to Google Sheets. Clean flat JSON with a stable pageid and a source url drops into RAG and dataset pipelines with no glue code.


Pricing

Pay-per-event — charged per row delivered. The source data is the free public MediaWiki API (no proxy or third-party cost), so you only pay for the clean, structured rows you actually receive — no subscription, no charge for empty runs. You pay $0.002 per row on the Apify Free plan; paid Apify plans pay less, down to $0.001 per row.


FAQ

Can you scrape Wikipedia?

Yes, through the official MediaWiki API rather than Wikipedia's HTML pages: this actor sends a contact User-Agent, as Wikimedia's robot policy asks. Article text is licensed CC BY-SA, so you can reuse it, commercial and AI use included, if you attribute Wikipedia and share adaptations under the same license. See the Wikipedia reuse guidelines.

How do I scrape Wikipedia with Python?

Call this actor from Python with the apify-client package instead of calling the Wikipedia API yourself: pass searchQuery or titles, set fullContent to True for whole articles, and read the rows from the run's dataset. You need an Apify API token, not a Wikipedia key.

from apify_client import ApifyClient # apify-client 3.x
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("flash_scraper/wikipedia-scraper").call(run_input={
"searchQuery": "machine learning", "fullContent": True, "maxItems": 25})
items = client.dataset(run.default_dataset_id).list_items().items

How do I build a Wikipedia dataset for RAG?

Search a topic with fullContent on and maxItems up to 500, or list exact titles. Each article's plain text is in content, next to its url, pageid and word_count, so you can chunk, embed and cite it. Download the dataset as JSON or CSV, or read it through the Apify API.

Do I need a Wikipedia API key?

No. The MediaWiki API needs no key, and the actor calls it without one and without proxies. You pay this actor per row delivered: $0.002 on the Apify Free plan, down to $0.001 on paid plans, with no start fee, so a run that delivers no rows costs nothing.

How do I download a Wikipedia page as text?

Put the exact page title in titles, for example ["Alan Turing"], turn fullContent on and run. The row's content field holds the whole article as plain text, and the Output tab downloads it as JSON, CSV or Excel.

Which languages are supported?

Any Wikipedia language edition: set language to its code (en, es, fr, de, ja, ar, zh, …) and the actor queries that edition's own API, for example de.wikipedia.org for German.

Why did an exact title return nothing?

Titles are matched exactly: give the title as Wikipedia writes it, with the same capitalization, spelling and disambiguation such as (programming language). If unsure, use a searchQuery instead and let the search find the article.


Questions or a field you need added? Reach out via the Issues tab on the Actor's Apify Store page — happy to help.


More from Flash Scrape

Same publisher, same rules: no API keys, pay per row, filters run before billing.