Data source: UN Stats SDG API v5
https://context.gnist.ai/rest/unsdg/
AuthenticationAll requests require a Gnist-API-Key header (or api_key query parameter).
Free tier: 100 calls/day. Get your API key.
Tools (8)
list_sdg_goalsget_goal_targetsget_sdg_indicator_dataget_sdg_series_datasearch_sdg_geo_areasget_sdg_series_dimensionsget_sdg_data_availabilityreport_feedback
list_sdg_goalsList all 17 UN Sustainable Development Goals.
Returns each goal's code (1-17), title, and description. Use the goal code
to explore targets and indicators via get_goal_targets.
Examples:
list_sdg_goals() → All 17 goals (poverty, hunger, health, education, etc.)
{
"query": "example"
}get_goal_targetsGet targets and indicators for a specific SDG goal.
Returns the goal's targets (e.g. 1.1, 1.2) with their indicators and
data series codes. Use series codes with get_sdg_series_data for actual values.
Examples:
get_goal_targets(1) → Targets for 'No Poverty' (1.1 extreme poverty, 1.2 national poverty...)
get_goal_targets(13) → Targets for 'Climate Action'
| Parameter | Type | Required | Description |
|---|---|---|---|
goal_code | integer | required | SDG goal number (1-17). E.g. 1 = No Poverty, 13 = Climate Action. |
{
"goal_code": 1
}get_sdg_indicator_dataGet observation data for SDG indicators.
Returns time-series data for the specified indicators, optionally filtered
by country and time period. Each observation includes value, source,
geographic area, and any dimension breakdowns (age, sex, location, etc.).
Examples:
get_sdg_indicator_data(['1.1.1'], [156], 2010, 2023) → China poverty rate 2010-2023
get_sdg_indicator_data(['4.1.1'], [578]) → Norway education completion data
get_sdg_indicator_data(['13.2.2']) → All countries' greenhouse gas emissions
Returns:
Paginated observations with value, source, geo area, time period, and dimensions.
| Parameter | Type | Required | Description |
|---|---|---|---|
indicator_codes | list[string] | required | Indicator code(s), e.g. ['1.1.1'] for extreme poverty rate. |
area_codes | any | optional | Geo area code(s). E.g. [578] for Norway, [840] for USA. Use search_sdg_geo_areas to find codes. |
time_start | any | optional | Start year (e.g. 2015). |
time_end | any | optional | End year (e.g. 2023). |
page | integer | optional | Page number (default 1). (default: 1) |
page_size | integer | optional | Results per page, max 200 (default 50). (default: 50) |
{
"indicator_codes": [
"example"
]
}get_sdg_series_dataGet observation data for specific SDG data series.
More granular than indicator data — a single indicator may have multiple series
with different measurement methodologies. Use get_goal_targets to discover
available series codes.
Examples:
get_sdg_series_data(['SI_POV_DAY1'], [840], 2000, 2023) → US $2.15/day poverty
get_sdg_series_data(['EN_ATM_GHGT_AIP'], [578]) → Norway greenhouse gas index
Returns:
Paginated observations with value, source, and disaggregation dimensions.
| Parameter | Type | Required | Description |
|---|---|---|---|
series_codes | list[string] | required | Series code(s), e.g. ['SI_POV_DAY1'] for poverty rate. |
area_codes | any | optional | Geo area code(s). E.g. [578] for Norway. |
time_start | any | optional | Start year. |
time_end | any | optional | End year. |
page | integer | optional | Page number. (default: 1) |
page_size | integer | optional | Results per page, max 200. (default: 50) |
{
"series_codes": [
"example"
]
}search_sdg_geo_areasSearch for SDG geo area codes by name.
Returns matching country and region codes that can be used with the
indicator and series data tools.
Examples:
search_sdg_geo_areas('Norway') → [{'code': '578', 'name': 'Norway'}]
search_sdg_geo_areas('Africa') → All African regions and sub-regions
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | Search term for country or region name (e.g. 'Norway', 'Africa'). |
{
"query": "NO"
}get_sdg_series_dimensionsGet available dimensions (disaggregations) for a data series.
Shows what breakdowns are available — age groups, sex, location type,
reporting type, etc. Useful for understanding what granularity exists
before querying data.
Examples:
get_sdg_series_dimensions('SI_POV_DAY1') → Age, Sex, Reporting Type dimensions
| Parameter | Type | Required | Description |
|---|---|---|---|
series_code | string | required | Series code, e.g. 'SI_POV_DAY1'. |
{
"series_code": "example"
}get_sdg_data_availabilityGet which countries and regions have data for a specific series.
Useful for checking data coverage before querying — not all series
have data for all countries.
Examples:
get_sdg_data_availability('SI_POV_DAY1') → Countries with poverty data
| Parameter | Type | Required | Description |
|---|---|---|---|
series_code | string | required | Series code, e.g. 'SI_POV_DAY1'. |
{
"series_code": "example"
}report_feedbackReport a bug, feature request, or general feedback for this data source.
Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.
Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |
{
"feedback": "example"
}Quick Start
curl -X POST "https://context.gnist.ai/rest/unsdg/get_goal_targets" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"goal_code": 1}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/rest/unsdg/get_goal_targets",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={
"goal_code": 1
},
)
print(resp.json())