80trust / 100

Pdf Tables

by Tanod pdfpeek in Documents & files

x402 APIPassing, checked 4 h ago

pdfpeek (Tanod) PDF tables: the tables of up to 200 pages as JSON, CSV or XLSX.

POST https://tanod.dev/v1/pdf/tables

Last 30 days

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed

Uptime
100%
Response time
279 ms typical, 1.0 s slowest 5%
Last check
4 h ago
Next check
any minute now

How to call it

POST https://tanod.dev/v1/pdf/tables

Each call costs $0.01 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://tanod.dev/v1/pdf/tables
content-type: application/json

{
  "url": "https://tanod.dev/samples/tables-sample.pdf"
}

Parameters

ParameterTypeRequiredDescription
file_base64string or nullNoThe PDF as base64 (at most 10 MB decoded); or use url. Default: null.
formatstringNojson (default: every table with its page, box, header and rows), csv (one CSV file per table) or xlsx (one workbook, a sheet per table). One of: json, csv, xlsx. Default: "json".
pagesstring or nullNoPages to read (default all; at most 200 per call): N, N-M, N- (to the end), -M, last; comma separated, e.g. 1-5,9. Default: null.
urlstring or nullNoPublic http(s) URL of the PDF (at most 20 MB; private, internal and IP-literal hosts are refused); or use file_base64. Default: null.

Example response

The provider's example. We can't check it without paying.

Example response, 76 lines
{
  "format": "json",
  "input_bytes": 2963,
  "input_pages": 1,
  "operation": "tables",
  "pages_processed": 1,
  "pages_without_text": [],
  "table_count": 1,
  "tables": [
    {
      "bbox": [
        56,
        130,
        536,
        262
      ],
      "columns": 6,
      "header": [
        "Region",
        "Q1",
        "Q2",
        "Q3",
        "Q4",
        "Total"
      ],
      "index": 1,
      "method": "lines",
      "name": "page1-table1",
      "page": 1,
      "row_count": 5,
      "rows": [
        [
          "North",
          "1,204",
          "1,311",
          "1,402",
          "1,590",
          "5,507"
        ],
        [
          "South",
          "980",
          "1,015",
          "1,120",
          "1,205",
          "4,320"
        ],
        [
          "East",
          "1,512",
          "1,498",
          "1,630",
          "1,774",
          "6,414"
        ],
        [
          "West",
          "866",
          "902",
          "951",
          "1,040",
          "3,759"
        ],
        [
          "Total",
          "4,562",
          "4,726",
          "5,103",
          "5,609",
          "20,000"
        ]
      ]
    }
  ],
  "untrusted_content": true
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.01.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://tanod.dev/v1/pdf/tables' \
  -H 'content-type: application/json' \
  --data-raw '{"url":"https://tanod.dev/samples/tables-sample.pdf"}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://tanod.dev/v1/pdf/tables' \
  -H 'content-type: application/json' \
  --data-raw '{"url":"https://tanod.dev/samples/tables-sample.pdf"}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.01 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.01" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.01 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Ftanod.dev%2Fv1%2Fpdf%2Ftables&method=POST
const res = await pay("https://tanod.dev/v1/pdf/tables", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "url": "https://tanod.dev/samples/tables-sample.pdf"
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.01 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.01"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://tanod.dev/v1/pdf/tables",
        json={
            "url": "https://tanod.dev/samples/tables-sample.pdf",
        },
    )
    print(res.status_code, res.text)

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
4 h agoPassed402542 ms$0.01
8 h agoPassed402286 ms$0.01
11 h agoPassed402354 ms$0.01
15 h agoPassed402279 ms$0.01
19 h agoPassed402291 ms$0.01
23 h agoPassed402265 ms$0.01
27 h agoPassed4022.5 s$0.01
30 h agoPassed402271 ms$0.01
34 h agoPassed402340 ms$0.01
37 h agoPassed402282 ms$0.01
41 h agoPassed4021.0 s$0.01
45 h agoPassed402276 ms$0.01
2 days agoPassed402270 ms$0.01
2 days agoPassed402369 ms$0.01
2 days agoPassed402274 ms$0.01