Skip to content

About

Extract rendered web tables from any URL and export clean Excel files.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

33 Commits

Folders and files

Repository files navigation

Web Table Extraction

CI Node.js Playwright License PRs Welcome

Quick Start · Features · API · Limits · Roadmap · English | 中文

Web Table Extraction result preview

Extract rendered web tables from any URL, preview them, and export clean Excel files.

Web Table Extraction is a local web app for collecting tables from documentation pages, API references, data pages, and article pages. It renders the page with Playwright, analyzes native HTML tables plus common table-like structures, previews every detected table, and exports one Excel sheet per table.

It is designed for developers, analysts, researchers, and operators who often need to extract API parameter tables, error code tables, pricing tables, limit tables, or technical documentation tables from modern web pages.

Why

Copying tables from modern web pages is often unreliable: many pages are rendered by JavaScript, some tables are not real <table> elements, and manual copy-paste usually breaks rows, columns, and merged cells.

Web Table Extraction focuses on one practical job: open a URL, render the page, detect useful tables, preview them, and export a clean Excel workbook.

Keywords

web table extraction · HTML table extractor · Playwright table scraper · export web table to Excel · documentation table extraction · API docs table extractor · JavaScript rendered table extraction

Features

  • Render JavaScript-heavy pages before extraction.
  • Detect native <table> elements with rowspan and colspan handling.
  • Extract list-like key/value tables from documentation pages.
  • Parse Markdown pipe tables inside code blocks.
  • Preview multiple tables with tabs.
  • Export all tables or the current table to .xlsx.
  • Fall back to static HTML fetching when browser rendering fails.

Use Cases

  • Extract API parameter tables from developer documentation.
  • Export error code tables from AI model or cloud service docs.
  • Convert rendered documentation tables into Excel worksheets.
  • Collect pricing, limit, quota, or field-definition tables for analysis.
  • Preview and clean multiple tables from a single page before export.

Quick Start

npm install
npm start

Open:

http://localhost:4387

Then paste a URL that contains rendered web tables.

For a local demo page, open:

http://localhost:4387/demo.html

Then paste that demo URL into the extractor.

The demo page is bundled with the project, so you can test the full extraction flow without relying on an external website.

Screenshots

Home Extraction Result
Home screen Extraction result

Requirements

  • Node.js 18+
  • A Chromium-compatible browser available through Playwright or installed on the system

If Playwright browsers are not installed, run:

npx playwright install chromium

On Linux servers, you may also need:

npx playwright install-deps chromium

API

Extract Tables

POST /api/extract
Content-Type: application/json
{
  "url": "https://example.com/docs"
}

Response:

{
  "url": "https://example.com/docs",
  "title": "Example Docs",
  "extractedAt": "2026-07-01T00:00:00.000Z",
  "durationMs": 1200,
  "tables": [
    {
      "id": "table_1",
      "title": "Error Codes",
      "type": "html-table",
      "confidence": 0.98,
      "headers": ["Code", "Message", "Description"],
      "rows": [["400", "invalid_request", "The request is invalid"]]
    }
  ]
}

Export Excel

POST /api/export
Content-Type: application/json

Send the extraction result or a subset of its tables array. The response is an .xlsx file.

What It Handles

  • API parameter tables
  • Error code tables
  • Pricing or limit tables
  • Documentation tables rendered by SPAs
  • Markdown tables embedded in docs

Current Limits

  • It does not process PDF tables.
  • It does not perform OCR on screenshots or images.
  • It does not bypass login walls, captchas, or anti-abuse systems.
  • Some websites may block automated browser traffic.

How It Works

URL input
  -> Playwright renders the page
  -> DOM is cleaned
  -> native tables, list-like tables, and Markdown tables are extracted
  -> candidates are scored and deduplicated
  -> tables are previewed in the browser
  -> Excel workbook is generated

Project Structure

src/
  server.js              Express server and API routes
  extractor/
    browser.js           Playwright rendering and extraction orchestration
    nativeTable.js       Native HTML table extraction
    listTable.js         List-like table extraction
    textTable.js         Markdown table extraction
    excel.js             Excel workbook generation
    normalize.js         Shared cleaning, scoring, and normalization helpers
  public/                Browser UI

Development

npm run dev
npm test

Contributing

Issues and pull requests are welcome. Good first contributions include new table extraction fixtures, better scoring rules, Docker packaging, CLI support, and browser-extension experiments.

Roadmap

  • Add saved extraction history.
  • Add CLI batch extraction.
  • Add Docker packaging.
  • Add confidence explanations for each detected table.
  • Add a browser extension that extracts tables from the current tab.

FAQ

Can Web Table Extraction scrape JavaScript-rendered tables?

Yes. It uses Playwright to render the page before extracting tables, which makes it more reliable for SPA documentation sites than a simple HTML fetch.

Does it support exporting multiple tables?

Yes. Each detected table can be previewed in a tab, and exporting all tables creates one Excel sheet per table.

Does it extract tables from screenshots or PDFs?

No. The current scope is rendered web DOM extraction. OCR and PDF table extraction are intentionally out of scope.

Does it bypass login, captcha, or anti-bot protection?

No. It is a productivity tool for accessible web pages and does not bypass access controls.

What kinds of pages work best?

API docs, error code pages, pricing pages, technical documentation, article pages with embedded tables, and pages containing Markdown-style tables usually work well.

License

MIT

About

Extract rendered web tables from any URL and export clean Excel files.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages