UN SDG Data Query
unsdg.data.queryQuery UN SDG time-series indicator data by series code. Returns country-level or regional annual measurements for indicators like poverty rates, maternal mortality, CO2 emissions, literacy rates, and more. Filter by UN M49 geo area code (e.g. "356" for India, "840" for USA) and/or year range. Each record includes the geo area, year, value, source, and any disaggregation dimensions (age, sex, urbanization). Get series codes from unsdg.indicators.list; get geo area codes from unsdg.geo.countries.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of records to return per page (1-200, default 50). Large series may have thousands of records across countries and years. | |
| end_year | No | Filter data records up to and including this year (e.g. 2023). Combined with start_year to define a time range. | |
| start_year | No | Filter data records starting from this year (e.g. 2010). Combined with end_year to define a time range. | |
| series_code | Yes | UN SDG series code to query (e.g. "SI_POV_DAY1" for poverty rate, "SH_STA_MORT" for maternal mortality, "EN_ATM_CO2" for CO2 emissions). Obtain series codes from unsdg.indicators.list. | |
| geo_area_code | No | UN M49 numeric geo area code to filter by country or region (e.g. "356" for India, "840" for USA, "076" for Brazil). Use unsdg.geo.countries to look up codes. |
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. |