Wikipedia Table Extractor avatar

Wikipedia Table Extractor

Pricing

from $0.50 / 1,000 results

Go to Apify Store
Wikipedia Table Extractor

Wikipedia Table Extractor

Extract structured data from Wikipedia tables as clean JSON. Supports all languages, multiple tables and header detection. Ideal for AI training data and research.

Pricing

from $0.50 / 1,000 results

Rating

0.0

(0)

Developer

Muhammad Naufal

Muhammad Naufal

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

0

Monthly active users

3 hours ago

Last modified

Share

📗 Wikipedia Data Scraper

Extract tables from any Wikipedia page as clean JSON. Supports wikitable, infobox, sortable, and various Wikipedia table layouts.

Features

  • Table extraction — wikitable, infobox, sortable, toccolours, plain tables
  • colspan/rowspan — merged cells properly replicated
  • Page metadata — categories, short description, last-modified, infobox key-values
  • Section context — nearest h2/h3 heading for each table
  • Link extraction — href links from anchor elements within cells
  • Multiple tables — extract one or all tables on a page
  • Dict or array — column-header keys or positional col0/col1 format

Sample output

{
"page": "https://en.wikipedia.org/wiki/List_of_largest_companies_by_revenue",
"title": "List of largest companies by revenue - Wikipedia",
"tablesFound": 3,
"totalRows": 5,
"metadata": {
"categories": ["Lists of companies by revenue", "Economic lists"],
"description": "Wikimedia list article"
},
"tables": [
{
"tableIndex": 0,
"tableType": "data",
"section": "2024 list",
"headers": ["rank", "company", "country"],
"count": 5,
"rows": [
{"_rowNumber": 1, "rank": "1", "company": "Walmart", "country": "United States", "url": "https://en.wikipedia.org/wiki/List_of_largest_companies_by_revenue"},
{"_rowNumber": 2, "rank": "2", "company": "Saudi Aramco", "country": "Saudi Arabia", "url": "https://en.wikipedia.org/wiki/List_of_largest_companies_by_revenue"}
]
}
]
}

Input

FieldTypeDefaultDescription
pageUrlstringList of largest companiesFull Wikipedia URL
tableIndexinteger0Which table (0 = first)
maxResultsinteger20Max rows per table
outputFormatstringdictdict (headers as keys) or array
includeHeaderbooleanfalseInclude header row?
allTablesbooleanfalseExtract all tables?
extractMetadatabooleantruePage categories, description, infobox, last-modified
includeLinksbooleanfalseExtract href links from anchor elements
sectionContextbooleanfalseInclude nearest h2/h3 heading per table

Pricing

$0.001 per result ($0.50 per 1k rows).