Vellum

For agents and developers

Buy rows over HTTP

Read column names free, ask for a free quote on any filter, then pay with USDC on Solana using x402. No account, no API key.

The flow

  1. 1
    Find a table. GET /api/datasets?q= lists live tables with their column names, row count and price per row.
  2. 2
    Get a quote. POST /api/d/<slug>/quote with a filter. Free. You get matching rows, the total, the seller's share, the platform share and a quote_id.
  3. 3
    Ask to buy. POST /api/d/<slug>/buy?quote=<id> answers 402 with split payment terms.
  4. 4
    Get an unsigned transaction. POST /api/quote/<id>/tx with {"buyer": "<your wallet>"}. Sign it with your wallet.
  5. 5
    Send it back. Repeat the buy request with an X-PAYMENT header. The rows come back as JSON, or as CSV with ?format=csv.

Endpoints

Base URL {{ORIGIN}}. Errors are JSON like {"error": "..."}. Requests are rate limited per IP.

GET /api/datasets?q=

curl "{{ORIGIN}}/api/datasets?q=<words>"

Returns {"datasets": [...]}, newest first. q matches title, description and column names. Each entry has slug, title, description, source, columns (name and type), rows, price_per_row, seller, contains_business_contacts and the endpoint URLs.

GET /api/d/<slug>

curl {{ORIGIN}}/api/d/<slug>

Free. Column names and types, row count, price per row, seller, sales so far. Never any rows.

POST /api/d/<slug>/quote

curl -X POST {{ORIGIN}}/api/d/<slug>/quote \
  -H "content-type: application/json" \
  -d '{"where":[{"col":"<column>","op":"eq","value":"<value>"}],"limit":100}'
{
  "dataset": "<slug>", "rows": <matching rows>, "price_per_row": "<usdc>",
  "total": "<usdc>", "seller_gets": "<usdc>", "platform_share": "<usdc>",
  "currency": "USDC", "payable": true,
  "quote_id": "<quote_id>", "expires_at": "<ISO time>",
  "buy": "{{ORIGIN}}/api/d/<slug>/buy?quote=<quote_id>"
}

If nothing matches, or the total is under the minimum sale, payable is false, quote_id is null and reason says why. A quote is valid for a short time (see expires_at).

POST /api/d/<slug>/buy

curl -X POST "{{ORIGIN}}/api/d/<slug>/buy?quote=<quote_id>" \
  -H "X-PAYMENT: <base64 payment>"

Without ?quote= you can send the filter as the JSON body: the server quotes it and answers with the payment terms. Add ?format=csv to get CSV instead of JSON.

POST /api/quote/<quote_id>/tx

curl -X POST {{ORIGIN}}/api/quote/<quote_id>/tx \
  -H "content-type: application/json" \
  -d '{"buyer":"<your wallet>"}'

Returns the unsigned USDC transaction (base64) that pays the seller and the platform together, with your wallet as payer. Sign it; do not change it.

GET /api/receipt/<token>

curl {{ORIGIN}}/api/receipt/<token>
curl "{{ORIGIN}}/api/receipt/<token>?format=csv"

The filter language

A filter is {"where": [ ...conditions ], "limit": N}. Each condition is {"col", "op", "value"}. Conditions are combined with AND. Column names are case-insensitive. limit is optional, up to 50,000 rows.

opMatches rows where the cellvalue
{"where": [
  {"col": "<text column>", "op": "contains", "value": "<word>"},
  {"col": "<number column>", "op": "gte", "value": "<number>"},
  {"col": "<column>", "op": "in", "value": ["<a>", "<b>"]},
  {"col": "<column>", "op": "notempty"}
], "limit": <n>}

Numbers compare as numbers and ISO dates (YYYY-MM-DD) as dates. Up to 12 conditions.

Paying with x402

The 402 response

Buying without a valid payment returns 402 with this shape. The scheme is split: one transaction, two payees.

{
  "x402Version": 1,
  "error": "X-PAYMENT header is required",
  "accepts": [{
    "scheme": "split",
    "network": "<network>",
    "asset": "<USDC mint>",
    "amount": "<total, USDC base units>",
    "payTo": "<seller wallet>",
    "resource": "{{ORIGIN}}/api/d/<slug>/buy?quote=<quote_id>",
    "extra": {
      "decimals": 6,
      "splits": [
        {"payTo": "<seller wallet>",   "amount": "<seller share>",   "role": "seller"},
        {"payTo": "<platform wallet>", "amount": "<platform share>", "role": "platform"}
      ],
      "quote": "<quote_id>",
      "memoPrefix": "rowhouse:<quote_id>:",
      "transaction": "{{ORIGIN}}/api/quote/<quote_id>/tx"
    }
  }]
}

Amounts are USDC base units (6 decimals): 1000000 is 1 USDC. The seller is paid directly. Vellum never holds funds or keys.

The X-PAYMENT header

The value is the base64 of this JSON, where transaction is your signed transaction in base64:

{"x402Version":1,"scheme":"split","payload":{"transaction":"<signed tx base64>"}}

Success: the rows

200 OK
{ "dataset": "<slug>", "columns": [...], "count": <n>,
  "rows": [ {"<column>": "<cell>", ...}, ... ],
  "paid": "<usdc>", "transaction": "<signature>",
  "receipt": "{{ORIGIN}}/api/receipt/<token>" }

Cells are strings, exactly as the seller uploaded them. Response headers include x-payment-response and x-rowhouse-receipt.

Pending payments and receipts

Solana can take a few seconds to confirm. If the transaction has not confirmed when the server stops waiting, the buy request answers 202 with a receipt link:

202 Accepted
{ "status": "pending", "transaction": "<signature>", "receipt": "{{ORIGIN}}/api/receipt/<token>" }

Poll the receipt URL. It answers 202 while pending, then returns the rows (200, JSON or ?format=csv) once paid. A failed transaction answers 410 and the rows are not delivered. Keep the receipt token: it is your proof of purchase and lets you fetch the rows again.

Rules

Honest limits