API Docs/Data & Scraping
POST

Table Extractor API

Free Public API

Extract tabular data from complex web pages into clean CSV, JSON, and interactive data grids.

Try in Live Web Tool
POSThttps://api.headless-lender.com/api/v1/tables
Public: No Key Needed•Highest Free Quota: 1,000 Req/Mo + 10h Browsers (No Card Required)

Overview & Architecture

Automatically detect all HTML tables on dynamic web pages, parse headers and data rows, handle rowspans/colspans, and export as CSV downloads or structured JSON arrays.

Auto-detects all tables across dynamic pages
Direct CSV file download support
Clean JSON array with column header keys
Handles colspans, nested cells, and empty headers
Playwright Execution & Valkey Caching Pipeline

Because this endpoint utilizes full headless Chromium rendering, dynamic JavaScript and single-page apps (SPAs) are executed completely before conversion:

1. Cold Scrape (Cache MISS)~800ms – 2.5s

Chromium initializes, fetches the URL, executes client JavaScript, resolves DOM mutations, and generates output.

2. Repeat Request (Cache HIT)~5ms – 15ms

Returned instantly from Valkey/Redis cache with header X-Lender-Cache: HIT (15-minute TTL).

Code Integration Examples

Instant Public Endpoint: Zero configuration, no API key needed. Want our highest free quota? Get 1,000 free requests/month + 10 hours of cloud browsers with a free key (No credit card required).
curl -X POST https://api.headless-lender.com/api/v1/tables \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://en.wikipedia.org/wiki/List_of_countries_by_GDP_(nominal)"
  }'

Headers & Authentication Standard

1. Public Access (No Key)

No Authorization header required. Simply send a JSON POST request. Perfect for quick prototypes, small scripts, and low-volume scraping.

Content-Type: application/json

2. Free API Key (Highest Free Quota)

1,000 Req/Mo Free

Sign up in 10s with no credit card required. Unlocks 1,000 free monthly requests, 600 browser minutes (10 hours), 120 req/min burst limits, and cache-bypass controls.

Authorization: Bearer hl_live_your_api_key_here
Access ModeMonthly QuotaCloud Browser TimeBurst LimitCredit CardAction
Public AnonymousDaily IP Allowance5-min trial sandbox10 req/minNoneInstant (No Setup)
Free Account (Highest Quota)1,000 Req / Month600 Mins (10 Hours)120 req/minZero ($0 forever)Claim Free Key →

Request Body Parameters

FieldTypeRequiredDefaultDescription
urlstringrequired—Target website containing tables.
selectorstringoptional—Optional CSS selector targeting a specific table element.
waitUntil'domcontentloaded' | 'load' | 'networkidle'optional'domcontentloaded'Browser wait condition.

Response Schema & Example

200 OK — application/jsonDuration: ~800ms (Cold) / ~8ms (Cached)
{
  "url": "https://en.wikipedia.org/wiki/List_of_countries_by_GDP_(nominal)",
  "tableCount": 2,
  "tables": [
    {
      "index": 0,
      "caption": "GDP (nominal) by country",
      "headers": [
        "Country",
        "Region",
        "IMF Estimate (US$M)",
        "Year"
      ],
      "rowCount": 195,
      "rows": [
        [
          "United States",
          "Americas",
          "28,781,083",
          "2024"
        ],
        [
          "China",
          "Asia",
          "18,532,633",
          "2024"
        ],
        [
          "Germany",
          "Europe",
          "4,591,100",
          "2024"
        ]
      ],
      "csv": "Country,Region,IMF Estimate (US$M),Year\nUnited States,Americas,28781083,2024\nChina,Asia,18532633,2024"
    }
  ],
  "durationMs": 390
}