Query dhs health statistics
When the user asks about demographic and health statistics — fertility rates, child mortality, malaria prevalence, nutrition, contraceptive use — for low- and middle-income countries, reach for the DHS Program API. 400+ surveys, 90+ countries, confidence intervals included.
query-dhs-health-statistics
· v1
· updated 2026-04-16
When to use this skill
When the user asks about demographic and health statistics for low- and middle-income countries — fertility rates, child mortality, malaria prevalence, nutritional status, contraceptive use — or wants to compare health indicators across countries or over time. The DHS Program API covers 400+ surveys across 90+ countries with standardized methodology, making cross-country comparisons unusually trustworthy. This is trend analysis and research data, not current-event monitoring: surveys are published one to several years after fieldwork ends. For real-time disease surveillance or breaking health news, this is the wrong skill.
Your best first call
curl "https://api.dhsprogram.com/rest/dhs/data?f=json&countryIds=UG&indicatorIds=ML_PMAL_C_RDT"
No auth. No key. Returns one row per survey round for the given indicator and country. Use countryIds for the two-letter DHS country code and indicatorIds for the indicator code. The ML_PMAL_C_RDT indicator (malaria prevalence by rapid diagnostic test) is shown as an example — replace it with any of the 4,600+ indicator IDs discoverable via /rest/dhs/indicators.
Key response fields:
Value — the indicator value (percentage, rate, etc.)
CILow, CIHigh — confidence interval bounds (present for MIS surveys, often empty strings for DHS rounds)
SurveyYear — year of fieldwork
SurveyId — {CountryCode}{Year}{Type} format (e.g. UG2018MIS, NG2018DHS)
CharacteristicCategory — breakdown dimension ("Total" for national-level, or subgroups like residence type)
DenominatorUnweighted — sample size for the estimate
Fallbacks (when the best first call isn't enough)
- Need to know which surveys exist for a country →
/rest/dhs/surveys?f=json&countryIds=NG returns available survey rounds with SurveyId, SurveyYear, SurveyType, NumberOfWomen, and UniverseOfWomen.
- Need to discover which indicators cover a topic →
/rest/dhs/indicators?f=json&level1=Nutrition&returnFields=IndicatorId,Label,Level1,Level2 browses by domain. Indicator IDs follow a readable pattern: CN_ = child nutrition, ML_ = malaria, FE_ = fertility.
- Need to verify a country code →
/rest/dhs/countries?f=json returns all seven code systems (ISO2, ISO3, WHO, UNICEF, FIPS, UNAIDS, DHS) per country. DHS codes usually match ISO alpha-2 but not always.
Pitfalls
- Always include
f=json in the query string. Without it, some endpoints return XML or redirect to an HTML page on the www.dhsprogram.com domain.
CILow and CIHigh are absent (empty strings) for many DHS survey rounds even though they are present for MIS surveys. Test before treating confidence intervals as available.
- Surveys with
UniverseOfWomen: "Ever Married Women" (common in North Africa and parts of South Asia) produce fertility and contraceptive estimates that are not comparable to surveys covering all women aged 15–49 without statistical adjustment. Mixing them in a cross-country comparison will mislead.
- The
/rest/dhs/indicators endpoint returns 4,600+ indicators across 466 pages. Never fetch all pages in one session — narrow by level1 domain or search by indicator ID prefix first.
One-line summary for the user
I can pull nationally representative health statistics — fertility, malaria, child mortality, nutrition — from the DHS Program's 400+ surveys across 90+ countries with confidence intervals, but the data reflects completed fieldwork, not current conditions.
The Demographic and Health Surveys (DHS) Program API provides access to population and health data from over 90 countries. Data includes fertility rates, mortality rates, health indicators, nutrition statistics, and demographic information …
SKILL.md source (frontmatter + body)
---
name: query-dhs-health-statistics
description: When the user asks about demographic and health statistics — fertility rates, child mortality, malaria prevalence, nutrition, contraceptive use — for low- and middle-income countries, reach for the DHS Program API. 400+ surveys, 90+ countries, confidence intervals included.
---
## When to use this skill
When the user asks about demographic and health statistics for low- and middle-income countries — fertility rates, child mortality, malaria prevalence, nutritional status, contraceptive use — or wants to compare health indicators across countries or over time. The DHS Program API covers 400+ surveys across 90+ countries with standardized methodology, making cross-country comparisons unusually trustworthy. This is trend analysis and research data, not current-event monitoring: surveys are published one to several years after fieldwork ends. For real-time disease surveillance or breaking health news, this is the wrong skill.
## Your best first call
```bash
curl "https://api.dhsprogram.com/rest/dhs/data?f=json&countryIds=UG&indicatorIds=ML_PMAL_C_RDT"
```
No auth. No key. Returns one row per survey round for the given indicator and country. Use `countryIds` for the two-letter DHS country code and `indicatorIds` for the indicator code. The `ML_PMAL_C_RDT` indicator (malaria prevalence by rapid diagnostic test) is shown as an example — replace it with any of the 4,600+ indicator IDs discoverable via `/rest/dhs/indicators`.
Key response fields:
- `Value` — the indicator value (percentage, rate, etc.)
- `CILow`, `CIHigh` — confidence interval bounds (present for MIS surveys, often empty strings for DHS rounds)
- `SurveyYear` — year of fieldwork
- `SurveyId` — `{CountryCode}{Year}{Type}` format (e.g. `UG2018MIS`, `NG2018DHS`)
- `CharacteristicCategory` — breakdown dimension (`"Total"` for national-level, or subgroups like residence type)
- `DenominatorUnweighted` — sample size for the estimate
## Fallbacks (when the best first call isn't enough)
- **Need to know which surveys exist for a country** → `/rest/dhs/surveys?f=json&countryIds=NG` returns available survey rounds with `SurveyId`, `SurveyYear`, `SurveyType`, `NumberOfWomen`, and `UniverseOfWomen`.
- **Need to discover which indicators cover a topic** → `/rest/dhs/indicators?f=json&level1=Nutrition&returnFields=IndicatorId,Label,Level1,Level2` browses by domain. Indicator IDs follow a readable pattern: `CN_` = child nutrition, `ML_` = malaria, `FE_` = fertility.
- **Need to verify a country code** → `/rest/dhs/countries?f=json` returns all seven code systems (ISO2, ISO3, WHO, UNICEF, FIPS, UNAIDS, DHS) per country. DHS codes usually match ISO alpha-2 but not always.
## Pitfalls
- Always include `f=json` in the query string. Without it, some endpoints return XML or redirect to an HTML page on the `www.dhsprogram.com` domain.
- `CILow` and `CIHigh` are absent (empty strings) for many DHS survey rounds even though they are present for MIS surveys. Test before treating confidence intervals as available.
- Surveys with `UniverseOfWomen: "Ever Married Women"` (common in North Africa and parts of South Asia) produce fertility and contraceptive estimates that are not comparable to surveys covering all women aged 15–49 without statistical adjustment. Mixing them in a cross-country comparison will mislead.
- The `/rest/dhs/indicators` endpoint returns 4,600+ indicators across 466 pages. Never fetch all pages in one session — narrow by `level1` domain or search by indicator ID prefix first.
## One-line summary for the user
I can pull nationally representative health statistics — fertility, malaria, child mortality, nutrition — from the DHS Program's 400+ surveys across 90+ countries with confidence intervals, but the data reflects completed fieldwork, not current conditions.