Overview
The Humanitarian Data Exchange (HDX) is an initiative by the United Nations Office for the Coordination of Humanitarian Affairs (OCHA) dedicated to making humanitarian data openly available. Established in 2014, HDX serves as a platform for collecting, sharing, and using data across the humanitarian ecosystem data.humdata.org/about. Its primary goal is to improve the speed and effectiveness of humanitarian response by ensuring that responders, researchers, and policymakers have access to the information needed for decision-making.
The platform hosts a wide array of datasets covering various aspects of humanitarian crises, including population figures, displacement statistics, health indicators, food security data, and infrastructure damage assessments. These datasets originate from diverse sources, such as UN agencies, NGOs, national governments, and academic institutions. Each dataset on HDX includes metadata to ensure discoverability and context, often complying with common data standards to facilitate interoperability.
The HDX API provides programmatic access to this extensive data repository HDX API documentation. Developers and data scientists can use the API to integrate humanitarian data directly into their applications, analytical tools, or research workflows. This enables automated data retrieval, bulk downloads, and the creation of custom visualizations or dashboards. The API supports various query parameters, allowing users to filter data by country, crisis, organization, and other attributes, making it suitable for specific analytical needs.
HDX is particularly well-suited for organizations and individuals involved in humanitarian crisis response, providing critical information during emergencies. Researchers can leverage the aggregated data for academic studies on global crises, disaster preparedness, and aid effectiveness. Journalists can utilize the data to support evidence-based reporting on humanitarian situations. Furthermore, NGOs and other aid organizations can integrate HDX data into their operational planning and impact assessment processes, enhancing their ability to respond to and mitigate the effects of crises.
The platform is designed to be accessible, offering its services and data free of charge to all users. This commitment to open data aligns with broader initiatives to improve data sharing in the public interest, such as those promoted by the UN Data portal, which aggregates statistical data from across the UN system. HDX's focus on humanitarian contexts distinguishes it by providing specialized datasets and tools tailored to the unique demands of emergency response and long-term recovery efforts.
Key features
- Extensive Data Repository: Access thousands of humanitarian datasets covering over 200 countries and territories, including data on conflicts, natural disasters, health emergencies, and population movements HDX About page.
- Programmatic API Access: Utilize the HDX API for automated retrieval of datasets, metadata, and resources, enabling integration with custom applications and analytical workflows.
- Country and Crisis Pages: Dedicated pages provide aggregated data and context for specific countries and ongoing humanitarian crises, allowing for focused data exploration.
- Data Explorer and Visualization Tools: Interactive tools for browsing, filtering, and visualizing data directly within the HDX platform, aiding in initial data assessment.
- Metadata Enrichment: Each dataset includes comprehensive metadata, tags, and descriptions to ensure discoverability and provide necessary context for data interpretation.
- Open Data Licensing: All data on the platform is shared under open licenses, promoting free use, redistribution, and modification for any purpose, with appropriate attribution.
- Community Contributions: Facilitates data sharing from various humanitarian organizations, UN agencies, NGOs, and academic institutions, fostering a collaborative data ecosystem.
Pricing
As of 2026-05-28, all data and services provided by the Humanitarian Data Exchange are free for all users. There are no subscription fees, data usage charges, or API access costs associated with the platform.
| Service/Feature | Cost (as of 2026-05-28) | Notes |
|---|---|---|
| Data Access | Free | Access to all datasets on the HDX platform. |
| API Usage | Free | Unlimited programmatic access to the HDX API. |
| Platform Tools | Free | Use of data explorer, visualization, and download features. |
| Support | Free | Community support and documentation. |
Common integrations
- Python Data Science Libraries: Integrates with Python libraries such as Pandas, NumPy, and Matplotlib for data processing, analysis, and visualization of humanitarian datasets HDX API documentation.
- R Statistical Software: Data can be imported into R for statistical analysis and graphical representation, leveraging R's extensive package ecosystem for research.
- GIS Software (e.g., ArcGIS, QGIS): Humanitarian spatial data from HDX can be integrated into Geographic Information Systems for mapping and spatial analysis within crisis zones ArcGIS Python API.
- Business Intelligence Tools (e.g., Tableau, Power BI): Data extracted from HDX can be loaded into BI platforms to create interactive dashboards and reports for operational insights.
- Web Applications: Developers can build custom web applications that display real-time or frequently updated humanitarian data, supporting operational planning and public awareness.
- Automated Data Pipelines: The API can be used to set up automated scripts for regular data fetching and updates, ensuring that analyses and applications always use the latest available information.
Alternatives
- World Bank Open Data: Offers a vast collection of development data, including economic, social, and environmental indicators, often used for long-term development planning and research.
- UN Data: A central point of access to a wide range of statistical data produced by the UN System, covering global statistics on various topics.
- Kaggle: A platform for data science and machine learning, hosting a large repository of publicly available datasets contributed by its community, some of which are humanitarian in nature.
- AWS Public Datasets: Provides access to large-scale public datasets, including some relevant to geospatial analysis and environmental monitoring, directly usable within AWS services.
Getting started
To get started with the Humanitarian Data Exchange API, you can use Python to fetch datasets. The HDX API is built on CKAN, and you can interact with it using standard HTTP requests or a CKAN client library. No API key is strictly required for public data access, though it can be used for authenticated actions if available.
Here's a basic example in Python to list available datasets and fetch details for a specific dataset:
import requests
HDX_BASE_URL = "https://data.humdata.org/api/3/action/"
def list_datasets():
"""Lists all available datasets on HDX."""
url = HDX_BASE_URL + "package_list"
response = requests.get(url)
response.raise_for_status() # Raise an exception for HTTP errors
data = response.json()
if data["success"]:
print("--- Available Datasets ---")
for dataset_name in data["result"][:10]: # Print first 10 for brevity
print(f"- {dataset_name}")
print(f"...Total {len(data['result'])} datasets")
else:
print(f"Error listing datasets: {data['error']}")
def get_dataset_details(dataset_id_or_name):
"""Fetches details for a specific dataset."""
url = HDX_BASE_URL + "package_show"
params = {"id": dataset_id_or_name}
response = requests.get(url, params=params)
response.raise_for_status()
data = response.json()
if data["success"]:
dataset = data["result"]
print(f"\n--- Details for Dataset: {dataset['title']} ({dataset['name']}) ---")
print(f"Description: {dataset.get('notes', 'No description available')[:200]}...")
print(f"Organization: {dataset['organization']['title']}")
print(f"Tags: {', '.join([tag['name'] for tag in dataset['tags']])}")
print("Resources (Files):")
for resource in dataset['resources']:
print(f" - {resource['name']} ({resource['format']}): {resource['url']}")
else:
print(f"Error fetching dataset details for '{dataset_id_or_name}': {data['error']}")
if __name__ == "__main__":
list_datasets()
# Replace 'afghanistan-flash-flood-and-earthquake-2023' with an actual dataset name from the list or a known one
get_dataset_details("afghanistan-flash-flood-and-earthquake-2023")
This Python script first defines a base URL for the HDX API. The list_datasets function calls the package_list endpoint to retrieve a list of all dataset names available on the platform and prints the first ten. The get_dataset_details function then uses the package_show endpoint with a specific dataset identifier (name or ID) to fetch detailed metadata, including its description, organization, tags, and a list of downloadable resources (files) with their formats and URLs. This approach demonstrates how to discover available data and then retrieve specific information about a dataset of interest HDX API endpoints.