Countries
LIVECountry records with ISO code, region, population, and flagUrl.
Endpoints
- GETPOSTList or create
- GETPATCHDELETERead, update, or delete one/api/countries/:id
- GETFilter by region
- GETLookup by ISO code
Query params
| Param | Description | Example |
|---|---|---|
| search | Name, capital, or ISO code | search=iran |
| region | Filter by region | region=Europe |
| code | ISO alpha-2 code | code=IR |
| sort | createdAt · name · population · default name | sort=population |
| page | Page number · default 1 | page=2 |
| limit | Page size · default 12 · max 50 | limit=12 |
| order | asc · desc | order=asc |
| lang | Pass fa for Persian text · omit for English (default) | lang=fa |
| delay | Artificial wait in ms · max 5000 | delay=800 |
| status | Force error HTTP status · 400–599 | status=500 |
Persian text: add lang=fa. See Docs · Language.
Request
1const { data } = await axios.get('/api/countries', { params: { region: 'Europe' } });Response
1{2 "data": [3 {4 "id": "e1f2a3b4-c5d6-7890-e567-901234567890",5 "name": "Germany",6 "code": "DE",7 "capital": "Berlin",8 "region": "Europe",9 "population": 83783942,10 "currency": "EUR",11 "flagUrl": "https://flagcdn.com/w320/de.png",12 "createdAt": "2026-09-14T10:00:00.000Z",13 "updatedAt": "2026-09-14T10:00:00.000Z"14 }15 ],16 "pagination": {17 "page": 1,18 "limit": 12,19 "total": 8,20 "totalPages": 121 }22}