{"openapi":"3.1.0","info":{"title":"DataMint API","version":"0.1.0","description":"Read-only access to published DataMint datasets. Responses use a `{data, meta}` envelope and errors a `{error}` envelope with a machine-readable code. Reuse of the data requires the attribution text shown on each dataset."},"paths":{"/health":{"get":{"operationId":"getHealth","summary":"Liveness: the process is up.","tags":["Operations"],"parameters":[],"responses":{"200":{"description":"Alive","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"}}}}}}}}},"/ready":{"get":{"operationId":"getReady","summary":"Readiness: the database answers.","tags":["Operations"],"parameters":[],"responses":{"200":{"description":"Ready","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"}}}}}},"503":{"description":"Not ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/openapi.json":{"get":{"operationId":"getOpenApi","summary":"This API described in OpenAPI 3.1.","tags":["Discovery"],"parameters":[],"responses":{"200":{"description":"OpenAPI document","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/datasets":{"get":{"operationId":"listDatasets","summary":"List published datasets.","tags":["Discovery"],"parameters":[],"responses":{"200":{"description":"Datasets with their current version","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Dataset"}},"meta":{"type":"object","required":["request_id","generated_at"],"properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"count":{"type":"integer"},"dataset_id":{"type":"string"},"dataset_version":{"type":"string"},"schema_version":{"type":"string"},"source_as_of":{"type":["string","null"]},"attribution":{"type":"string"},"freshness":{"type":"object","description":"Whether the dataset is maintained as promised (state) and the UTC date it is current as of. Not the date the content changed: that is the version label.","properties":{"state":{"type":"string","enum":["current","late","unknown"]},"as_of":{"type":"string","format":"date"}}}}}}}}}}}}},"/v1/search":{"post":{"operationId":"searchDatasets","summary":"Find datasets by keywords and structured filters. Deterministic keyword matching over dataset metadata; no language model is involved.","tags":["Discovery"],"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}}},"responses":{"200":{"description":"Matching datasets, best first","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"meta":{"type":"object","required":["request_id","generated_at"],"properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"count":{"type":"integer"},"dataset_id":{"type":"string"},"dataset_version":{"type":"string"},"schema_version":{"type":"string"},"source_as_of":{"type":["string","null"]},"attribution":{"type":"string"},"freshness":{"type":"object","description":"Whether the dataset is maintained as promised (state) and the UTC date it is current as of. Not the date the content changed: that is the version label.","properties":{"state":{"type":"string","enum":["current","late","unknown"]},"as_of":{"type":"string","format":"date"}}}}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Body is not application/json","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/datasets/{datasetId}":{"get":{"operationId":"getDataset","summary":"One dataset with its current version, licence and attribution.","tags":["Discovery"],"parameters":[{"$ref":"#/components/parameters/datasetId"}],"responses":{"200":{"description":"The dataset","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/Dataset"},"meta":{"type":"object","required":["request_id","generated_at"],"properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"count":{"type":"integer"},"dataset_id":{"type":"string"},"dataset_version":{"type":"string"},"schema_version":{"type":"string"},"source_as_of":{"type":["string","null"]},"attribution":{"type":"string"},"freshness":{"type":"object","description":"Whether the dataset is maintained as promised (state) and the UTC date it is current as of. Not the date the content changed: that is the version label.","properties":{"state":{"type":"string","enum":["current","late","unknown"]},"as_of":{"type":"string","format":"date"}}}}}}}}}},"400":{"description":"Invalid id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown dataset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/datasets/{datasetId}/schema":{"get":{"operationId":"getDatasetSchema","summary":"JSON Schema of the dataset's records.","tags":["Discovery"],"parameters":[{"$ref":"#/components/parameters/datasetId"}],"responses":{"200":{"description":"The schema","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"model":{"type":"string"},"schema_version":{"type":"string"},"json_schema":{"type":"object","description":"JSON Schema (2020-12) of one record's `data`."}}},"meta":{"type":"object","required":["request_id","generated_at"],"properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"count":{"type":"integer"},"dataset_id":{"type":"string"},"dataset_version":{"type":"string"},"schema_version":{"type":"string"},"source_as_of":{"type":["string","null"]},"attribution":{"type":"string"},"freshness":{"type":"object","description":"Whether the dataset is maintained as promised (state) and the UTC date it is current as of. Not the date the content changed: that is the version label.","properties":{"state":{"type":"string","enum":["current","late","unknown"]},"as_of":{"type":"string","format":"date"}}}}}}}}}},"400":{"description":"Invalid id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown dataset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/datasets/{datasetId}/preview":{"get":{"operationId":"previewDataset","summary":"The first records of the current version.","tags":["Discovery"],"parameters":[{"$ref":"#/components/parameters/datasetId"},{"$ref":"#/components/parameters/limit"}],"responses":{"200":{"description":"Sample records","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Record"}},"meta":{"type":"object","required":["request_id","generated_at"],"properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"count":{"type":"integer"},"dataset_id":{"type":"string"},"dataset_version":{"type":"string"},"schema_version":{"type":"string"},"source_as_of":{"type":["string","null"]},"attribution":{"type":"string"},"freshness":{"type":"object","description":"Whether the dataset is maintained as promised (state) and the UTC date it is current as of. Not the date the content changed: that is the version label.","properties":{"state":{"type":"string","enum":["current","late","unknown"]},"as_of":{"type":"string","format":"date"}}}}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown dataset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/datasets/{datasetId}/versions":{"get":{"operationId":"listDatasetVersions","summary":"Published versions, newest first, with change summaries.","tags":["Discovery"],"parameters":[{"$ref":"#/components/parameters/datasetId"}],"responses":{"200":{"description":"Versions","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Version"}},"meta":{"type":"object","required":["request_id","generated_at"],"properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"count":{"type":"integer"},"dataset_id":{"type":"string"},"dataset_version":{"type":"string"},"schema_version":{"type":"string"},"source_as_of":{"type":["string","null"]},"attribution":{"type":"string"},"freshness":{"type":"object","description":"Whether the dataset is maintained as promised (state) and the UTC date it is current as of. Not the date the content changed: that is the version label.","properties":{"state":{"type":"string","enum":["current","late","unknown"]},"as_of":{"type":"string","format":"date"}}}}}}}}}},"400":{"description":"Invalid id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown dataset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/datasets/{datasetId}/query":{"head":{"operationId":"queryDatasetHead","summary":"Not supported: paid endpoints do not answer HEAD (405, no payment is taken).","tags":["Query"],"responses":{"405":{"description":"Method not allowed; use the documented method.","headers":{"Allow":{"description":"The allowed methods.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"queryDataset","summary":"Filtered, paginated records. Only the filters listed by the schema endpoint exist; results come from one pinned version.","tags":["Query"],"parameters":[{"$ref":"#/components/parameters/datasetId"},{"$ref":"#/components/parameters/PaymentSignature"}],"x-payment-info":{"protocols":["x402"],"price":{"mode":"dynamic","currency":"USD","min":"0.01","max":"50.00"}},"security":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequest"}}}},"responses":{"200":{"description":"A page of records. `next_cursor` is null on the last page.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Record"}},"meta":{"type":"object","required":["request_id","generated_at"],"properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"count":{"type":"integer"},"dataset_id":{"type":"string"},"dataset_version":{"type":"string"},"schema_version":{"type":"string"},"source_as_of":{"type":["string","null"]},"attribution":{"type":"string"},"freshness":{"type":"object","description":"Whether the dataset is maintained as promised (state) and the UTC date it is current as of. Not the date the content changed: that is the version label.","properties":{"state":{"type":"string","enum":["current","late","unknown"]},"as_of":{"type":"string","format":"date"}}},"next_cursor":{"type":["string","null"]}}}}}}},"headers":{"PAYMENT-RESPONSE":{"description":"Base64 encoded receipt of the settled payment, present on paid answers.","schema":{"type":"string"}}}},"400":{"description":"Invalid filters, limit, cursor or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Payment required: the price and how to pay are in the PAYMENT-REQUIRED header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64 encoded x402 payment instructions: the price, the network, the token and who to pay.","schema":{"type":"string"}}}},"404":{"description":"Unknown dataset or version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"VERSION_ARCHIVED: the version existed but retention archived its records; the body names what is still available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Body is not application/json","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The query is too broad to answer quickly: narrow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many queries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/datasets/{datasetId}/download":{"head":{"operationId":"downloadCurrentHead","summary":"Not supported: paid endpoints do not answer HEAD (405, no payment is taken).","tags":["Downloads"],"responses":{"405":{"description":"Method not allowed; use the documented method.","headers":{"Allow":{"description":"The allowed methods.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"downloadCurrent","summary":"Download the current version (json or csv). Revalidate with the ETag.","tags":["Downloads"],"parameters":[{"$ref":"#/components/parameters/datasetId"},{"$ref":"#/components/parameters/format"},{"$ref":"#/components/parameters/PaymentSignature"}],"x-payment-info":{"protocols":["x402"],"price":{"mode":"dynamic","currency":"USD","min":"0.01","max":"50.00"}},"security":[],"responses":{"200":{"description":"The export file","content":{"application/json":{"schema":{"type":"object"}},"text/csv":{"schema":{"type":"string"}}},"headers":{"PAYMENT-RESPONSE":{"description":"Base64 encoded receipt of the settled payment, present on paid answers.","schema":{"type":"string"}}}},"304":{"description":"Not modified"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Payment required: the price and how to pay are in the PAYMENT-REQUIRED header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64 encoded x402 payment instructions: the price, the network, the token and who to pay.","schema":{"type":"string"}}}},"404":{"description":"Unknown dataset or format not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests, or too many downloads in progress from this address (TOO_MANY_DOWNLOADS; see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export temporarily unavailable, or the service is serving its maximum number of downloads (DOWNLOADS_BUSY; see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/datasets/{datasetId}/versions/{version}/delta":{"head":{"operationId":"downloadVersionDeltaHead","summary":"Not supported: paid endpoints do not answer HEAD (405, no payment is taken).","tags":["Downloads"],"responses":{"405":{"description":"Method not allowed; use the documented method.","headers":{"Allow":{"description":"The allowed methods.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"downloadVersionDelta","summary":"What one version changed (versioned datasets): added and changed records, then removals, as NDJSON. Lets a client follow the dataset without downloading it again.","tags":["Downloads"],"parameters":[{"$ref":"#/components/parameters/datasetId"},{"$ref":"#/components/parameters/version"},{"$ref":"#/components/parameters/PaymentSignature"}],"x-payment-info":{"protocols":["x402"],"price":{"mode":"dynamic","currency":"USD","min":"0.01","max":"50.00"}},"security":[],"responses":{"200":{"description":"The delta, one JSON object per line","content":{"application/x-ndjson":{"schema":{"type":"string"}}},"headers":{"PAYMENT-RESPONSE":{"description":"Base64 encoded receipt of the settled payment, present on paid answers.","schema":{"type":"string"}}}},"304":{"description":"Not modified"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Payment required: the price and how to pay are in the PAYMENT-REQUIRED header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64 encoded x402 payment instructions: the price, the network, the token and who to pay.","schema":{"type":"string"}}}},"404":{"description":"Unknown dataset or version, or the version has no delta file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests, or too many downloads in progress from this address (TOO_MANY_DOWNLOADS; see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Delta temporarily unavailable, or the service is serving its maximum number of downloads (DOWNLOADS_BUSY; see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/datasets/{datasetId}/versions/{version}/download":{"head":{"operationId":"downloadVersionHead","summary":"Not supported: paid endpoints do not answer HEAD (405, no payment is taken).","tags":["Downloads"],"responses":{"405":{"description":"Method not allowed; use the documented method.","headers":{"Allow":{"description":"The allowed methods.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"downloadVersion","summary":"Download a specific version. The file never changes, so it is cacheable forever.","tags":["Downloads"],"parameters":[{"$ref":"#/components/parameters/datasetId"},{"$ref":"#/components/parameters/version"},{"$ref":"#/components/parameters/format"},{"$ref":"#/components/parameters/PaymentSignature"}],"x-payment-info":{"protocols":["x402"],"price":{"mode":"dynamic","currency":"USD","min":"0.01","max":"50.00"}},"security":[],"responses":{"200":{"description":"The export file","content":{"application/json":{"schema":{"type":"object"}},"text/csv":{"schema":{"type":"string"}}},"headers":{"PAYMENT-RESPONSE":{"description":"Base64 encoded receipt of the settled payment, present on paid answers.","schema":{"type":"string"}}}},"304":{"description":"Not modified"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Payment required: the price and how to pay are in the PAYMENT-REQUIRED header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64 encoded x402 payment instructions: the price, the network, the token and who to pay.","schema":{"type":"string"}}}},"404":{"description":"Unknown dataset, version or format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"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","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests, or too many downloads in progress from this address (TOO_MANY_DOWNLOADS; see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export temporarily unavailable, or the service is serving its maximum number of downloads (DOWNLOADS_BUSY; see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","NOT_FOUND","DATASET_NOT_FOUND","VERSION_NOT_FOUND","VERSION_ARCHIVED","FORMAT_NOT_AVAILABLE","REQUEST_TOO_LARGE","UNSUPPORTED_MEDIA_TYPE","METHOD_NOT_ALLOWED","RATE_LIMITED","NOT_READY","EXPORT_UNAVAILABLE","TOO_MANY_DOWNLOADS","DOWNLOADS_BUSY","DB_BUSY","QUERY_TOO_BROAD","INTERNAL","PAYMENT_REQUIRED","PAYMENT_PROOF_REUSED","PAYMENT_FAILED","PAYMENT_EXPIRED","PAYMENT_PENDING","PAYMENT_UNAVAILABLE","PAYMENTS_PAUSED"]},"message":{"type":"string"},"request_id":{"type":"string"},"details":{"type":"object","description":"Only on VERSION_ARCHIVED (HTTP 410): the version existed but its records were archived by the retention policy. Unlike VERSION_NOT_FOUND (404, never existed), it will not come back.","required":["dataset_id","version","archived_at","current_version","still_available"],"properties":{"dataset_id":{"type":"string"},"version":{"type":"string","description":"The archived version."},"archived_at":{"type":["string","null"],"format":"date-time"},"current_version":{"type":"string","description":"The version that can still be queried and downloaded in full."},"still_available":{"type":"array","description":"current_version: query and download the current version. version_download: the archived version has a stored export that still downloads (snapshot datasets). version_delta: its delta files still download (versioned datasets).","items":{"type":"string","enum":["current_version","version_download","version_delta"]}}}}}}},"examples":[{"error":{"code":"VERSION_ARCHIVED","message":"Version 2026-10-01.1 was archived by the retention policy: its records are no longer available. Still available: the current version (2026-12-01.1) can be queried and downloaded; its delta files.","request_id":"req_0123456789","details":{"dataset_id":"bg.finance.credit_institutions","version":"2026-10-01.1","archived_at":"2026-12-02T03:00:00.000Z","current_version":"2026-12-01.1","still_available":["current_version","version_delta"]}}}]},"Changes":{"type":"object","properties":{"added":{"type":"integer"},"changed":{"type":"integer"},"removed":{"type":"integer"},"unchanged":{"type":"integer"},"schema_changed":{"type":"boolean"}}},"Version":{"type":"object","properties":{"version":{"type":"string","examples":["2026-11-26.1"]},"status":{"type":"string","enum":["current","superseded"]},"schema_version":{"type":"string"},"record_count":{"type":"integer"},"source_as_of":{"type":["string","null"],"description":"Date the source says its data is valid for."},"published_at":{"type":"string","format":"date-time"},"changes":{"$ref":"#/components/schemas/Changes"},"formats":{"type":"array","items":{"type":"string","enum":["json","csv","geojson"]}},"publication":{"type":"string","enum":["snapshot","versioned"],"description":"versioned: full downloads are streamed and each version has a delta file."},"delta_parts":{"type":"integer","description":"Delta files of this version (0 for snapshot datasets)."},"archived":{"type":"boolean","description":"True when the retention policy archived the version: querying it (and streaming a versioned dataset download of it) answers 410 VERSION_ARCHIVED. Stored exports and delta files stay."},"archived_at":{"type":["string","null"],"format":"date-time"}}},"Dataset":{"type":"object","properties":{"id":{"type":"string","examples":["bg.finance.credit_institutions"]},"name":{"type":"string"},"description":{"type":"string"},"country":{"type":"string"},"category":{"type":"string"},"publisher":{"type":"string"},"language":{"type":["string","null"],"description":"ISO 639-1 language of the data text; null when not stated."},"update_frequency":{"type":"string","enum":["daily","weekly","monthly","irregular"],"description":"How often the source is collected."},"source_url":{"type":"string","format":"uri","description":"Public page of the publisher."},"schema_version":{"type":"string"},"license":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string","enum":["open","custom-permissive","general"],"description":"Same value as class (kept for compatibility)."},"class":{"type":"string","enum":["open","custom-permissive","general"],"description":"Licence class. General: the publisher gave no open licence; reuse follows the publisher terms (terms_url) and the attribution text."},"note":{"type":["string","null"],"description":"One-line reuse note; set for the General class, null otherwise."},"attribution_required":{"type":"boolean"},"terms_url":{"type":["string","null"],"format":"uri"}}},"attribution":{"type":"string","description":"Text to cite when reusing the data."},"access":{"type":"object","properties":{"pricing":{"type":"string","enum":["free","paid"]},"note":{"type":"string"},"payment":{"type":"object","description":"Present when some requests for this dataset cost money. Metadata, schema, versions and previews are always free.","properties":{"protocol":{"type":"string","enum":["x402"]},"currency":{"type":"string","enum":["USDC"]},"network":{"type":"string","description":"CAIP-2 network id: eip155:8453 is Base, eip155:84532 is Base Sepolia (test)."},"test_network":{"type":"boolean","description":"True when payments use a test network and no real money moves."},"prices":{"type":"object","description":"USDC per request, as a decimal text, or null when that kind of request is free.","properties":{"query":{"type":["string","null"],"description":"One record query."},"download":{"type":["string","null"],"description":"One download, of the latest or a pinned version."},"delta":{"type":["string","null"],"description":"One version change file."}}}}}},"description":"Pricing and access terms."},"freshness":{"type":"object","description":"Whether the dataset is maintained as promised, and the factual age of its last confirmation. A run that was skipped by design or found no update is a check, never a reason to look stale. The content date is last_changed_at (and the version label).","properties":{"state":{"type":"string","enum":["current","late","unknown"],"description":"current: collected on its schedule (daily datasets are current as of today while the source is enabled); late: at least 3 runs in a row failed and the next expected run plus its grace has passed; unknown: irregular schedule or collection switched off."},"as_of":{"type":"string","format":"date","description":"UTC date the dataset is current as of: today for daily datasets, the latest check for weekly and monthly ones."},"last_changed_at":{"type":"string","format":"date-time","description":"When the content last changed: the creation time of the current version."},"status":{"type":"string","enum":["fresh","stale","outdated","unknown"],"description":"Mechanical age of the last confirmation against the update interval: fresh within 1.5 intervals, stale within 3, outdated beyond. Prefer state."},"age_hours":{"type":"number"},"expected_interval_hours":{"type":["integer","null"]},"last_checked_at":{"type":["string","null"],"format":"date-time","description":"When the platform last collected the source successfully."},"confirmed_at":{"type":"string","format":"date-time","description":"When the published data was last confirmed to match the source: a publication that created the current version or found the data unchanged. Freshness is measured from here."}}},"quality":{"type":["object","null"],"description":"Quality of the latest collection run behind the current version. Counts and completeness only.","properties":{"scope":{"type":"string","enum":["latest_collection_run"]},"accepted":{"type":"integer"},"rejected":{"type":"integer"},"rejected_ratio":{"type":"number"},"completeness":{"type":"object","additionalProperties":{"type":"number"},"description":"Share of records with a value, by required field (0 to 1)."},"checked_at":{"type":["string","null"],"format":"date-time"}}},"current_version":{"$ref":"#/components/schemas/Version"}}},"QueryRequest":{"type":"object","additionalProperties":false,"properties":{"filters":{"type":"object","description":"Only the filters listed by the dataset schema endpoint. All must match. Most take a string; a date_range filter takes {\"from\": \"YYYY-MM-DD\", \"to\": \"YYYY-MM-DD\"}, either end optional, both inclusive. A geo filter takes exactly one of {\"bbox\": {\"min_lat\", \"min_lon\", \"max_lat\", \"max_lon\"}} or {\"near\": {\"lat\", \"lon\", \"radius_km\"}}, in decimal degrees (WGS 84); a box must not cross the 180th meridian.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":false,"properties":{"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"}}},{"type":"object","additionalProperties":false,"properties":{"bbox":{"type":"object","additionalProperties":false,"required":["min_lat","min_lon","max_lat","max_lon"],"properties":{"min_lat":{"type":"number","minimum":-90,"maximum":90},"min_lon":{"type":"number","minimum":-180,"maximum":180},"max_lat":{"type":"number","minimum":-90,"maximum":90},"max_lon":{"type":"number","minimum":-180,"maximum":180}}},"near":{"type":"object","additionalProperties":false,"required":["lat","lon","radius_km"],"properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180},"radius_km":{"type":"number","exclusiveMinimum":0}}}}}]}},"limit":{"type":"integer","minimum":1,"maximum":100,"default":25},"cursor":{"type":["string","null"],"description":"next_cursor from the previous page. It pins the version."},"version":{"type":"string","description":"Query a specific version instead of the current one."},"format":{"type":"string","enum":["json"]}}},"SearchRequest":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","maxLength":200,"description":"Keywords, matched against dataset name, category, country, publisher and description. Optional.","examples":["banks in Bulgaria"]},"filters":{"type":"object","additionalProperties":false,"properties":{"country":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2."},"category":{"type":"string","description":"Dataset category, e.g. finance_institutions."}}},"limit":{"type":"integer","minimum":1,"maximum":50,"default":10}}},"SearchHit":{"type":"object","properties":{"score":{"type":"number","description":"Higher is better; 0 when there is no query."},"matched_terms":{"type":"array","items":{"type":"string"}},"matched_fields":{"type":"array","items":{"type":"string"}},"dataset":{"$ref":"#/components/schemas/Dataset"}}},"FilterInfo":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["enum","equals","contains","date_range","geo"]},"description":{"type":"string"},"values":{"type":"array","items":{"type":"string"}},"max_length":{"type":"integer"},"pattern":{"type":"string"},"format":{"type":"string","description":"For date_range: the date format of from and to."},"lat_field":{"type":"string","description":"For geo: the latitude field."},"lon_field":{"type":"string","description":"For geo: the longitude field."},"max_radius_km":{"type":"number","description":"For geo: the largest radius accepted."}}},"Record":{"type":"object","properties":{"id":{"type":"string"},"data":{"type":"object","description":"Normalized fields (see the dataset schema)."},"original":{"type":"object","description":"Verbatim source text."},"attribution":{"type":"string"}}}},"parameters":{"PaymentSignature":{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"description":"The signed x402 payment, base64 encoded, sent when retrying a request that answered 402. Only needed for paid requests.","schema":{"type":"string"}},"datasetId":{"name":"datasetId","in":"path","required":true,"description":"A dataset id from the dataset list. The example is a real published dataset, for clients that need a concrete address to try.","example":"bg.finance.credit_institutions","schema":{"type":"string"}},"version":{"name":"version","in":"path","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}\\.\\d+$"}},"format":{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json","csv","geojson"],"default":"json"}},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":25,"default":10}}}}}