Get Services Trade Data
comtrade_get_services_tradeFetch annual international trade-in-services data. Classification EB (default) serves each reporter-period as reported, in its own scheme (EB10, EB10S or EB02 codes); EB10 or EB02 selects UN Comtrade's conversion of other schemes into that one. Each row names its classification and whether it is original or converted. Same bilateral structure as goods trade: returns flow value in USD, period, and reporter/partner/category metadata for each row. Follow nextOffset for remaining records; each page repeats the upstream period requests. Use comtrade_list_service_categories to find a service code and its scheme before querying. Keyless preview makes one request per served period, at least 4 seconds apart, capped at 500 records per request. Services coverage is more limited than goods trade.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"reporter_code": "<reporter_code>",
"flow_code": "<flow_code>",
"period": "<period>"
},
"name": "comtrade_get_services_trade"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Records per page (default 25). Larger requests are limited to 1000 with a notice. | |
| offset | No | Number of retrieved records to skip. | |
| period | Yes | Annual periods YYYY. Serves the first 8 distinct periods keyless (12 with authenticated access); the rest, and any period whose request is rate limited, fails on a UN Comtrade server error or network failure, or runs out of time, are listed in unservedPeriods. Input ceiling 120. | |
| flow_code | Yes | Trade flow: M=imports (debits), X=exports (credits). | |
| partner_code | No | M49 partner code. Use 0 for all partners combined (World). Omitting it can return World alongside the partner breakdown. | |
| service_code | No | Service category code in one scheme: "7" (EB10), "SG" (EB10S) and "260" (EB02) are each financial services. Under EB a code returns rows only for periods reported in its scheme; comtrade_list_service_categories lists codes with their schemes. Omit to get every category the reporter reported, at mixed levels: totals (200 for EB10 and EB02, S for EB10S) beside their components, so do not sum the rows. | |
| reporter_code | Yes | M49 numeric code of the reporting country (0–999). | |
| classification | No | Services classification. EB (default): each reporter-period as reported, in its own scheme (EB10, EB10S or EB02 codes). EB10 or EB02: UN Comtrade's conversion of reports from other schemes into that one; reports made in it stay under EB. EB10S has no converted series; its rows are served only under EB. Case-insensitive; blank means EB. | EB |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| shown | No | Number of records on this page. | |
| notice | No | World overlap warnings, period failures, and guidance for empty results, including EB scheme coverage, ISO-3 counterpart codes, or partner_code 158 for Taiwan services. | |
| offset | No | Number of retrieved records skipped for this page. | |
| records | No | Services trade flow records. | |
| truncated | No | True when any preview response reached 500 and may be incomplete. | |
| limitClamp | No | Requested and applied page sizes when the limit was clamped. | |
| nextOffset | No | Offset for the next page when more records remain. | |
| totalCount | No | Sum of upstream response counts before local filtering; not a full match count when capped. | |
| truncationHint | No | Query narrowing and authenticated access guidance when possibly incomplete. | |
| referenceNotice | No | Reference descriptions unavailable; codes and values retained. | |
| unservedPeriods | No | Periods not served: past the period cap (8 keyless, 12 authenticated) or whose requests were rate limited, failed on a UN Comtrade server error or network failure, or ran out of time; query them separately. |