Comtrade
economic__comtradeQuery international trade data from the UN Comtrade database to analyze imports, exports, and trade flows between countries.
Instructions
[Economic & Financial Data Agent] Query international trade data from the United Nations Comtrade database. Source: United Nations Comtrade (UN Terms of Use), updates daily. Returns the Katzilla envelope { data, quality, citation } — quality scores freshness/uptime/confidence; citation carries the source URL, license, and a SHA-256 data hash for audit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reporterCode | No | Reporter country code (842 = USA) | 842 |
| partnerCode | No | Partner code (0 = World) | 0 |
| period | No | Year (UN Comtrade data lags ~2 years) | 2024 |
| flowCode | No | Trade flow (M = imports, X = exports) | M |
| cmdCode | No | Commodity code (TOTAL for aggregate) | TOTAL |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Structured payload from the upstream source. | |
| text | No | Pre-rendered text representation, when applicable. | |
| quality | Yes | Quality scorecard: freshness, uptime, completeness, confidence, certainty. | |
| citation | Yes | Provenance block — source, license, retrieval timestamp, SHA-256 data hash, pre-formatted citation text. |