Un Data API


Results

Results are provided in XML format, for example:


  <data organisation="WHO" category="Demographic and socioeconomic statistics" name="Adolescent fertility rate">
   <record>
     <field name="Country or Area">Afghanistan</field>
     <field name="Year(s)">2001</field>
     <field name="Value">151</field>
   </record>
   <record>
     <field name="Country or Area">Albania</field>
     <field name="Year(s)">2001</field>
     <field name="Value">27</field>
   </record>
   <record>
     <field name="Country or Area">Argentina</field>
     <field name="Year(s)">2001</field>
     <field name="Value">62</field>
   </record>
  </data>

How the XML response is structured

Fields and units of the fields are specific from each dataset, please refer to the dataset description:

http://data.un.org/

In this article

  • Response format (XML)
  • How the XML response is structured
  • Dataset-specific fields and units
  • Frequently Asked Questions

Frequently Asked Questions

What format are the results returned in?

Results are provided in XML format, as shown in the example above, with each record containing named fields such as Country or Area, Year(s), and Value.

Why do the fields differ between datasets?

Fields and units are specific to each dataset. Refer to the dataset description on http://data.un.org/ to understand what each field represents.

Where can I find the meaning of a specific field or unit?

Because fields and units come from each individual dataset, the dataset description is the authoritative source for their meaning.

What does the data element's attributes tell me?

The data element carries attributes such as organisation, category, and name, identifying which organization, category, and dataset the records belong to.

How is each record represented?

Each record element contains one or more field elements, each with a name attribute and the corresponding value as its text content.