Humanitarian API
Learn more about the HDX Humanitarian API.
Introduction
The HDX Humanitarian API (HAPI) provides access to standardized humanitarian indicators from multiple sources through a single API so you can automate workflows, analysis, and visualizations. Our initial coverage aligns with the data included in the HDX Data Grids. HDX HAPI is designed for developers, researchers and anyone interested in accessing a centralized source of humanitarian data for analysis and decision-making.
HAPI is a REST API. Like most web-based APIs it follows Representational State Transfer principles, so you can use it from any programming language or tool that can make an HTTP request. HAPI is currently in beta.
Full reference and tutorials
This page set is a practical guide. For the complete, always-current list of endpoints and fields, see the API reference page and the interactive sandbox at hapi.humdata.org/docs.
For longer tutorials and per-theme data usage guides, see the full HAPI documentation at hdx-hapi.readthedocs.io.
How HAPI relates to the other HDX APIs
HAPI is one of the portfolio of HDX APIs. The Metadata endpoints return metadata about datasets on HDX, such as who published a dataset and when. HAPI returns the data values inside those datasets in a standard way.
The Tabular Data Endpoints let you query the contents of one tabular resource in detail. HAPI goes a step further by standardizing selected indicators across many HDX sources so they can be combined and compared.
Use HAPI when you want interoperable indicators across multiple sources and locations. This is data maintained by HDX through standardized HAPI pipelines. Use the Tabular Data Endpoints when you want to query a single specific resource which is directly from a contributor, not standardized HAPI data.
HAPI data comes from selected datasets on HDX. Numerical values are unchanged from the source. Only supporting fields, such as sector names, are standardized so that indicators from different sources can be combined and compared. See the HDX HAPI organization here.
Building a HAPI query
Every HAPI query combines four things: the base URL, a theme, an app identifier, and optional filters that narrow the results.

https://hapi.humdata.org/api/v2/coordination-context/operational-presence?app_identifier={your_app_identifier}&location_code=AFG
The following pages explain where to find the themes and filters, how to generate an app identifier, and how to page through results.
Feedback and support
HAPI is in beta and we are seeking feedback. To report a bug or request a feature or indicator, email hdx@un.org.
Last updated
Was this helpful?
