# HTML Table Extractor

> HTML Table Extractor is a paid API for AI agents from markup-tools.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-02).

Converts HTML tables into structured row/column arrays with header detection, expanding colspan and rowspan cells

## Facts

- Endpoint: GET https://markup-tools.x402tookit.com/html-tables?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/html-table-extractor-72bacc17
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Qi7em8cf-JTK8TyEMjwW0

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability html-table-extractor-72bacc17
```

Example prompt: Parse all the tables in this HTML snippet and give me the headers and row data as structured arrays, expanding any merged cells: '<table><tr><th colspan="2">Name</th></tr><tr><td>Alice</td><td>Bob</td></tr></table>'

## When to prefer this

Use this endpoint when you need to extract structured tabular data from raw HTML, especially when tables contain merged cells (colspan/rowspan) that would otherwise be misaligned. Prefer this over generic HTML-to-text conversion when you need column-aligned, header-aware table data rather than free-form text. Ideal for web scraping workflows where you receive raw HTML and need machine-readable table contents without writing custom parsing logic.

## Known failure modes

- HTML longer than 20,000 characters returns 400 Bad Request
- More than 20 tables, 300 rows, or 40 columns causes truncation flags to be set rather than failure
- Malformed or non-table HTML returns empty tables array
- Missing required 'html' query parameter returns 400
- No tables found in HTML returns empty array with tableCount 0

## How this service works

Convert HTML tables to row and column arrays with header detection; colspan and rowspan cells are expanded.

## Output

Returns an array of table objects, each containing: detected headers (array of strings), rows (2D array of strings with merged cells already expanded), caption, row count, column count, header row count, nested table count, and flags for truncated rows or columns. Also includes a top-level table count, summary, and any degraded/disclaimer notices. Up to 20 tables, 300 rows, and 40 columns per table are extracted.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "html"
     ],
     "properties": {
      "html": {
       "type": "string",
       "description": "HTML containing tables, up to 20000 characters (longer is refused with 400); first 20 tables, 300 rows, 40 columns each"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "tables": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "rows": {
          "type": [
           "array",
           "null"
          ],
          "items": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         },
         "caption": {
          "type": [
           "null",
           "string"
          ]
         },
         "headers": {
          "type": [
           "array",
           "null"
          ],
          "items": {
           "type": "string"
          }
         },
         "rowCount": {
          "type": [
           "null",
           "number"
          ]
         },
         "headerRows": {
          "type": [
           "null",
           "number"
          ]
         },
         "columnCount": {
          "type": [
           "null",
           "number"
          ]
         },
         "nestedTables": {
          "type": [
           "null",
           "number"
          ]
         },
         "truncatedCols": {
          "type": [
           "boolean",
           "null"
          ]
         },
         "truncatedRows": {
          "type": [
           "boolean",
           "null"
          ]
         }
        }
       }
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
     
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/html-table-extractor-72bacc17/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from markup-tools.x402tookit.com](https://www.zero.xyz/host/markup-tools.x402tookit.com/llms.txt)
