Base URL: https://api.unhcr.org/rsq/v1 | CORS: ✅
| Endpoint | Description |
|---|---|
/years |
Available years (2003–2026) |
/categories |
Resettlement categories |
/regions |
UNHCR regions |
/asylums |
Countries of asylum |
/destinations |
Destination countries |
| Endpoint | Description |
|---|---|
/submissions |
Resettlement submissions |
/departures |
Resettlement departures |
/demographics |
Demographics breakdown |
/export/csv |
Export as CSV |
year: e.g. 2023,2024asylum: country code e.g. EGYorigin: e.g. SYR,SDNresettlement: destination countrypage: pagination (20/page)curl "https://api.unhcr.org/rsq/v1/submissions?asylum=EGY&year=2024" curl "https://api.unhcr.org/rsq/v1/departures?asylum=EGY&year=2023" curl "https://api.unhcr.org/rsq/v1/export/csv?type=submissions&year=2024&asylum=EGY"
{ "results": [
{ "year": 2024, "origin": "SYR",
"asylum": "EGY", "destination": "USA",
"persons": 150 }
],
"total": 6879, "page": 1, "totalPages": 2
}
Base URL: https://api.unhcr.org/population/v1 | CORS: ✅
curl "https://api.unhcr.org/population/v1/population/?limit=100&dataset=population&yearFrom=2020&yearTo=2024&coa=EGY"
| URL | Description |
|---|---|
/en/country/egy |
Egypt country page |
/en/documents/download/{ID} |
Download document |
/en/documents/details/{ID} |
Document detail |
How to fetch the 1,426 Egypt documents via raw HTTP requests.
GET https://data.unhcr.org/en/search
| Parameter | Value | Description |
|---|---|---|
sv_id |
0 |
Global situation view |
geo_id |
1 |
Egypt location ID |
type[0] |
document |
Documents only |
language[] |
1=EN, 3=AR |
Language filter |
page |
1 – 143 | Page number |
https://data.unhcr.org/en/search?sv_id=0&geo_id=1&type%5B0%5D=document&page=1
curl "https://data.unhcr.org/en/search?sv_id=0&geo_id=1&type%5B0%5D=document&page=1" \ -H "User-Agent: Mozilla/5.0" # Arabic docs only (language[]=3) curl "https://data.unhcr.org/en/search?sv_id=0&geo_id=1&type%5B0%5D=document&language%5B%5D=3&page=1" \ -H "User-Agent: Mozilla/5.0"
<li class="searchResultItem">
<!-- ID from href -->
<a href="/en/documents/details/121259">
<!-- Title -->
<h2 class="searchResultItem_title">
<a>Sudan Situation Map...</a>
</h2>
<!-- Date -->
<span class="searchResultItem_date">
Publish date: <b>24 February 2026</b>
</span>
<!-- Size -->
<div class="searchResultItem_download">
Download 287.57 KB
</div>
<!-- Thumbnail -->
<img src="https://amzirlodp-prd-s3...">
</li>
import requests
from bs4 import BeautifulSoup
r = requests.get(
"https://data.unhcr.org/en/search",
params={"sv_id":"0","geo_id":"1","type[0]":"document","page":"1"},
headers={"User-Agent":"Mozilla/5.0"}
)
soup = BeautifulSoup(r.text, "html.parser")
for item in soup.select("li.searchResultItem"):
title = item.select_one("h2 a").get_text(strip=True)
date = item.select_one(".searchResultItem_date b").get_text()
print(title, date)
| Context | Works? |
|---|---|
| Python / Node.js | ✅ Yes |
| Browser fetch() | ❌ CORS blocked |
| cURL / Postman | ✅ Yes |
| Google Apps Script | ✅ Yes |
شغّل الأمر في نفس مجلد الملف: reports-full-table/
python3 unhcr_scraper.py
python3 unhcr_scraper.py --last 50
python3 unhcr_scraper.py --from-date YYYY-MM-DD
python3 unhcr_scraper.py --no-translate
unhcr_egypt_data.jsonpython3 -m http.server 8080| رقم UNHCR | العنوان (عربي) | العنوان (إنجليزي) | الصورة | النوع | القطاع | المعرف | السنة | الجهة المصدرة | الوصف | المصدر | الحالة | المشاهدات | اللغة | التصنيفات | اسم الملف | الرابط | تاريخ النشر | حجم الملف |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ⏳ جارٍ تحميل البيانات... | ||||||||||||||||||
جرّب تعديل معايير البحث أو إزالة بعض الفلاتر.