API Overview
GET /countries/:alpha2
Fetches a single country by ISO 3166-1 alpha-2 code.
Expects
Path parameters:
| Parameter | Type | Description |
|---|---|---|
alpha2 |
ISO alpha-2 | Country code such as MT or JP. |
Query parameters:
| Parameter | Type | Description |
|---|---|---|
lang |
string |
Localized naming language. Defaults to en. |
Returns
{
"data": {
"alpha2": "MT",
"name": "Malta",
"continent": "Europe",
"recognized": true
}
}
Examples
curl "https://api.arevdata.com/countries/MT"
curl "https://api.arevdata.com/countries/JP?lang=ja"