BlogData

Read population in context

Keep a population count with its place identity. A city, county and postal area can describe different boundaries even when they share a name.

A population figure on a city page needs context. Someone comparing two places should know which geographic areas the estimates describe. Fetching both numbers on the same day does not establish that they use the same boundaries or method.

In API 2.0.0, paid country, state, district, city and postal profiles include population inside deep. Ask for that detail with ?deep=true. For example, the country lookup accepts:

GET /country/US?deep=true

Keep the returned place identity with the count. A city, its surrounding county and its postal areas are separate geographic layers. They can have different populations while sharing a familiar name. Compare cities with cities, or postal areas with postal areas.

A response can have a missing population. Leave it unavailable rather than treating it as zero. A reported zero is different from an unknown count:

const { population } = result.deep ?? {}
const label = Number.isFinite(population)
  ? `Population: ${population.toLocaleString()}`
  : 'Population unavailable'

An API request date is not a measurement date. Refreshing a place page should not quietly change its caption to "Population in 2026" just because the page was refreshed in 2026. When a City response includes an explicit population_observed_on, that date describes the returned count. Leave a date unspecified when the response does not provide one.

Continent population combines country estimates. Use it for the continental view while keeping comparisons at the same geographic level. The Population reference shows the supported place lookups and complete responses.