Overview of an HS heading (SH4)
kyrodata_get_heading_overviewStructured read of ONE HS heading (SH4, 4 digits) for exports or imports: totals of the published year (USD FOB, kg), the last closed month against the previous one (average price per kg and volume), and a monthly price-by-volume series. year centres the overview and defaults to the most recent published year, with coverage starting in 2000; months sets only how far the series reaches back from the last published month, and leaves the totals untouched. A caveat states that US$/kg is an average unit value, not a quoted price. Public data. The output here is FIGURES and a series to reason over. The same heading as a citable document with a URL is kyrodata_fetch, and a comparison between two windows is kyrodata_compare_trade. Credit class: comex (up to 2 comex tools per 60-second session = 1 credit).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sh4 | Yes | The 4-digit HS heading to describe. | |
| flow | Yes | Direction of the trade flow, from Brazil’s side: `export` leaves the country, `import` enters it. | |
| year | No | Calendar year of the TOTALS (USD FOB, kg). Omit for the most recent published year; coverage starts in 2000. The month-over-month figures and the price-by-volume series always describe the latest published months, whatever `year` says. | |
| months | No | Length of the monthly series returned, counting back from the last published month. | |
| response_format | No | How much of the answer to return. `concise` (the default) carries the headline figures; `detailed` adds the row-level series behind them and counts against the export quota. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Raw numbers behind the text. | |
| memo | Yes | true = identical call in the last 10 min, served again: 0 credits. | |
| rows | No | Table rows; detailed only, capped per tool. | |
| error | No | Failure message when status = error. | |
| links | Yes | screen = product page with these numbers. | |
| denied | No | When status = denied: reason, feature, upgradeUrl. | |
| status | Yes | ok = data; denied = plan; error = failure or timeout. | |
| window | No | Like-for-like window: from, to (YYYY-MM), label, months, crossesSeason. | |
| caveats | Yes | Reading caveats. | |
| credits | Yes | charged, balance (null = unlimited), resetAt, session {charged, endsAt} of the 60-s billing session. | |
| sources | Yes | Per source: label, nameable, asOf. | |
| dataVersion | Yes | Identity of the data that answered. |