Query WHO GHO Indicator Data
who_query_indicator_dataQuery data rows for a single WHO GHO indicator with optional spatial, temporal, and dimension filters. Returns rows with numeric values, uncertainty intervals (Low/High), and spatial/time metadata. This is the primary data-fetching tool in the find-then-query workflow: use who_search_indicators to find the indicator code, optionally call who_get_indicator_metadata to confirm which filter dimensions are valid, then call this tool. Spatial filters are mutually exclusive per call: provide only one of country_codes, region_codes, or income_group_codes — mixing them triggers an error. Omitting all spatial filters returns all geographies (may be large; use limit to cap). The sex filter only applies when the indicator uses SEX as its first cross-cutting dimension — if not, the filter returns empty rows; check who_get_indicator_metadata first if uncertain. Rows are returned in a deterministic order (most recent first by default), so a capped result is the top of a defined slice rather than an arbitrary sample; page through the rest with offset.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sex | No | Filter on sex dimension: SEX_BTSX (both sexes), SEX_FMLE (female), SEX_MLE (male). Only applies when the indicator uses SEX as its first cross-cutting dimension. | |
| sort | No | Row ordering: "year_desc" (default) returns the most recent years first, "year_asc" the earliest first. Ties are broken by spatial code, then dimension, then row id. | year_desc |
| limit | No | Maximum number of data rows to return. Default 200, max 1000. | |
| offset | No | Zero-based row offset for pagination. Default 0. Pages are stable because rows are returned in a deterministic order — read hasMore and nextOffset from the response to continue. An offset at or beyond totalRows returns an empty rows array, not an error. | |
| year_to | No | End year (inclusive) for the time range filter, e.g. 2023. | |
| year_from | No | Start year (inclusive) for the time range filter, e.g. 2015. | |
| dim1_value | No | Value filter for indicators whose first cross-cutting dimension is not SEX (e.g. an AGEGROUP code like "YEARS05-14"). Ignored when sex is also provided. | |
| region_codes | No | WHO region codes to filter on, e.g. ["AFR","EUR","AMR","EMR","SEAR","WPR"]. Returns the aggregate row for each named WHO region — not per-country rows within it. To get country-level data for a region, use who_list_dimension_values with dimension="COUNTRY" and parent_code set to the region code to retrieve the ISO codes for countries in that region, then pass those to country_codes. Use who_list_dimension_values with dimension="REGION" to see all valid region codes. Mutually exclusive with country_codes and income_group_codes. | |
| country_codes | No | ISO 3166-1 alpha-3 country codes to filter on, e.g. ["JPN","USA","BRA"]. Mutually exclusive with region_codes and income_group_codes. | |
| indicator_code | Yes | Indicator code to query, e.g. "WHOSIS_000001". Use who_search_indicators to find codes. | |
| income_group_codes | No | World Bank income group codes, e.g. ["WB_HI","WB_LMI","WB_LI","WB_UMI"]. Use who_list_dimension_values with dimension="WORLDBANKINCOMEGROUP" to see all valid codes. Mutually exclusive with country_codes and region_codes. | |
| include_uncertainty | No | Include Low and High uncertainty interval bounds in output. Default true. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | No | Data rows matching the query. | |
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Present when rows were withheld or the requested offset ran past the end of the result set. Explains how to reach the remaining rows. | |
| offset | No | Zero-based row offset this page started at. | |
| hasMore | No | True when rows remain beyond this page. Pair with nextOffset to continue. | |
| pageInfo | No | Human-readable page position, e.g. "offset 0, showing 200 of 12936". Use to construct the next offset. | |
| totalRows | No | Total row count matching the query on the server (before the limit is applied). | |
| truncated | No | True when the result was capped at the requested limit. | |
| nextOffset | No | Offset to request for the next page. Absent when this page reached the end of the result set. | |
| totalCount | No | Alias of totalRows for cross-tool consistency — total rows before the limit. | |
| appliedFilters | No | Filters that were applied to the query. |