# ADH UN Trade Statistics — UN Comtrade Import/Export Data

> ADH UN Trade Statistics — UN Comtrade Import/Export Data is a paid API for AI agents from agentdatum.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Fetches processed United States international trade statistics from UN Comtrade, including total import/export values, trade balance, and top trading partners for a given year.

## Facts

- Endpoint: GET https://agentdatum.com/api/v1/d/un-trade-stats
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/adh-un-trade-statistics-un-comtrade-import-export-data-11abf704
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JPRYx5PmlEgAEvwdt8wLL

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability adh-un-trade-statistics-un-comtrade-import-export-data-11abf704
```

Example prompt: Pull the latest UN Comtrade trade statistics for the United States — I want to see total imports, total exports, the trade balance, and who the top trading partners are.

## When to prefer this

Choose this endpoint when you need official UN-sourced US international trade statistics — import totals, export totals, trade balance, and top trading partners — processed and cleaned by ADH's financial intelligence layer to avoid double-counting pitfalls. Prefer this over raw UN Comtrade API calls when you want entity-resolved, timestamped, ready-to-use trade data at $0.01 per call without managing API keys or rate limit logic yourself. Best for macro regime analysis, geopolitical trade monitoring, and financial due diligence workflows requiring authoritative bilateral trade figures.

## Known failure modes

- UN Comtrade free tier rate limits may truncate results, returning partial data with a note in the response
- Payment failure via x402 protocol returns 402 status before data is delivered
- Stale or cached data if UN Comtrade upstream hasn't updated — check collected_at timestamp
- Missing net_weight_kg fields are expected (null) for aggregate commodity rows
- Top partner arrays may return duplicate entries due to upstream data quirks in the free tier

## How this service works

ADH 金融情报层：把 239 个原始数据源洗成带实体解析、时间同步、溯源与派生结论的情报（宏观regime / 加密尽调 / 事件窗口），免费注入你的 AI 上下文。Agent 走 x402 结算，人类订阅（PayPal）即将上线。

## Output

Returns a JSON object with raw trade records from UN Comtrade, the reporting period (year), total number of records, reporter country (United States), total export value in USD, total import value in USD, trade balance in USD (exports minus imports), top export partners as ranked pairs, top import partners as ranked pairs, a note about methodology (World aggregate row used to avoid double-counting), the data source identifier (un-comtrade-public), data type label, and a timestamp for when the data was collected.

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "raw": {
   "data": [
    {
     "flow": "Import",
     "year": 2023,
     "partner": "World",
     "reporter": "United States",
     "commodity": "TOTAL (all HS commodities)",
     "value_usd": 3168471121076,
     "net_weight_kg": null,
     "partner_code_m49": 0
    },
    {
     "flow": "Import",
     "year": 2023,
     "partner": "World",
     "reporter": "United States",
     "commodity": "TOTAL (all HS commodities)",
     "value_usd": 3168471121076,
     "net_weight_kg": null,
     "partner_code_m49": 0
    }
   ],
   "period": 2023,
   "records": 447,
   "reporter": "United States",
   "total_export_usd": 2018542583771,
   "total_import_usd": 3168471121076,
   "trade_balance_usd": -1149928537305,
   "top_export_partners": [
    [
     "Canada",
     "Canada"
    ],
    [
     "Canada",
     "Canada"
    ]
   ],
   "top_import_partners": [
    [
     "Mexico",
     "Mexico"
    ],
    [
     "Mexico",
     "Mexico"
    ]
   ]
  },
  "note": "Totals taken from the World aggregate row (partner_code_m49=0) to avoid double counting. UN Comtrade free tier returns M",
  "source": "un-comtrade-public",
  "data_type": "贸易",
  "collected_at": "2026-08-09T18:40:51Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/adh-un-trade-statistics-un-comtrade-import-export-data-11abf704/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentdatum.com](https://www.zero.xyz/host/agentdatum.com/llms.txt)
