UN Comtrade Data Availability
comtrade.trade.availabilityCheck which trade datasets are available in UN Comtrade for a given reporter country and period. Returns dataset metadata including total record count, first/last release dates, and classification codes. Useful for discovering what data exists before querying comtrade.trade_data. Coverage varies by country — developed economies report more frequently and with fewer delays than others. Source: UN Comtrade public preview API, no auth.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | Filter by reference period. Annual: 4-digit year (e.g. "2022"). Monthly: YYYYMM (e.g. "202209"). Omit to list all available periods. | |
| cmd_code | No | Filter by commodity code (e.g. "84", "TOTAL"). Omit for all commodities. | |
| flow_code | No | Filter by trade flow: M=Imports, X=Exports, MX=Both. Omit for all flows. | |
| freq_code | No | Frequency. A=Annual (default), M=Monthly. | |
| type_code | No | Data type. C=Commodities (default), S=Services. | |
| reporter_code | No | UN numeric code for the reporting country to check. Omit to list all available reporters. Example: 276=Germany, 840=USA, 156=China. | |
| classification | No | Classification system. HS=Harmonized System (default). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present only when the call failed. Includes error code, message, request_id, and any provider-specific extras. | |
| result | No | Tool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response. |