get_breadth
How widespread a rise or fall in one country's trade is: for each month, the share of items (HS2 chapters, HS4 headings or HS6 subheadings, all or under one chapter) whose value in the latest window of 3 or 12 months is higher than in the same months a year earlier. Two shares are given because small items can dominate a count: share_up_by_count counts every item once, share_up_by_value weights each item by its value. share_accelerating is the share of items whose year-on-year growth is higher than the same window's year-on-year growth 3 months earlier (out of n_items; items with no comparable figure 3 months earlier count as not accelerating); total_yoy is the change of the whole level. n_items is the number of items compared and n_excluded the number left out because they cannot be compared fairly (no comparable prior-year value, a missing month in the window, or a change of HS version for HS4 and HS6); they are counted in n_excluded and not guessed, and never counted as zero. A month with no figure is not in the series: notes give the reason (not_computed_yet, or definition_break when the source definition changed). Give "reporter" and "flow" (one country, one direction); "level" (default hs4), "parent" (a 2-digit chapter, only with hs4 or hs6), "window" (3 or 12, default 12), "from", "to" and "limit" (newest months first, default 36, at most 200). Use it for questions such as whether a rise in imports is broad or driven by a few items. Limits: at the hs2 level the HS revisions can move goods between chapters, so an hs2 change across an HS version change can be distorted; hs4 and hs6 windows that cross an HS version change are not compared. The figures are our own calculation from public customs statistics, not official figures. They show how widespread a movement is, not its causes: exchange rates, stocks, seasons and classification changes cannot be told apart here. Only reporters that are published are answered. Cross-country synchrony: instead of "reporter" give "reporters" (2 to 4 countries; level hs2 only, all chapters): the answer then holds each country's series over the months common to all of them (newest 24) and a synchrony block with the share of those months in which the countries' total_yoy moved in the same direction and the correlation of total_yoy and of share_up_by_value (null with a reason when there are fewer than 12 common months or no variation). With 3 or 4 countries every pair is listed in synchrony.pairs; the top-level share pools the months of all pairs and the correlations are the simple mean of the pairwise ones. Only per-country totals are compared, never items between countries; the sample is only the countries given, and the correlation is indicative, not a forecast and not a cause. Reference information computed mechanically from public statistics; not investment advice, a credit rating or a trading recommendation.
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": {
"flow": "<flow>"
},
"name": "get_breadth"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Optional. Last month, YYYY-MM, or a year, YYYY (read as YYYY-12). Default: the latest month. | |
| flow | Yes | Required. "import" (goods entering the reporting country) or "export" (goods leaving it); there is no combined view: "both" does not exist. For a comparison across countries use compare_countries, for exports minus imports use get_balance. | |
| from | No | Optional. First month, YYYY-MM, or a year, YYYY (read as YYYY-01). | |
| level | No | Optional. The level of the items counted: hs2 (chapters), hs4 (headings, default) or hs6 (subheadings). | |
| limit | No | Optional. Number of newest months to return (default 36, at most 200). | |
| parent | No | Optional. A 2-digit HS chapter (e.g. "85"): only the items under it are counted. Only with level hs4 or hs6. Omit for all items of the level. | |
| window | No | Months in the window compared with the same months a year earlier: 3 or 12 (default 12). | |
| reporter | No | The reporting country whose customs statistics are read (JP, US, GB or EU). Give "reporter" OR "reporters"; flow is required. | |
| reporters | No | Optional, instead of reporter: 2 to 4 countries ("JP", "US", "GB" or "EU") whose hs2 breadth is compared (a comma-separated list in a query string). Level must be hs2 or omitted. |