Skip to content
Field Guide

The REST API, no key

One containment expression in place of 37 requests.

1:21 Captions in the video REST API Recorded 18 September 2026

YouTube
Lesson 1 of 3 · Automate it Next: Point an AI assistant at data.un.org

Try it yourself

Remember: Do not skip: join each series to its facet, its unit and publisher, or you ship a number with no unit.

Transcript

  1. If you write code, the search box is the slowest way in. Here is the fast one, run for real.
  2. The Connect page documents two surfaces. No registration, no key, and no licence to negotiate.
  3. When you know the indicator and the countries, one POST returns every year for all of them. And there is the same figure the interface gave you, straight out of the API.
  4. The catch is that the numbers and their meaning come back in separate objects. Each series carries a facet id; look it up and you get the unit and the publisher. Skip that step and you have shipped a bare number.
  5. And this is the expression worth memorising. Contained-in-place asks for every country inside a region. One request, thirty-seven countries, and no list of country codes to maintain.
  6. But read what actually came back. Mauritius is twenty twenty-four; Eritrea is twenty twelve. Eleven different reference years in one response. Sort that by value and you have built exactly the misleading ranking from video four.
  7. It answers cross-origin too, so a static page with no server behind it can query the UN knowledge graph directly.

Go deeper

↑ ↓ to move · Enter to open · A match inside a video opens the lesson at the moment the words are said.