Undata Api

UN Data API Developer Documentation

UN Data API Documentation

Browse the live endpoints offered by the UN Data API. For every endpoint you'll find what it does, the parameters it takes, and sample request URLs in both JSON (the default) and XML. All calls must include your app_id and app_key, which you receive from your developer portal.

To learn how country names are standardized across databases, visit the Data Information page.

Endpoint Reference

List All Organizations

Return the names of all organizations the API makes available.

  • format (optional, string): set to xml in the URL to receive XML; JSON is returned by default.
  • app_id (required, string): your application ID from the developer portal.
  • app_key (required, string): your secret application key from the developer portal.

JSON (default): GET http://api.undata-api.org/organizations?app_id={app_id}&app_key={app_key}

XML: GET http://api.undata-api.org/organizations?format=xml&app_id={app_id}&app_key={app_key}

List Databases Within an Organization

Return the names of every database that belongs to a specified organization.

  • format (optional, string): add xml to the URL for XML output; JSON is the default.
  • organization (required, string): the organization whose databases you want.
  • app_id (required, string): your application ID from the developer portal.
  • app_key (required, string): your secret application key from the developer portal.

JSON (default): GET http://api.undata-api.org/{organization}/databases?app_id={app_id}&app_key={app_key}

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

List Datasets in an Organization

Retrieve the names of all datasets held within the given organization.

  • format (optional, string): specify xml in the URL for XML; JSON is default.
  • organization (required, string): the organization whose datasets you want.
  • app_id (required, string): your application ID from the developer portal.
  • app_key (required, string): your secret application key from the developer portal.

JSON (default): GET http://api.undata-api.org/{organization}/datasets?app_id={app_id}&app_key={app_key}

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

List Datasets in an Organization and Database

Return the names of every dataset inside a particular organization and database.

  • format (optional, string): use xml in the URL for XML output; JSON is default.
  • organization (required, string): the organization to query.
  • database (required, string): the database whose datasets you want.
  • app_id (required, string): your application ID from the developer portal.
  • app_key (required, string): your secret application key from the developer portal.

JSON (default): GET http://api.undata-api.org/{organization}/{database}/database_datasets?app_id={app_id}&app_key={app_key}

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

List Countries in a Dataset

Return the names of every country found in a specified dataset. Country names are standardized across databases; see the Data Information page for details.

  • format (optional, string): add xml to the URL for XML; JSON is default.
  • organization (required, string): the organization to query.
  • datasets (required, string): the dataset whose countries you want.
  • app_id (required, string): your application ID from the developer portal.
  • app_key (required, string): your secret application key from the developer portal.

JSON (default): GET http://api.undata-api.org/{organization}/{dataset}/countries?app_id={app_id}&app_key={app_key}

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

List Countries in a Dataset Within a Database

Return every country contained in a particular dataset inside a specified database. Country names are standardized; visit the Data Information page to learn about the normalization approach.

  • format (optional, string): specify xml in the URL for XML; JSON is default.
  • organization (required, string): the organization to query.
  • database (required, string): the database to query.
  • datasets (required, string): the dataset whose countries you want.
  • app_id (required, string): your application ID from the developer portal.
  • app_key (required, string): your secret application key from the developer portal.

JSON (default): GET http://api.undata-api.org/{organization}/{database}/{dataset}/countries?app_id={app_id}&app_key={app_key}

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

List Datasets That Include a Country

Identify the names of every dataset that holds data for a given country.

  • format (optional, string): add xml to the URL for XML; JSON is default.
  • organization (required, string): the organization to query.
  • database (required, string): the database to query.
  • country (required, string): the country whose datasets you want.
  • app_id (required, string): your application ID from the developer portal.
  • app_key (required, string): your secret application key from the developer portal.

JSON (default): GET http://api.undata-api.org/{organization}/{database}/{country}/datasets?app_id={app_id}&app_key={app_key}

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

Get Records for a Country in a Dataset

Return every record for a specified country within a given dataset and organization.

  • format (optional, string): use xml in the URL for XML; JSON is default.
  • organization (required, string): the organization to query.
  • datasets (required, string): the dataset to query.
  • country (required, string): the country whose records you want.
  • app_id (required, string): your application ID from the developer portal.
  • app_key (required, string): your secret application key from the developer portal.

JSON (default): GET http://api.undata-api.org/{organization}/{dataset}/{country}/records?app_id={app_id}&app_key={app_key}

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

Get Records for a Country in a Dataset Within a Database

Retrieve every record for a country in a particular dataset, database, and organization. The area_name field holds the original country name as used by each organization and dataset, while a canonical country list keeps relationships consistent across datasets. Any name changes are documented under the Countries tab.

  • format (optional, string): add xml to the URL for XML; JSON is default.
  • organization (required, string): the organization to query.
  • database (required, string): the database to query.
  • datasets (required, string): the dataset to query.
  • country (required, string): the country whose records you want.
  • app_id (required, string): your application ID from the developer portal.
  • app_key (required, string): your secret application key from the developer portal.

Every endpoint on this page returns either JSON by default or XML when you add format=xml to the URL, and each call requires your app_id and app_key from the developer portal. Use the endpoint reference above to look up the parameters each request accepts, then copy the sample URL and substitute your own credentials and path values.