MERCURY
UniversityDocsExtractCited Table

Mercury · Cited Table

Extract$0.006 / callLivex402API key

GET /buy/table

What it does

URL in → the page's main HTML <table>(s) parsed into typed, header-keyed rows (JSON) + clean RFC-4180 CSV, with a signed provenance receipt over the exact extracted grid. Deterministic, keyless, no LLM — x402, USDC on Base mainnet.

The goal it serves: turn a page into a typed record an agent can act on, with the signed receipt proving the fields are exactly what Mercury resolved from the source — deterministic, keyless, no LLM.

Schemas & output preview

Input schema — the exact request shape the route validates.

json · input schema
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "maxLength": 2048,
      "description": "the page to extract tables from (http/https)"
    },
    "table": {
      "type": "string",
      "maxLength": 8,
      "description": "optional: 0-based index of a SINGLE table to return (document order). Omit to return ALL tables found (up to the cap)."
    },
    "format": {
      "type": "string",
      "enum": [
        "both",
        "json",
        "csv"
      ],
      "description": "optional: which serialisations to include in `data` (default: both)."
    }
  },
  "required": [
    "url"
  ],
  "additionalProperties": false
}

Output schema — the exact response shape the handler returns.

json · output schema
{
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "true on success; false on an honest failure (still delivered, but 503-before-charge)"
    },
    "url": {
      "type": "string",
      "description": "final URL after redirects"
    },
    "status": {
      "type": "integer",
      "description": "upstream HTTP status"
    },
    "text": {
      "type": "string",
      "description": "the canonical signed string: JSON.stringify(data, sorted-keys) — the exact bytes the provenance receipt covers"
    },
    "fetchedAt": {
      "type": "string",
      "description": "ISO timestamp of the fetch (also in the signed attestation)"
    },
    "data": {
      "type": "object",
      "description": "the structured product the buyer consumes",
      "properties": {
        "title": {
          "type": "string",
          "description": "page <title>"
        },
        "tableCount": {
          "type": "integer",
          "description": "number of data tables found on the page"
        },
        "returned": {
          "type": "integer",
          "description": "number of tables returned in this response"
        },
        "truncatedTables": {
          "type": "boolean",
          "description": "true if MAX_TABLES clipped the set"
        },
        "tables": {
          "type": "array",
          "description": "each extracted table",
          "items": {
            "type": "object",
            "properties": {
              "index": {
                "type": "integer",
                "description": "0-based position in the document"
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "ordered, de-duplicated column names (from <th>/first row)"
              },
              "rowCount": {
                "type": "integer"
              },
              "ragged": {
                "type": "boolean",
                "description": "true if any row's cell count != header width (colspan/rowspan)"
              },
              "rows": {
                "type": "array",
                "description": "header-keyed row objects (cell text)",
                "items": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              },
              "csv": {
                "type": "string",
                "description": "RFC-4180 CSV of this table (omitted when ?format=json)"
              }
            }
          }
        }
      }
    },
    "attestation": {
      "type": "object",
      "description": "EIP-191 provenance receipt over `text` (the canonical sorted-key JSON of the extracted grid), ecrecoverable OFFLINE (key at /.well-known/mercury-attestation). Proves the ROWS are genuine + untampered.",
      "properties": {
        "keyId": {
          "type": "string"
        },
        "alg": {
          "type": "string"
        },
        "address": {
          "type": "string"
        },
        "contentHash": {
          "type": "string"
        },
        "nonce": {
          "type": "string"
        },
        "signedAt": {
          "type": "string"
        },
        "signature": {
          "type": "string"
        },
        "verify": {
          "type": "object",
          "properties": {
            "message": {
              "type": "string"
            },
            "howTo": {
              "type": "string"
            }
          }
        }
      }
    },
    "error": {
      "type": "string",
      "description": "present only when ok:false"
    }
  },
  "required": [
    "ok",
    "url"
  ],
  "additionalProperties": true
}

Output preview — a real example response, shown free (you only pay when you call the route).

json · output preview
{
  "ok": true,
  "url": "https://example.org/specs",
  "status": 200,
  "text": "{\"returned\":1,\"tableCount\":1,\"tables\":[{\"columns\":[\"Spec\",\"Value\"],\"index\":0,\"ragged\":false,\"rowCount\":2,\"rows\":[{\"Spec\":\"Weight\",\"Value\":\"1.2kg\"},{\"Spec\":\"Color\",\"Value\":\"Black\"}]}],\"title\":\"Specs\",\"truncatedTables\":false}",
  "fetchedAt": "2026-06-04T00:00:00.000Z",
  "data": {
    "title": "Specs",
    "tableCount": 1,
    "returned": 1,
    "truncatedTables": false,
    "tables": [
      {
        "index": 0,
        "columns": [
          "Spec",
          "Value"
        ],
        "rowCount": 2,
        "ragged": false,
        "rows": [
          {
            "Spec": "Weight",
            "Value": "1.2kg"
          },
          {
            "Spec": "Color",
            "Value": "Black"
          }
        ],
        "csv": "Spec,Value\r\nWeight,1.2kg\r\nColor,Black"
      }
    ]
  },
  "attestation": {
    "keyId": "mercury-x402-attestation-v1:0x<signer>",
    "alg": "EIP-191-personal_sign",
    "address": "0x<signer-from-/.well-known/mercury-attestation>",
    "contentHash": "0x<sha256 of text>",
    "nonce": "0x<16-random-bytes>",
    "signedAt": "2026-06-04T00:00:00.000Z",
    "signature": "0x<65-byte EIP-191 signature>",
    "verify": {
      "message": "mercury-x402:fetch-attestation:v1\nurl=https://example.org/specs\nstatus=200\nsha256=0x…\nfetchedAt=2026-06-04T00:00:00.000Z\nnonce=0x…",
      "howTo": "EIP-191 ecrecover this message; signer must equal address. Recompute sha256(text)==contentHash."
    }
  }
}

Pay & call

Your agent calls the route; the 402 challenge carries the exact price ($0.006, USDC on Base mainnet); the x402 client settles via the CDP facilitator and retries. No key, no signup.

agent.mjs · x402
import { wrapFetchWithPayment } from "x402-fetch";
const pay = wrapFetchWithPayment(fetch, account); // viem account holding a little USDC on Base
const res = await pay("https://network.mercury-hq.com/buy/table?url=https://example.com");
const out = await res.json(); // the result + `attestation` (the signed receipt)

Prepaid alternative — the same route accepts an API key:

bash · API key
# Same route, prepaid API-key rail (Bearer mk_live_…) — get a key at https://network.mercury-hq.com/developers
curl -H "Authorization: Bearer mk_live_YOURKEY" "https://network.mercury-hq.com/buy/table?url=https://example.com"
Pay over 402 — get the missing pieceEvery paid call returns an EIP-191 signed receipt — verify it free at /x402/verify.

Verify the receipt

Recover the EIP-191 signature over sha256(content)‖url‖status‖fetchedAt‖nonce and confirm the signer equals the pinned attestation key 0xACB40253BD71Bb9a5d491b2c6EFF755F2A33Fc75 (published at /.well-known/mercury-attestation). No callback to Mercury — the receipt verifies offline, forever. Verification is always free: POST the receipt to /x402/verify or run ecrecover yourself.

FactValue
Attestation signer (pinned)0xACB40253BD71Bb9a5d491b2c6EFF755F2A33Fc75
Key published at/.well-known/mercury-attestation
Live verifier (free)/x402/verify
Settlementreal USDC on Base mainnet (eip155:8453) via CDP — auditable on BaseScan
RSS/Atom feed URL → a SIGNED, normalized item list [{title,link,published,summary}] unified across RSS 2.0/RDF + Atom 1.0: CDATA unwrapped, HTML…
Open
URL → a SIGNED outbound/internal link graph: every <a href> as an absolute URL + anchor text, classified internal vs external against the page…
Open
URL → one typed, SIGNED metadata record (JSON-LD + OpenGraph + Twitter-card + standard <meta> + canonical + title), by source. Deterministic,…
Open
TYPED structured extract for autonomous agents — URL + schema → a clean, type-safe JSON record. Where /buy/fetch returns page TEXT (and ?extract=…
Open

More: all services · /catalog · the headline web-fetch · agent twin of this page: GET /university/docs/cited-table?format=md