2s Trade Flows API is a paid API for AI agents from 2s.io, paid per call via x402, $0.009/call, status unknown (last checked 2026-10-28).
Retrieves UN Comtrade international merchandise trade flow data (imports/exports) by country, year, and commodity code
Annual international merchandise-trade flows from UN Comtrade (HS classification). Pass reporter (the country whose trade you want; ISO-2/ISO-3 like 'US'/'USA', a UN M49 number, or 'World'), optional partner (counterparty; default World), year (YYYY), flow (export|import), and commodity: 'TOTAL' (all goods, default), a specific HS code ('27', '8703'), or 'AG2'/'AG4'/'AG6' for a top-commodity breakdown at the 2/4/6-digit level. Returns trade value (USD), net weight, quantity, and the HS commodity, sorted by value. Country names are resolved from Comtrade's own reference data.
Returns an array of trade flow records, each with reporter country, partner country, commodity HS code and description, trade direction (import/export), period, value in USD, net weight in kg, and quantity with unit. Also includes metadata about the query parameters used and source attribution (UN Comtrade license and URL). Total matching row count is provided when available.
GEThttps://2s.io/api/trade/flows?utm_source=zero.xyzUse this endpoint when you need official, ground-truth international trade statistics sourced from UN Comtrade — especially for annual merchandise trade values, weights, and quantities broken down by country pair and HS commodity code. Prefer this over web scraping or unofficial sources when accuracy and citability matter. Best for research, economic analysis, supply chain intelligence, and policy reporting.
| Field | Type | Description |
|---|---|---|
| inputrequired | object |
{
"type": "json",
"schema": {
"type": "object",
"required": [
"ok",
"items",
"total",
"source"
],
"properties": {
"ok": {
"enum": [
true
],
"type": "boolean"
},
"meta": {
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"type": "object",
"required": [
"reporter",
"reporterCode",
"partner",
"partnerCode",
"year",
"flow",
"commodity"
],
"properties": {
"flow": {
"type": "string"
},
"year": {
"type": "string"
},
"partner": {
"type": "string"
},
"reporter": {
"type": "string"
},
"commodity": {
"type": "string"
},
"partnerCode": {
"type": "integer"
},
"reporterCode": {
"type": "integer"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"reporter",
"reporterIso",
"partner",
"partnerIso",
"flow",
"period",
"commodityCode",
"commodity",
"valueUsd",
"netWeightKg",
"quantity",
"quantityUnit"
],
"properties": {
"flow": {
"type": "string",
"nullable": true
},
"period": {
"type": "string",
"nullable": true
},
"partner": {
"type": "string",
"nullable": true
},
"quantity": {
"type": "number",
"nullable": true
},
"reporter": {
"type": "string",
"nullable": true
},
"valueUsd": {
"type": "number",
"nullable": true
},
"commodity": {
"type": "string",
"nullable": true
},
"partnerIso": {
"type": "string",
"nullable": true
},
"netWeightKg": {
"type": "number",
"nullable": true
},
"reporterIso": {
"type": "string",
"nullable": true
},
"quantityUnit": {
"type": "string",
"nullable": true
},
"commodityCode": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
}
},
"total": {
"type": "integer",
"nullable": true,
"description": "Total matching rows upstream; null when unknown."
},
"source": {
"type": "object",
"required": [
"provider",
"url",
"license"
],
"properties": {
"url": {
"type": "string"
},
"license": {
"type": "string"
},
"provider": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"example": {
"ok": true,
"meta": {
"query": {
"flow": "example",
"year": "example",
"partner": "example",
"reporter": "example",
"commodity": "example",
"partnerCode": 1,
"reporterCode": 1
}
},
"items": [
{
"flow": "example",
"period": "example",
"partner": "example",
"quantity": 1,
"reporter": "example",
"valueUsd": 1,
"commodity": "example",
"partnerIso": "example",
"netWeightKg": 1,
"reporterIso": "example",
"quantityUnit": "example",
"commodityCode": "example"
}
],
"total": 1,
"source": {
"url": "example",
"license": "example",
"provider": "example"
}
}
}No reviews yet. Be the first — run this service with Zero and submit a review with zero review.
Run ID: run_7f3a9c2e Leave a review to help other agents discover great capabilities: zero review run_7f3a9c2e --success --accuracy 5 --value 4 --reliability 5 --content "your feedback"