Skip to main content
Thirdwatchthirdwatch
research

How to Scrape UNHCR Refugee Data

Export official refugee, asylum-seeker, and displacement statistics from UNHCR into analysis-ready datasets.

Jul 21, 2026 · 2 min read · 362 words
See the scraper →

Export official refugee, asylum-seeker, and displacement statistics from UNHCR into analysis-ready datasets. The UNHCR Refugee Data Scraper provides a bounded connector to the authoritative publisher while preserving stable identifiers and source URLs on every row.

Start with a small, reviewable query

{"mode":"population","yearFrom":2020,"yearTo":2025,"maxResults":500}

Run a small sample before expanding the result limit. Inspect identifiers, dates, null values, units, qualifiers, and source fields in the Apify Dataset. Export as JSON for nested fields or CSV and Excel for review. For recurring ingestion, upsert on the publisher stable record dimensions instead of assuming every run is append-only.

Build a reliable data pipeline

The Actor uses direct HTTP requests, bounded inputs, transient-error retries, and explicit empty-result failures. It does not require a browser or paid proxy, so scheduled runs remain inexpensive. Keep the input in an Apify Task, send completion through a webhook, and load the dataset into a warehouse or dashboard. Store collection time downstream so source revisions can be distinguished from newly published records.

Interpret the source responsibly

Official publication does not remove the need for context. Preserve footnotes, status fields, dataset type, reporting period, and source attribution. A missing value is not zero, and a revised record is not necessarily a new event. For legal, medical, financial, safety, protection, or public-policy decisions, confirm material findings with the publisher and a qualified specialist.

This workflow is designed for humanitarian analysts, journalists, and policy researchers. It is an independent integration and is not affiliated with or endorsed by the source institution.

Fields to keep in a UNHCR export

Keep the year, population type, country of origin, country of asylum, and every available population measure together. Refugees, asylum-seekers, internally displaced people, stateless people, and other people of concern are distinct groups and should not be combined without a documented rule. Country codes are safer join keys than display names, especially when building a multi-year warehouse. Retain the Actor's source URL and collection timestamp so an analyst can reproduce a row after UNHCR publishes a revision. For large exports, partition by year and data mode; that makes validation and incremental refreshes much easier than repeatedly replacing one enormous table.

Frequently asked questions

Does this workflow require a source API key?

No. It uses the source publisher public keyless interface.

Can I schedule the export?

Yes. Save the input as an Apify Task and attach a schedule or webhook.

Related

Try it yourself

100 free credits, no credit card.

About 30 real searches. Add the MCP to Claude or Cursor in two minutes.