Wikipedia Scraper [$0.7πŸ’° / 1k] avatar

Wikipedia Scraper [$0.7πŸ’° / 1k]

Pricing

from $0.70 / 1,000 results

Go to Apify Store
Wikipedia Scraper [$0.7πŸ’° / 1k]

Wikipedia Scraper [$0.7πŸ’° / 1k]

Extract structured data from Wikipedia articles only $0.7/1k: infobox fields, section headings, tables, and raw wikitext. Uses Wikipedia REST API for structured data. Supports all language editions. Ideal for researchers, educators, AI trainers, and knowledge graph builders

Pricing

from $0.70 / 1,000 results

Rating

0.0

(0)

Developer

Ahmed Jasarevic

Ahmed Jasarevic

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

Wikipedia Scraper

Extract structured data from Wikipedia articles including full article text, infobox fields, section headings, tables, and raw wikitext. Built for researchers, educators, AI trainers, and knowledge graph builders who need clean, structured Wikipedia data at scale.

Try on Apify

What does Wikipedia Scraper do?

Wikipedia Scraper extracts structured data from any Wikipedia article using a hybrid approach: it leverages the official Wikipedia REST API for structured data (infoboxes from wikitext templates, section hierarchy from TOC) and CheerioCrawler for HTML-based extraction (article text, tables, fallback parsing). This dual strategy ensures maximum data completeness and reliability.

Key features:

  • πŸ“„ Full article text – Clean plain text of the whole article plus per-section texts with TOC-style numbering
  • πŸ“‹ Infobox extraction – Parses template parameters from raw wikitext for clean key-value pairs (supports both Infobox and Sidebar templates)
  • πŸ“‘ Section headings – Full hierarchy (h2–h6) with anchor IDs and section numbers from API TOC
  • πŸ“Š Tables – Extracts wikitable and infobox tables with headers and typed rows
  • πŸ“ Raw wikitext – Optional full article wikimarkup for custom processing
  • 🌐 Multi-language – Supports all Wikipedia language editions (en, de, fr, es, etc.)
  • ⚑ Fast & cheap – CheerioCrawler (no browser) + API calls = minimal compute units
  • πŸ”’ Proxy rotation – Routes through Apify proxies when available

Why use Wikipedia Scraper?

Use CaseBenefit
AI/ML training dataClean, structured JSON ready for fine-tuning or RAG pipelines
Knowledge graphsInfobox fields map directly to entity attributes (birth date, occupation, etc.)
Research & educationBatch-extract thousands of articles for literature reviews or curricula
Data enrichmentAugment your datasets with authoritative Wikipedia metadata
Content analysisSection hierarchy enables document structure analysis

How to use Wikipedia Scraper

  1. Add URLs – Paste Wikipedia article URLs (any language) into the Start URLs field
  2. Choose fields – Toggle extraction options: Article Text, Infobox, Sections, Tables, Wikitext
  3. Set limits – Configure max items per field (infobox fields, section depth, tables)
  4. Run – Click Start and download results as JSON, CSV, Excel, or via API

Input Example

{
"startUrls": [
{ "url": "https://en.wikipedia.org/wiki/Albert_Einstein" },
{ "url": "https://en.wikipedia.org/wiki/Quantum_mechanics" }
],
"extractMainText": true,
"extractInfobox": true,
"extractSectionHeadings": true,
"extractTables": true,
"extractWikitext": false,
"maxInfoboxFields": 50,
"maxSectionDepth": 3,
"maxSectionTextLength": 50000,
"maxTables": 20,
"language": "en"
}

Output

Each article produces one dataset item with this structure:

{
"url": "https://en.wikipedia.org/wiki/Albert_Einstein",
"title": "Albert Einstein",
"pageTitle": "Albert_Einstein",
"language": "en",
"infobox": {
"birth_date": "14 March 1879",
"birth_place": "Ulm, Kingdom of WΓΌrttemberg, German Empire",
"death_date": "18 April 1955",
"fields": "Physics",
"known_for": "General relativity, Special relativity, Photoelectric effect, E=mcΒ²..."
},
"infoboxTemplates": [
{
"templateName": "scientist",
"fields": { "birth_date": "...", "death_date": "...", ... }
}
],
"sectionHeadings": [
{ "level": 1, "title": "Life and career", "id": "Life_and_career", "number": "1" },
{ "level": 2, "title": "Childhood, youth and education", "id": "Childhood,_youth_and_education", "number": "1.1" }
],
"sections": [
{ "level": 0, "title": "", "number": "", "text": "Albert Einstein (14 March 1879 – 18 April 1955) was..." },
{ "level": 1, "title": "Life and career", "number": "1", "text": "..." }
],
"mainText": "Albert Einstein (14 March 1879 – 18 April 1955) was... \n\n Life and career...",
"textStats": { "words": 8377, "chars": 52723 },
"tables": [
{
"caption": "Nobel Prize laureates in Physics",
"headers": ["Year", "Laureate", "Country", "Rationale"],
"rows": [
{ "Year": "1921", "Laureate": "Albert Einstein", "Country": "Germany", "Rationale": "..." }
]
}
],
"wikitext": "{{Short description|...}}\n{{Infobox scientist\n| image = ...\n...",
"userType": "PAID",
"freeLimit": 10,
"crawledAt": "2026-08-22T10:30:00.000Z"
}

Data Table

FieldTypeDescription
urlstringSource article URL
titlestringDisplay title from HTML
pageTitlestringURL-encoded page title
languagestringWikipedia language code
infoboxobjectFlattened key-value pairs from all infobox templates
infoboxTemplatesarrayIndividual templates with names and fields
sectionHeadingsarray[]Hierarchical sections with level, title, anchor, number
sectionsarray[]Per-section plain text with level, title, and TOC number
mainTextstringFull article text (lead + all sections joined)
textStatsobjectWord and character counts of mainText
tablesarray[]Tables with caption, headers, and row objects
wikitextstringRaw wikimarkup (optional)
crawledAtISO dateExtraction timestamp

Pricing / Cost Estimation

PlanCost per 1,000 articles*
Free tier10 articles free, then upgrade
Apify Starter ($49/mo)~$0.50 (β‰ˆ2,000 CU)
Apify Scale ($499/mo)~$0.10 (included CU)

*Estimates based on typical article (~50 KB HTML + 2 API calls). Actual cost depends on article size, table count, and proxy usage. Free users limited to 10 articles per run.

Tips & Advanced Options

  • Use API mode (default) – Faster and more reliable for infoboxes/sections
  • Increase maxSectionDepth to 4–5 for deep articles (biographies, histories)
  • Enable extractWikitext only when needed – adds ~20 KB per article
  • Batch URLs – Submit 100+ URLs per run for best throughput
  • Schedule runs – Use Apify Scheduler for daily/weekly knowledge base updates

FAQ, Disclaimers & Support

⚠️ Legal: Wikipedia content is licensed under CC-BY-SA 3.0. You may scrape and reuse data with attribution. See Wikimedia Terms of Use.

πŸ”§ Limitations:

  • Sitemap access is restricted by Wikimedia (no bulk discovery via sitemap)
  • Very long articles (>2 MB) may hit request timeouts
  • Some infobox templates use complex nested structures not fully flattened
  • Overview-style articles (e.g. "Artificial intelligence") have no true infobox – their navigation sidebar is extracted as title / content1…contentN fields instead

πŸ› Issues & Feature Requests: GitHub Issues or Apify Console Issues tab

πŸ’‘ Custom Solutions: Need Wikidata integration, category crawling, or revision history? Contact us for custom Actor development.


Built with Crawlee + Apify SDK β€’ Runs on Apify Platform with residential proxy rotation