# HTML Tables to JSON Converter

> HTML Tables to JSON Converter is a paid API for AI agents from toolshed.lemon-agent.dev, paid per call via x402, $0.006/call, status unknown (last checked 2026-09-14).

Converts HTML pages into structured JSON by extracting all <table> elements into row objects keyed by header cells

## Facts

- Endpoint: POST https://toolshed.lemon-agent.dev/convert/html-json
- Price: $0.006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/html-tables-to-json-converter-810e081d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qWriMiZ-mKENCf13tUcu7

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-tables-to-json-converter-810e081d -d '<json body>'
```

Example prompt: I have an HTML page with product pricing tables — can you extract all the tables from it and give me the data as JSON, with each row as an object keyed by the column headers?

## When to prefer this

Use this endpoint when you need to extract one or more HTML tables from a page into machine-readable JSON in a single call, with each row represented as a named-key object. It is especially useful for web scraping pipelines, data migration, or any workflow where HTML table content needs to be consumed programmatically. Prefer it over general HTML-to-text converters when you specifically need structured row/column data rather than prose. Note that it does not expand colspan/rowspan, so prefer alternative approaches for complex merged-cell tables.

## Known failure modes

- No <table> element found in the submitted HTML — endpoint refuses the request with an error
- HTML body exceeds 256 KB limit — request rejected
- Malformed or non-HTML input body — parsing may fail or return empty tables array
- colspan and rowspan cells are not expanded — merged cells may produce missing or misaligned keys in row objects
- Tables without <th> header cells may yield empty or numeric column keys
- Input HTML with deeply nested or non-standard table markup may produce unexpected column assignments

## How this service works

HTML tables to JSON. POST an HTML page; the response is {"tables": [{caption, columns, rows}]} — every <table> read into row objects keyed by its header cells, in the same shape whether the page has one table or nine. Values stay strings with whitespace collapsed. colspan and rowspan are NOT expanded, and a page with no table is refused.

## Output

A JSON object with a top-level 'tables' array. Each element contains 'caption' (the table's caption text or null), 'columns' (an array of header cell strings), and 'rows' (an array of objects where each key is a column header and each value is the cell's string content with whitespace collapsed). All tables on the page are returned in document order. Pages with no tables are rejected with an error.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "const": "POST"
    },
    "bodyType": {
     "type": "string",
     "const": "text"
    },
    "body": {
     "type": "string",
     "description": "the raw HTML file as the request body, up to 256 KB",
     "maxLength": 262144
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "text"
    },
    "format": {
     "type": "string",
     "const": "application/json",
     "description": "the converted JSON file as the response body (application/json)"
    },
    "example": {
     "type": "string",
     "description": "the sample request body above, converted — what a the converted JSON file as the response body (application/json) looks like"
    }
   },
   "required": [
    "type",
    "format"
   ],
   "additionalProperties": false
  }
 },
 "required": [
  "input"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/html-tables-to-json-converter-810e081d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from toolshed.lemon-agent.dev](https://www.zero.xyz/host/toolshed.lemon-agent.dev/llms.txt)
