MockData.ir

Countries

LIVE

Country records with ISO code, region, population, and flagUrl.

Endpoints

Query params

ParamDescriptionExample
searchName, capital, or ISO codesearch=iran
regionFilter by regionregion=Europe
codeISO alpha-2 codecode=IR
sortcreatedAt · name · population · default namesort=population
pagePage number · default 1page=2
limitPage size · default 12 · max 50limit=12
orderasc · descorder=asc
langPass fa for Persian text · omit for English (default)lang=fa
delayArtificial wait in ms · max 5000delay=800
statusForce error HTTP status · 400–599status=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}