{"uid":"cap_26kpKcr2awda3V0UmXnWl","slug":"agent-data-tools-revmesh2074-workers-dev-html-table-to-json-extractor-af23e0ef","name":"HTML Table to JSON Extractor","description":"Extract every table from an HTML fragment into JSON: header cells become keys and each body row an object (or raw arrays when there is no header row), with captions, colspans repeated and entities decoded. Give the HTML itself (up to 500 KB). Use to turn web or email tables into data an agent can sort and compute on; to fetch a page first use extract.","url":"https://agent-data-tools.revmesh2074.workers.dev/html/table-to-json?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["html"],"properties":{"html":{"type":"string","description":"HTML containing one or more <table> elements (up to 500 KB)"}}},"responseSchema":{"type":"object","properties":{"count":{"type":"number"},"tables":{"type":"array","items":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"City":{"type":"string"},"Pop.":{"type":"string"}}}},"caption":{},"headers":{"type":"array","items":{"type":"string"}}}}}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USD","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_m511LVTEh_A-mllkWSudf","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"agent-data-tools.revmesh2074.workers.dev","brandSlug":"agent-data-tools-revmesh2074-workers-dev-x402","brandBaseUrl":"https://agent-data-tools.revmesh2074.workers.dev","brandDocsUrl":null,"whatItDoes":"Parses HTML fragments and extracts all <table> elements into structured JSON objects with headers as keys and rows as data.","exampleAgentPrompt":"I just fetched some HTML from a Wikipedia page and it has a big comparison table in it — can you extract all the tables from this HTML and give me the data as JSON so I can sort and filter it? Here's the HTML: <table><thead><tr><th>Country</th><th>GDP</th></tr></thead><tbody><tr><td>USA</td><td>25T</td></tr></tbody></table>","exampleUseCases":[{"title":"Financial data from email report","prompt":"I got an HTML email with quarterly revenue tables in it — can you pull all the tables out of this HTML and give me the numbers as JSON so I can compare the figures?"},{"title":"Wikipedia comparison table extraction","prompt":"Here's the raw HTML from a Wikipedia page about electric vehicles — extract all the tables from it so I can sort the specs by range and battery capacity."},{"title":"Sports standings from web page","prompt":"I have the HTML source of an ESPN standings page — can you parse out all the tables and give me the team names, wins, and losses as structured JSON I can run calculations on?"}],"resultDescription":"Returns a JSON object with a 'count' field indicating how many tables were found, and a 'tables' array where each entry contains: a 'headers' array of column names derived from <th> cells, a 'rows' array of objects (where header cells become keys) or raw arrays if no header row exists, and a 'caption' field if the table has a <caption> element. Colspans are repeated and HTML entities are decoded.","failureModes":["HTML exceeds 500 KB limit — request rejected","No <table> elements found in HTML — returns count:0 and empty tables array","Malformed HTML may result in partial extraction or empty rows","Tables with complex merged cells may produce unexpected repeated values due to colspan repetition","Very deeply nested tables may not parse correctly"],"whenToPreferThis":"Use this endpoint when you have raw HTML already in hand (fetched via a separate page-read tool) and need to extract tabular data into machine-readable JSON for sorting, filtering, or computation. It handles multiple tables per fragment, decodes HTML entities, and repeats colspan cells so the output aligns with visual column structure. Prefer this over generic HTML parsers when your goal is specifically row/column tabular data with proper header-to-key mapping.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-01T06:54:28.725Z","isFirstParty":false,"canonicalSlug":"agent-data-tools-revmesh2074-workers-dev-html-table-to-json-extractor-af23e0ef"}