UN Data API Active Docs

Documentation

Get the names of all the organizations

Parameter Required Data Type Description
format NO STRING If you want xml format you must specify it in the url. Default format is JSON
app_id YES STRING This is your application id that is provided in your developer portal.
app_key YES STRING This is your secret application key provided in your developer portal.

JSON format: Default

GET http://api.undata-api.org/organizations?app_id={app_id}&app;_key={app_key}

XML format:

GET http://api.undata-api.org/organizations?format=xml&app;_id={app_id}&app;_key={app_key}

Get the names of all the databases

Parameter Required Data Type Description
format NO STRING If you want xml format you must specify it in the url. Default format is JSON
organization YES STRING The name of the organization you want to get the datasets from.
app_id YES STRING This is your application id that is provided in your developer portal.
app_key YES STRING This is your secret application key provided in your developer portal.

JSON format: Default

GET http://api.undata-api.org/{organization}/databases?app_id={app_id}&app;_key={app_key}

XML format:

GET http://api.undata-api.org/{organization}/databases?format=xml&app;_id={app_id}&app;_key={app_key}

Get the names of all the datasets in the specified organization

Parameter Required Data Type Description
format NO STRING If you want xml format you must specify it in the url. Default format is JSON
organization YES STRING The name of the organization you want to get the datasets from.
app_id YES STRING This is your application id that is provided in your developer portal.
app_key YES STRING This is your secret application key provided in your developer portal.

JSON format: Default

GET http://api.undata-api.org/{organization}/datasets?app_id={app_id}&app;_key={app_key}

XML format:

GET http://api.undata-api.org/{organization}/datasets?format=xml&app;_id={app_id}&app;_key={app_key}

Get the names of all the datasets in the specified organization and database

Parameter Required Data Type Description
format NO STRING If you want xml format you must specify it in the url. Default format is JSON
organization YES STRING The name of the organization you want to get the datasets from.
database YES STRING The name of the database you want to get the datasets from.
app_id YES STRING This is your application id that is provided in your developer portal.
app_key YES STRING This is your secret application key provided in your developer portal.

JSON format: Default

GET http://api.undata-api.org/{organization}/{database}/database_datasets?app_id={app_id}&app;_key={app_key}

XML format:

GET http://api.undata-api.org/{organization}/{database}/database_datasets?format=xml&app;_id={app_id}&app;_key={app_key}

Get the names of all the countries that are in the dataset

** Look at the Data Information page to see how we normalized the country names between databases.

Parameter Required Data Type Description
format NO STRING If you want xml format you must specify it in the url. Default format is JSON
organization YES STRING The name of the organization you want to get the datasets from.
datasets YES STRING The name of the dataset in which you want to get all the countries for.
app_id YES STRING This is your application id that is provided in your developer portal.
app_key YES STRING This is your secret application key provided in your developer portal.

JSON format: Default

GET http://api.undata-api.org/{organization}/{dataset}/countries?app_id={app_id}&app;_key={app_key}

XML format:

GET http://api.undata-api.org/{organization}/{dataset}/countries?format=xml&app;_id={app_id}&app;_key={app_key}

Get the names of all the countries that are in the dataset

** Look at the Data Information page to see how we normalized the country names between databases.

Parameter Required Data Type Description
format NO STRING If you want xml format you must specify it in the url. Default format is JSON
organization YES STRING The name of the organization you want to get the datasets from.
database YES STRING The name of the database you want to get the datasets from.
datasets YES STRING The name of the dataset in which you want to get all the countries for.
app_id YES STRING This is your application id that is provided in your developer portal.
app_key YES STRING This is your secret application key provided in your developer portal.

JSON format: Default

GET http://api.undata-api.org/{organization}/{database}/{dataset}/countries?app_id={app_id}&app;_key={app_key}

XML format:

GET http://api.undata-api.org/{organization}/{database}/{dataset}/countries?format=xml&app;_id={app_id}&app;_key={app_key}

Get the names of the datasets that include the specified country

Parameter Required Data Type Description
format NO STRING If you want xml format you must specify it in the url. Default format is JSON
organization YES STRING The name of the organization in which you want to get all the datasets for.
database YES STRING The name of the database in which you want to get all the countries for.
country YES STRING The name of the country in which you want to get all the datasets for.
app_id YES STRING This is your application id that is provided in your developer portal.
app_key YES STRING This is your secret application key provided in your developer portal.

JSON format: Default

GET http://api.undata-api.org/{organization}/{database}/{country}/datasets?app_id={app_id}&app;_key={app_key}

XML format:

GET http://api.undata-api.org/{organization}/{database}/{country}/datasets?format=xml&app;_id={app_id}&app;_key={app_key}

Get the records for the country in the specified dataset and organization

Parameter Required Data Type Description
format NO STRING If you want xml format you must specify it in the url. Default format is JSON
organization YES STRING The name of the organization you want to get the datasets from.
datasets YES STRING The name of the dataset in which you want to get all the countries for.
country YES STRING The name of the country in which you want to get all the records for.
app_id YES STRING This is your application id that is provided in your developer portal.
app_key YES STRING This is your secret application key provided in your developer portal.

JSON format: Default

GET http://api.undata-api.org/{organization}/{dataset}/{country}/records?app_id={app_id}&app;_key={app_key}
GET http://api.undata-api.org/{organization}/{dataset}/{country}/records?format=xml&app;_id={app_id}&app;_key={app_key}

XML format:

Get the records for the country in the specified dataset, database and organization

*** area_name is the name the country is referred to within each organization and dataset. Since the names are formatted differently in each organzation we decided to store the original name string on the record so there would be no confusion on the area the record is referring to. In order for the relationships to work between the different datasets we made a connonical list of country names. Any name changes we will document under the "Countries" tab.

Parameter Required Data Type Description
format NO STRING If you want xml format you must specify it in the url. Default format is JSON
organization YES STRING The name of the organization you want to get the datasets from.
database YES STRING The name of the database you want to get the datasets from.
datasets YES STRING The name of the dataset in which you want to get all the countries for.
country YES STRING The name of the country in which you want to get all the records for.
app_id YES STRING This is your application id that is provided in your developer portal.
app_key YES STRING This is your secret application key provided in your developer portal.

JSON format: Default

GET http://api.undata-api.org/{organization}/{database}/{dataset}/{country}/records?app_id={app_id}&app;_key={app_key}
GET http://api.undata-api.org/{organization}/{database}/{dataset}/{country}/records?format=xml&app;_id={app_id}&app;_key={app_key}

XML format:

ERROR HANDLING

Error Code Description
401 Not authorized or when over rate limit (5000 hits a day)
404 Record not found or does not exist
500 Internal Server Error