HTML Table Extractor
Pricing
from $1.50 / 1,000 results
Pricing
from $1.50 / 1,000 results
Rating
0.0
(0)
Developer
ben
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Share
HTML Table Extractor - Scrape Tables to Structured Rows
Extract HTML tables from public web pages and turn them into clean structured rows. The actor reads each target page, finds every <table>, detects header cells, normalizes the body rows, and returns one dataset item per table with the headers, row count, column count, and row objects ready for export. Export to JSON/CSV/Excel, run on a schedule, call via API, or connect to Make, Zapier or n8n.
What is the HTML Table Extractor?
The HTML Table Extractor is a focused utility for pages where useful data is already published in table form but is awkward to copy or automate. Common examples include public directories, statistics pages, comparison pages, government pages, pricing pages, documentation pages, sports tables, release matrices, event schedules, and static reports. Instead of saving the page manually and cleaning the table in a spreadsheet, paste the URLs and let the actor return machine-readable rows.
The actor uses direct HTTP requests and a lightweight parser, not a browser. That keeps runs fast, inexpensive, and reliable for daily scheduled checks. It is best for server-rendered HTML tables. If a website builds its table only after heavy client-side JavaScript, use a browser-based scraper first or paste a URL where the table exists in the returned HTML.
Because the output is already normalized into row objects, it is useful even when the original page contains several unrelated tables. You can filter by table_index, keep the table with the expected headers, or join the result with a URL inventory from another actor. For repeatable work, run it with a saved task and export only the columns your workflow needs.
What data does it extract?
- Source input URL and final redirected URL
- Domain name
- Table index on the page
- Number of extracted rows
- Number of detected columns
- Header names from
<th>cells when available - Generated column names when no header row exists
- Rows as clean key-value objects
- Nested table text collapsed into readable cell text
Input
| Field | Type | Description |
|---|---|---|
urls | array | Web pages to scan for HTML tables. |
maxTables | integer | Maximum number of tables to return from each URL. |
Example input
{"urls": ["https://www.w3schools.com/html/html_tables.asp","https://example.com/report.html"],"maxTables": 10}
Output
Each dataset item represents one table. The rows field contains the normalized records.
{"input": "https://www.w3schools.com/html/html_tables.asp","url": "https://www.w3schools.com/html/html_tables.asp","final_url": "https://www.w3schools.com/html/html_tables.asp","domain": "www.w3schools.com","table_index": 1,"row_count": 6,"column_count": 3,"headers": ["Company", "Contact", "Country"],"rows": [{"Company": "Alfreds Futterkiste","Contact": "Maria Anders","Country": "Germany"}]}
Use cases
- SEO and content audits: collect tables from competitor pages, documentation, pricing pages, and comparison articles.
- Research automation: turn public statistical tables into CSV without manual spreadsheet cleanup.
- Monitoring: schedule repeated runs against pages that update tables weekly or monthly.
- Data enrichment: combine extracted tables with other Apify actors in Make, Zapier, n8n, or your own API workflow.
Practical tips
Start with a small URL list and inspect the first run before scaling. Some websites place layout tables, navigation tables, or hidden accessibility tables before the useful data table. The table_index, headers, row_count, and column_count fields help you identify which table you want. If you need only one table from a page, set maxTables low to reduce output noise.
For best results, target URLs that return the finished table in the initial HTML. Public reference pages, government sites, documentation pages, and old-style report pages usually work very well. Pages that load table rows from a JSON API after the browser opens may require a site-specific API actor or a browser actor.
Reliability and performance
The actor intentionally avoids browser rendering and heavy dependencies. That makes it inexpensive, fast to start, and suitable for Apify schedules. It follows redirects, uses a normal browser-like user agent, limits the parsed HTML size to keep memory predictable, and continues with the next URL if one page fails.
FAQ
Does it handle multiple tables on one page? Yes. Each table becomes one dataset item with its own table_index.
Does it keep the table headers? Yes when the first row uses <th> cells. If not, the actor creates column_1, column_2, and so on.
Does it use a browser? No. It uses direct HTTP requests for speed and reliability.
Can it scrape JavaScript-rendered tables? Only if the table appears in the HTML response. For fully client-rendered pages, use a browser actor or the site's API.
Can I export the result to Excel? Yes. Apify datasets export to JSON, CSV, Excel, XML, and RSS.
Can I run it on a schedule? Yes. Add the actor to an Apify schedule and point it at the URLs you want to monitor.
Is it legal? The actor reads public web pages. You are responsible for respecting website terms, robots directives, rate limits, and applicable privacy laws.
What if a table has merged cells? The actor extracts visible cell text into the row order. Complex rowspans and colspans may need post-processing.
How is billing calculated? Pay-per-event billing charges once per extracted table pushed to the dataset.
Can it preserve links inside cells? This version extracts visible text. If you need link-level extraction from table cells, combine it with a custom follow-up step or request a tailored version.
Can I use it for competitor price tables? Yes, as long as the table is public and present in the HTML response.
You might also like
- Website Contact Extractor
- Meta Tags Extractor
- Schema Markup Extractor
- Webpage Text Extractor
- Sitemap URL Extractor
Keywords: html table scraper, table extractor, scrape tables, web table to csv, html to json, table parser, data extraction, public data scraper, spreadsheet automation, website data extraction, Apify table scraper, no code scraper, SEO tools, research automation, structured data extraction