UN Comtrade (comtradeplus.un.org) · Dataset metadata
comtradeplus-un-org/trade-statistics/dataset_metadataGet market and financial data with UN Comtrade (comtradeplus.un.org) · Dataset metadata from Alexandria through one Spiral API key. How a reporter's figures for a year were compiled (CIF vs FOB, general vs special trade system, source agency note, revision date) before comparing them with another reporter's. It runs in the background and returns structured JSON. Pay as you go, with no subscription.
Pricing
$0.00873 per call.
Limits
- Runs
- In the background
- Returns
- json
- Longest queue wait
- 1 hour
- Run deadline
- 5 minutes
- Longest run, end to end
- 225 minutes
- Largest inline input
- 1 MB
- Largest input file
- 2 GB
- Largest output
- 5 GB
Input
| Field | Kind | Default | Description |
|---|---|---|---|
period required | text | — | Period(s) YYYY or YYYYMM, comma-separated. Pattern: ^\d{4}(\d{2})?(,\d{4}(\d{2})?)*$. |
reporter_code required | text | — | UN M49 numeric reporter code(s), comma-separated (156 China, 842 USA, 276 Germany). Look codes up with reference_codes table=Reporters. Pattern: ^\d{1,4}(,\d{1,4})*$. |
freq_code | one of A, M | A | Frequency: A annual (period YYYY), M monthly (period YYYYMM). |
type_code | one of C, S | C | Type of trade: C commodities (goods), S services. |
classification | one of HS, H6, H5, H4, H3, H2, H1, H0, S4, S3, S2, S1, BE, BE5, EB, EB10, EB02, EBS | HS | Product classification in the URL path: HS (as reported, any HS edition), H0-H6 (a specific HS edition), S1-S4 (SITC), BE/BE5 (BEC), EB/EB10/EB02/EBS (EBOPS, services). |
Same request in code
curl https://api.spiral.ai/v1/runs \
-H "Authorization: Bearer $SPIRAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"provider": "alexandria",
"model": "comtradeplus-un-org/trade-statistics/dataset_metadata",
"input": {
"period": "<period>",
"reporter_code": "<reporter_code>"
}
}'Frequently asked questions
How much does UN Comtrade (comtradeplus.un.org) · Dataset metadata cost?
$0.00873 per call. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.
How do I use UN Comtrade (comtradeplus.un.org) · Dataset metadata through an API?
Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "comtradeplus-un-org/trade-statistics/dataset_metadata"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.
Do I need an account with Alexandria to use UN Comtrade (comtradeplus.un.org) · Dataset metadata?
No. Spiral runs it on its own Alexandria account and charges your Spiral balance.
Can my AI agent use UN Comtrade (comtradeplus.un.org) · Dataset metadata?
Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.