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
- 1Find a table.
GET /api/datasets?q=lists live tables with their column names, row count and price per row. - 2Get a quote.
POST /api/d/<slug>/quotewith a filter. Free. You get matching rows, the total, the seller's share, the platform share and aquote_id. - 3Ask to buy.
POST /api/d/<slug>/buy?quote=<id>answers402with split payment terms. - 4Get an unsigned transaction.
POST /api/quote/<id>/txwith{"buyer": "<your wallet>"}. Sign it with your wallet. - 5Send it back. Repeat the buy request with an
X-PAYMENTheader. 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.
| op | Matches rows where the cell | value |
|---|
{"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
- A quote is paid once. After a payment for a quote is accepted, that quote cannot be paid again. Get a new quote to buy again.
- A transaction is accepted once. Replaying a signed transaction never delivers rows twice.
- Quotes expire. Ask again if
expires_athas passed. - Minimum sale … USDC. Smaller totals are not payable, because the network fee would eat the sale.
- Platform fee …. It is part of the quoted total, not added on top, and is paid in the same transaction as the seller's share.
- Network …, paid in USDC.
- Tables are immutable. A quote buys exactly the rows it counted.
Honest limits
- Bought rows can be copied and resold. Vellum cannot prevent that, and nothing here is a licence beyond what the seller grants.
- Vellum checks uploads only for basic personal-data patterns (ID numbers, card numbers, emails, phone numbers). That is a pattern check, not a guarantee. If something slipped through, report the table.
- Sellers state they have the right to sell their data. Vellum does not verify its quality or accuracy. Read the description and source, and use the free schema and quote first.
- Payments are on-chain and final. Vellum cannot refund a payment, because it never holds funds.