Human Development Data API
All of the data for the Human Development Report resides in 14 statistical tables. All data is accessible via API, and can be queried to return just the data you need. Add HDR data to your app or project today!
Getting Started

Our HDR data resides on data.undp.org, and is accessed via the Socrata Open Data API (SODA). All communication with the API is done through HTTPS, and errors are communicated through HTTP response codes. Available response types include JSON, XML, and CSV, which are selectable by the "extension" on API requests or by HTTP Accepts headers.

API Endpoints

With SODA , the endpoint for every dataset and custom API is by default hosted under /resources. Datasets are addressable by that dataset’s unique identifier, which you can locate either in the “API” sidebar on the dataset or as the 4x4 code at the end of any dataset URL.

HDR Table Name API Endpoint
Table 1: Human Development Index and its Components http://data.undp.org/resource/wxub-qc5k.json
Table 2: Human Development Index Trends http://data.undp.org/resource/efc4-gjvq.json
Table 3: Inequality-Adjusted Human Development http://data.undp.org/resource/9jnv-7hyp.json
Table 4: Gender Inequality Index http://data.undp.org/resource/pq34-nwq7.json
Table 5: Multidimensional Poverty Index http://data.undp.org/resource/7p2z-5b33.json
Table 6: Command Over Resources http://data.undp.org/resource/ti85-2nvi.json
Table 7: Health http://data.undp.org/resource/iv8b-7gbj.json
Table 8: Education http://data.undp.org/resource/mvtz-nsye.json
Table 9: Social Integration http://data.undp.org/resource/n9mf-gwye.json
Table 10: International Trade Flows of Goods and Services http://data.undp.org/resource/itri-v7qr.json
Table 11: International Capital Flows and Migrations http://data.undp.org/resource/3esk-n839.json
Table 12: Innovation and Technology http://data.undp.org/resource/jixu-gnyy.json
Table 13: Environment http://data.undp.org/resource/ki8j-r4i6.json
Table 14: Population http://data.undp.org/resource/e6xu-b22v.json
Sample Queries

These sample queries will use HDR Table 1: HDI Human Development Index and its Components. You can view and explore the dataset in your browser at https://data.undp.org/dataset/Table-1-Human-Development-Index-and-its-co.... The last part of this URL is the dataset's unique identifier, which you'll need to build API Queries.

You'll also need API field names for columns you'd like to query. API field names can be found by hovering over the column header in the dataset's graphical view. For example, the API field name for the "2012 HDI Rank" column is "_2012_hdi_rank".

The API endpoint for this dataset returns JSON for all columns and rows.

More specific queries can be built by adding arguments to the endpoint URL. Create simple equality queries using an API field name and a value:

Add a $where argument to return rows with ranges of values:

Add a $select argument to return only certain columns:

Get rows where the HDI value is less than .500 and only get the country name, country code, and hdi value: http://data.undp.org/resource/wxub-qc5k.json?$where=_2012_hdi_value%3C.500&$select=name,abbreviation,_2012_hdi_value

Add an $order argument to sort the results:

Get rows where the HDI value is less than .500 and only get the country name, country code, and hdi value, sorted by name (ascending): http://data.undp.org/resource/wxub-qc5k.json?$where=_2012_hdi_value%3C.500&$select=name,abbreviation,_2012_hdi_value&$order=name%20asc
Resources and More Information

Socrata provides SDKs for several programming environments to facilitate consumption of SODA APIs. More information can be found at http://dev.socrata.com.