UN Comtrade · Schema
UN Comtrade API Response Envelope
Standard response envelope returned by all UN Comtrade API endpoints.
TradeInternational TradeImportExportStatisticsUnited NationsEconomicsCommoditiesBilateral TradeHS CodesSITC
Properties
| Name | Type | Description |
|---|---|---|
| elapsedMs | integer | Server-side processing time in milliseconds |
| count | integer | Number of records returned in this response |
| data | array | Array of result records; schema varies by endpoint |
| error | stringnull | Error message if the request failed; null on success |
| validationStatus | string | Validation status message for the request parameters |
| countReleased | integernull | Total records available in the dataset for this query (may exceed count) |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/un-comtrade/main/json-schema/api-response.json",
"title": "UN Comtrade API Response Envelope",
"description": "Standard response envelope returned by all UN Comtrade API endpoints.",
"type": "object",
"properties": {
"elapsedMs": {
"type": "integer",
"minimum": 0,
"description": "Server-side processing time in milliseconds"
},
"count": {
"type": "integer",
"minimum": 0,
"description": "Number of records returned in this response"
},
"data": {
"type": "array",
"description": "Array of result records; schema varies by endpoint",
"items": {}
},
"error": {
"type": ["string", "null"],
"description": "Error message if the request failed; null on success"
},
"validationStatus": {
"type": "string",
"description": "Validation status message for the request parameters"
},
"countReleased": {
"type": ["integer", "null"],
"description": "Total records available in the dataset for this query (may exceed count)"
}
},
"required": ["count", "data"],
"additionalProperties": true
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/api-response"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.