Microproduct Data GuideBeginner

UNHCR Refugee Population Statistics

Official refugee, asylum-seeker, displacement, statelessness, return, and resettlement statistics for building humanitarian trend and flow tools.

Report a Problem

At a Glance

Difficulty
Beginner — comfortable for a first prototype
Size
Small · ≤0.1 GB
Formats
JSON, CSV
Access
API or Download
API Key
Not Required
Provider
UNHCR
Updates
Annual
Last Verified
Sep 27, 2026
Source Type
Intergovernmental Source
  • Python Syntax Checked
  • Runnable Notebook

From Source to Product Signal

Test a Product Idea in Four Steps

UNHCR's database reports forcibly displaced and stateless populations by year, origin, and asylum location. Start with refugees for two countries across five years. End-of-year stocks are not annual flows, categories differ, and some values are estimates or supplied by other authorities.

1

Check the Setup

  • Python 3.10 or newer
  • A notebook environment such as Jupyter or Google Colab
  • An internet connection
2

Access the Data

  1. 1.Read UNHCR's population-category definitions and select one measure.
  2. 2.Request a five-year window for a small country set using ISO codes.
  3. 3.Retrieve footnotes and retain the source year and country-role definitions.
Open Official Source
3

Run the Python Example

Install the packages, then run the notebook cell.

python -m pip install pandas requests

import pandas as pd
import requests

response = requests.get(
    "https://api.unhcr.org/population/v1/population/",
    params={
        "yearFrom": 2020,
        "yearTo": 2024,
        "coo": "AFG,UKR",
        "coa_all": "true",
        "cf_type": "ISO",
        "limit": 100,
    },
    timeout=30,
)
response.raise_for_status()
population = pd.DataFrame(response.json()["items"])
print(population[["year", "coo_name", "refugees", "asylum_seekers"]].head(20))
4

Compare Displacement Stocks by Origin

Compare reported refugee and asylum-seeker stocks originating from Afghanistan and Ukraine from 2020 through 2024.

  1. 01Retrieve the bounded years and retain origin, asylum, and population-category fields.
  2. 02Aggregate only compatible categories and review the associated footnotes before charting.
  3. 03Explain why stocks are not flows and how estimates, coverage, and category definitions limit comparison.

Dataset Details

UNHCR is an intergovernmental source. Last verified 2026-09-27. Temporal coverage: 1951-present.

Send Feedback