/v1/openapi.jsonThis API described in OpenAPI 3.1.
Answers: 200 OpenAPI document
Read-only access to every published dataset, for scripts and AI agents. No account and no key. Machine-readable: OpenAPI description and llms.txt.
curl -X POST "https://datamint.cloud/v1/search" \
-H "content-type: application/json" \
-d '{"query": "banks in Bulgaria", "limit": 5}'curl "https://datamint.cloud/v1/datasets/bg.finance.credit_institutions"
curl "https://datamint.cloud/v1/datasets/bg.finance.credit_institutions/schema"
curl "https://datamint.cloud/v1/datasets/bg.finance.credit_institutions/preview?limit=5"curl -X POST "https://datamint.cloud/v1/datasets/bg.finance.credit_institutions/query" \
-H "content-type: application/json" \
-d '{"filters": {"institution_type": "bank"}, "limit": 10}'
curl -L -O -J "https://datamint.cloud/v1/datasets/bg.finance.credit_institutions/download?format=csv"https://datamint.cloud. All data endpoints are under /v1. { data, meta } envelope; meta carries the request id and, for a dataset, its version, schema version, source date and the attribution text to use. RateLimit header shows where you stand; a refusal is HTTP 429. ETag, so send it back in If-None-Match and a 304 means nothing changed. VERSION_ARCHIVED (a version that never existed is 404 VERSION_NOT_FOUND). The error's details name the current version and what still works: a snapshot version's stored download and a versioned dataset's delta files stay. GET /versions marks archived versions with archived and archived_at. next_cursor; send it back to continue. A cursor stays on the version it started with. API version 0.1.0.
/v1/openapi.jsonThis API described in OpenAPI 3.1.
Answers: 200 OpenAPI document
/v1/datasetsList published datasets.
Answers: 200 Datasets with their current version
/v1/searchFind datasets by keywords and structured filters. Deterministic keyword matching over dataset metadata; no language model is involved.
Parameters
Answers: 200 Matching datasets, best first; 400 Invalid request; 413 Body too large; 415 Body is not application/json; 429 Too many requests
/v1/datasets/{datasetId}One dataset with its current version, licence and attribution.
Parameters
datasetId (path, string, required): A dataset id from the dataset list. The example is a real published dataset, for clients that need a concrete address to try.Answers: 200 The dataset; 400 Invalid id; 404 Unknown dataset
/v1/datasets/{datasetId}/schemaJSON Schema of the dataset's records.
Parameters
datasetId (path, string, required): A dataset id from the dataset list. The example is a real published dataset, for clients that need a concrete address to try.Answers: 200 The schema; 400 Invalid id; 404 Unknown dataset
/v1/datasets/{datasetId}/previewThe first records of the current version.
Parameters
datasetId (path, string, required): A dataset id from the dataset list. The example is a real published dataset, for clients that need a concrete address to try.limit (query, integer): default 10; 1 to 25Answers: 200 Sample records; 400 Invalid request; 404 Unknown dataset
/v1/datasets/{datasetId}/versionsPublished versions, newest first, with change summaries.
Parameters
datasetId (path, string, required): A dataset id from the dataset list. The example is a real published dataset, for clients that need a concrete address to try.Answers: 200 Versions; 400 Invalid id; 404 Unknown dataset
/v1/datasets/{datasetId}/queryFiltered, paginated records. Only the filters listed by the schema endpoint exist; results come from one pinned version.
Parameters
datasetId (path, string, required): A dataset id from the dataset list. The example is a real published dataset, for clients that need a concrete address to try.PAYMENT-SIGNATURE (header, string): The signed x402 payment, base64 encoded, sent when retrying a request that answered 402. Only needed for paid requests.Answers: 200 A page of records. `next_cursor` is null on the last page.; 400 Invalid filters, limit, cursor or body; 402 Payment required: the price and how to pay are in the PAYMENT-REQUIRED header; 404 Unknown dataset or version; 410 VERSION_ARCHIVED: the version existed but retention archived its records; the body names what is still available; 413 Body too large; 415 Body is not application/json; 422 The query is too broad to answer quickly: narrow it; 429 Too many queries
/v1/datasets/{datasetId}/downloadDownload the current version (json or csv). Revalidate with the ETag.
Parameters
datasetId (path, string, required): A dataset id from the dataset list. The example is a real published dataset, for clients that need a concrete address to try.format (query, string): one of json, csv, geojson; default jsonPAYMENT-SIGNATURE (header, string): The signed x402 payment, base64 encoded, sent when retrying a request that answered 402. Only needed for paid requests.Answers: 200 The export file; 304 Not modified; 400 Invalid request; 402 Payment required: the price and how to pay are in the PAYMENT-REQUIRED header; 404 Unknown dataset or format not available; 429 Too many requests, or too many downloads in progress from this address (TOO_MANY_DOWNLOADS; see Retry-After); 503 Export temporarily unavailable, or the service is serving its maximum number of downloads (DOWNLOADS_BUSY; see Retry-After)
/v1/datasets/{datasetId}/versions/{version}/deltaWhat one version changed (versioned datasets): added and changed records, then removals, as NDJSON. Lets a client follow the dataset without downloading it again.
Parameters
datasetId (path, string, required): A dataset id from the dataset list. The example is a real published dataset, for clients that need a concrete address to try.version (path, string, required): fixed patternPAYMENT-SIGNATURE (header, string): The signed x402 payment, base64 encoded, sent when retrying a request that answered 402. Only needed for paid requests.Answers: 200 The delta, one JSON object per line; 304 Not modified; 400 Invalid request; 402 Payment required: the price and how to pay are in the PAYMENT-REQUIRED header; 404 Unknown dataset or version, or the version has no delta file; 429 Too many requests, or too many downloads in progress from this address (TOO_MANY_DOWNLOADS; see Retry-After); 503 Delta temporarily unavailable, or the service is serving its maximum number of downloads (DOWNLOADS_BUSY; see Retry-After)
/v1/datasets/{datasetId}/versions/{version}/downloadDownload a specific version. The file never changes, so it is cacheable forever.
Parameters
datasetId (path, string, required): A dataset id from the dataset list. The example is a real published dataset, for clients that need a concrete address to try.version (path, string, required): fixed patternformat (query, string): one of json, csv, geojson; default jsonPAYMENT-SIGNATURE (header, string): The signed x402 payment, base64 encoded, sent when retrying a request that answered 402. Only needed for paid requests.Answers: 200 The export file; 304 Not modified; 400 Invalid request; 402 Payment required: the price and how to pay are in the PAYMENT-REQUIRED header; 404 Unknown dataset, version or format; 410 VERSION_ARCHIVED: a versioned dataset version whose records retention archived (a full download is streamed from them); its delta files and the current version are unaffected; 429 Too many requests, or too many downloads in progress from this address (TOO_MANY_DOWNLOADS; see Retry-After); 503 Export temporarily unavailable, or the service is serving its maximum number of downloads (DOWNLOADS_BUSY; see Retry-After)
/healthLiveness: the process is up.
Answers: 200 Alive
/readyReadiness: the database answers.
Answers: 200 Ready; 503 Not ready
Priced requests use the open x402 protocol: no account and no key, you pay each request in USDC from a wallet. Each dataset's price is in the access.payment field of GET /v1/datasets/{id}. These are the paid requests; everything else is free: the catalogue, search, dataset metadata, schema, versions and previews.
POST /v1/datasets/{id}/queryGET /v1/datasets/{id}/download and /versions/{version}/downloadGET /v1/datasets/{id}/versions/{version}/delta402 Payment Required with a PAYMENT-REQUIRED header: the price, the network, the USDC token and who to pay. A request that is wrong (an unknown dataset or filter, a bad body) is answered 400 or 404 and never charged. PAYMENT-SIGNATURE header. PAYMENT-RESPONSE header with the receipt. The official client library does all of this in one call:
import { wrapFetchWithPayment, x402Client } from '@x402/fetch';
import { ExactEvmScheme } from '@x402/evm/exact/client';
import { privateKeyToAccount } from 'viem/accounts';
// A wallet holding USDC on the network the dataset names. Keep the key out of the code.
const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as `0x${string}`);
const client = new x402Client().register('eip155:*', new ExactEvmScheme(account));
const payingFetch = wrapFetchWithPayment(fetch, client);
const response = await payingFetch('https://datamint.cloud/v1/datasets/<dataset id>/query', {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ limit: 25 }),
});
const { data } = await response.json();curl -si -X POST https://datamint.cloud/v1/datasets/<dataset id>/query \
-H 'content-type: application/json' -d '{"limit": 25}'
# HTTP/2 402
# payment-required: <base64: price, network, token, who to pay>PAYMENT_PROOF_REUSED. PAYMENT_FAILED and nothing is sent. If it is taken and the request then fails (for example a query that is too broad), it is not refunded automatically. PAYMENT_UNAVAILABLE or PAYMENT_PENDING means the payment service did not answer; nothing is served without payment, and Retry-After says when to try again. PAYMENTS_PAUSED means a daily limit was reached. An error is JSON: { "error": { "code", "message", "request_id" } }. Quote the request id when you ask about one.
AI agents can use DataMint as an MCP server at https://datamint.cloud/mcp: seven read-only tools to discover datasets, read their schema, preview, query and download. No account and no key. Client configuration, the tools, limits and how paid datasets are reported are on the MCP page.