HTML Table Extractor: Web Tables to CSV, JSON, Excel
Pricing
from $0.47 / 1,000 extracted tables
HTML Table Extractor: Web Tables to CSV, JSON, Excel
Extract HTML tables from web pages or raw HTML into JSON rows keyed by header, with optional CSV and Excel files: colspan/rowspan, header detection, number cleanup, robots.txt respected. Empty input = free demo. Failed pages are free.
Pricing
from $0.47 / 1,000 extracted tables
Rating
0.0
(0)
Developer
Actor Factory
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Features
Share
Turns the tables on web pages into clean rows (and CSV or Excel files), one dataset row per table row. Built for analysts, researchers and developers who need the data from an HTML table (a Wikipedia list, a price page, a standings table, a report) in a spreadsheet or a database, and are tired of copy-pasting, broken merged cells and header rows that come out as data. Plain HTTP, no browser, no login, no API key.
Try it free: leave input empty and press Start. The demo extracts two tables from a bundled sample page (one with a two-row header and merged cells) and is not charged (rows carry _demo: true).
| Region | Revenue Q1 | Revenue Q2 | _sourceUrl | _tableIndex | _rowIndex |
|---|---|---|---|---|---|
| North | $1,200.50 | $1,450.00 | https://example.com/sample-report | 0 | 0 |
| South | $980.00 | $1,010.25 | https://example.com/sample-report | 0 | 1 |
What you get
- One dataset row per table row, keyed by the column header, plus
_sourceUrl,_tableIndexand_rowIndex(all 0-based; the header row is not counted) - Header detection:
theador leadingthrows; multi-row headers are merged (Revenue Q1); empty names becomecolumn_N, duplicates get a_2suffix; or force first-row / no header - colspan and rowspan expanded, so every row is complete (the merged value is repeated, or left empty if you prefer)
- Number cleanup (optional):
$1,234.50becomes1234.5,12%becomes12,(5)becomes-5; text, dates and IDs with leading zeros stay as they are - Pick tables: CSS selector (
table.wikitable,#prices), table indexes, minimum row count, maximum tables per page - CSV and Excel files (optional): one file per table in the key-value store; the
TABLESrecord lists the keys, columns and row counts - Inputs: page URLs, raw HTML strings, or both in one run
- Footnote marks such as
[1]on Wikipedia are dropped from cell text
Polite by design
Only the URLs you give are fetched (no crawling, no login, no JavaScript, no proxy tricks). robots.txt is respected by default (disallowed pages are skipped and free). One request at a time per host, at least 1 second apart, retries with backoff (1, 2, 4 seconds, or the server's Retry-After) for timeouts, 429 and 502/503/504. The User-Agent identifies a generic bot. Internal and private addresses are refused. Pages over 5 MB are refused.
Price
$0.0067 per run with results, plus $0.67 per 1,000 tables ($0.00067 per table extracted, whatever its number of rows). One run with 1 table costs $0.00737; a run with 1,000 tables costs $0.6767.
The run fee is charged once, together with the first extracted table. Failed fetches, pages blocked by robots.txt, pages without tables and the demo are free, and a run where nothing is extracted costs nothing.
Set a maximum cost per run to cap spend: when it is reached the run stops cleanly (status Succeeded) and STATS says so (stoppedAtChargeLimit: true).
Input
| Field | What it does |
|---|---|
urls | Page URLs with tables |
htmlStrings, baseUrl | Raw HTML (and the label written to _sourceUrl) |
tableSelector, tableIndexes | Which tables to keep |
minRows, maxTablesPerPage | Skip tiny tables; cap tables (and cost) per page |
headerMode | auto, first_row, none |
fillSpans | Repeat merged cells (default on) |
numericCleanup | Convert numbers (default off) |
saveCsv, saveXlsx | Save each table as a file |
respectRobotsTxt | Default on |
maxRetries, timeoutSecs, concurrency, userAgent | Fetching options |
Example input:
{"urls": ["https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_by_population"],"tableSelector": "table.wikitable","maxTablesPerPage": 1,"numericCleanup": true,"saveCsv": true}
Output
Dataset: one item per table row, for example
{"Region": "North", "Revenue Q1": 1200.5, "Revenue Q2": 1450, "_sourceUrl": "https://example.com/report", "_tableIndex": 0, "_rowIndex": 0}
Key-value store: TABLES (one entry per table: source, index, caption, rows, columns, file keys), STATS (counts and errors by code) and, if requested, the table-*.csv / table-*.xlsx files.
Error codes in STATS.errors: http_404 and other statuses, blocked_by_robots_txt, robots_txt_unavailable, timeout, dns_failure, page_too_large, unsupported_content_type, invalid_url, blocked_private_address, invalid_selector, no_tables_found.
Good to know
- Static HTML only. Tables that a page builds with JavaScript after loading are not in the HTML this Actor reads.
- You are responsible for the terms of use of the sites you extract from and for what you do with the data. This Actor fetches only the URLs you provide.
_tableIndexcounts the tables matched by your selector (all tables if none), in document order.
More tools from the same developer
- HTML to Markdown Converter for LLM and RAG — clean Markdown from URLs, raw HTML or datasets for LLM and RAG
- CSV to Excel Converter — convert CSV, TSV, Excel XLSX, JSON and NDJSON files or Apify datasets into each other
- Website to Markdown Crawler for RAG and LLMs — crawl a website and get every page as clean Markdown for RAG and LLMs, robots.txt respected, optional chunks
- JSON to CSV Converter — turn nested JSON files or datasets into one flat CSV file