usda_esr_get_weekly_series
Retrieves weekly U.S. export sales for one commodity and destination across selected market years, returning records in week order and flagging years with no data.
Instructions
One destination's weekly US export sales of a commodity over market years, oldest first.
One ESRData_GetCountryData request per market year, at most 10. When end_year is
the current calendar year or later, the release list comes first, and a range past the
commodity's current market year raises NotFoundError naming the latest released one.
One call sends at most 11 requests, 44 attempts with retries. Records are ordered by week,
otherwise unchanged; a week in two market years comes in each, the older year's first.
meta.notes names each market year's count of rows, in order, and each passed over, one
ESR holds no data for (1900). Any other error stops the call and returns nothing. Where the
list is read and names end_year as current, meta.vintage is its release time as ESR
prints it and meta.published_at that time without a zone; otherwise both stay empty,
since the rows state no release and the list's time may be another market year's.
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": {
"commodity_code": "<commodity_code>",
"country_code": "<country_code>",
"start_year": "<start_year>",
"end_year": "<end_year>"
},
"name": "usda_esr_get_weekly_series"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_year | Yes | Last ESR market year, included, e.g. ``2024``; not before ``start_year`` and at most nine years after it (``start_year`` itself for one market year), and no later than the commodity's current market year: in October 2026, wheat's being 2027, 2024 to 2026 is four requests, 2024 to 2027 five, and 2024 to 2028 is refused after one; beef muscle cuts (1701), on the calendar year, refuse 2025 to 2027. A range ending before the current calendar year reads no release list (2023 to 2024 is two requests). | |
| start_year | Yes | First ESR market year, named by its end year, e.g. ``2022`` (for wheat June 2021 to May 2022); ``get_release_dates`` names a commodity's current one. | |
| country_code | Yes | ESR destination country code (not ISO), an integer, e.g. ``1220`` (Canada), ``2010`` (Mexico), ``5880`` (Japan); ``9990`` (UNKNOWN) is a destination like any other; ``list_countries`` lists them. | |
| commodity_code | Yes | ESR commodity code, an integer, e.g. ``104`` (Wheat - White), ``101`` (Wheat - HRW), ``801`` (Soybeans), ``1404`` (All Upland Cotton). |