{"uid":"cap_Qi7em8cf-JTK8TyEMjwW0","slug":"html-table-extractor-72bacc17","name":"HTML Table Extractor","description":"Convert HTML tables to row and column arrays with header detection; colspan and rowspan cells are expanded.","url":"https://markup-tools.x402tookit.com/html-tables?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"tableCount":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_zkc-a7xAippevNTxzXeUC","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts HTML tables into structured row/column arrays with header detection, expanding colspan and rowspan cells","exampleAgentPrompt":"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>'","exampleUseCases":[{"title":"Scraping financial data tables","prompt":"I just fetched the HTML from a stock screener page — can you pull out all the tables and give me the headers and rows so I can work with the data? Here's the HTML: '<table><thead><tr><th>Ticker</th><th>Price</th><th>Change</th></tr></thead><tbody><tr><td>AAPL</td><td>189.50</td><td>+1.2%</td></tr></tbody></table>'"},{"title":"Parsing complex merged-cell schedule","prompt":"This conference schedule HTML has a bunch of merged cells for sessions that span multiple time slots — can you extract all the tables and expand those rowspan and colspan cells so I get a clean row-by-row breakdown? Here's the HTML."},{"title":"Extracting comparison table from product page","prompt":"I have the raw HTML from a product comparison page with a big feature matrix table. Can you extract the table headers and all the rows so I can compare the features programmatically? The HTML is: '<table><tr><th>Feature</th><th>Basic</th><th>Pro</th></tr><tr><td>Storage</td><td>10GB</td><td>100GB</td></tr></table>'"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-02T12:31:01.500Z","isFirstParty":false,"canonicalSlug":"html-table-extractor-72bacc17"}