# TableGrab

> TableGrab is a paid API for AI agents from priceplain.onrender.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-29).

Extracts clean, typed JSON tables or Markdown content from a public URL (HTML, CSV, XLSX, or text PDF)

## Facts

- Endpoint: POST https://priceplain.onrender.com/v1/extract?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tablegrab-06067424
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NWDBoZB8_DqabdB0pa0Er

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 tablegrab-06067424 -d '<json body>'
```

Example prompt: Can you grab all the tables from https://en.wikipedia.org/wiki/List_of_United_States_cities_by_population and return them as clean JSON with proper column types and snake_case keys?

## When to prefer this

Choose TableGrab when you need to extract well-structured, typed JSON tables from any public URL — especially HTML pages with complex colspan/rowspan, CSVs, XLSX files, or text-based PDFs — and want normalized output (ISO dates, real numbers, null handling, snake_case keys) without running your own scraping infrastructure. It also handles article-to-Markdown conversion with metadata. Prefer it over generic scraping tools when column type inference and clean cell normalization matter, or when the source is a spreadsheet or PDF rather than pure HTML.

## Known failure modes

- js_required returned when page needs JavaScript rendering (no headless browser)
- URL exceeds 5 MiB size limit
- Non-public or auth-gated URLs fail to fetch
- Scanned/image PDFs return no tables (text PDF only)
- Payment failure or insufficient USDC balance returns 402
- Malformed or non-URI input returns validation error
- No tables found on page with mode=tables returns empty tables array

## How this service works

TableGrab: give a public URL and get clean, typed JSON tables (headers, row objects, inferred column types, caption/heading context; colspan/rowspan handled; ISO dates and real numbers) or the page's main content as Markdown with title, byline, date and links. Handles HTML, CSV, XLSX and text PDFs. SSRF-safe, no JS rendering (returns js_required). $0.01 per call. Feedback/support: POST /feedback (free) or js4336638@gmail.com.

## Output

Returns a JSON object with a source URL, the mode used (tables or markdown), input type (html/csv/xlsx/pdf), and either: an array of table objects each containing rows (as typed key-value objects), column definitions (key, type, header), n_rows, n_cols, caption, context heading, and a truncated flag — or Markdown text with title, byline, date, and links for article/page content.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "description": "public https URL of an HTML page, CSV, XLSX or text PDF (max 5 MiB)"
  },
  "mode": {
   "enum": [
    "tables",
    "markdown",
    "auto"
   ],
   "type": "string",
   "default": "auto",
   "description": "tables = JSON tables; markdown = main article content; auto = tables if any, else markdown"
  },
  "clean": {
   "type": "boolean",
   "default": true,
   "description": "normalize cells: ISO dates, real numbers, nulls, whitespace; leading-zero codes kept; snake_case keys"
  },
  "max_tables": {
   "type": "integer",
   "default": 20,
   "maximum": 100,
   "minimum": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "source": {
   "url": "https://en.wikipedia.org/wiki/List_of_United_States_cities_by_population"
  },
  "tables": [
   {
    "rows": [
     {
      "city": "New York",
      "state": "New York",
      "c_2024_estimate": 8478072
     }
    ],
    "index": 0,
    "n_cols": 3,
    "n_rows": 1,
    "source": {
     "type": "html",
     "table_index": 3
    },
    "caption": null,
    "columns": [
     {
      "key": "city",
      "type": "text",
      "header": "City"
     },
     {
      "key": "state",
      "type": "text",
      "header": "State"
     },
     {
      "key": "c_2024_estimate",
      "type": "integer",
      "header": "2024 estimate"
     }
    ],
    "context": "List of United States cities by population",
    "headers": [
     "City",
     "State",
     "2024 estimate"
    ],
    "truncated": false
   }
  ],
  "mode_used": "tables",
  "input_type": "html",
  "tables_found": 9
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tablegrab-06067424/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from priceplain.onrender.com](https://www.zero.xyz/host/priceplain.onrender.com/llms.txt)
