Search international country calling codes by country name, ISO 3166-1 alpha-2 code, or calling code.
/api/v1
First stable version for country phone code lookups.
/api/v1/country-phone-codes
Auth Required
Returns country calling codes with optional filters for country name, ISO 3166-1 alpha-2 code, and calling code.
X-Api-Key: your_api_key
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
q |
string | optional | turkey |
Keyword search in country name, ISO code, and calling code. |
iso2 |
string | optional | TR |
ISO 3166-1 alpha-2 country code filter. |
calling_code |
string | optional | +90 |
International calling code filter. A leading plus sign is optional. |
per_page |
integer | optional | 10 |
Page size between 1 and 250. |
GET /api/v1/country-phone-codes?q=turkey&per_page=10
{
"success": true,
"message": "Country phone codes fetched successfully.",
"data": {
"items": [
{
"id": 1,
"name": "Turkey",
"iso2": "TR",
"calling_code": "+90",
"calling_code_digits": "90",
"area_codes": null,
"national_prefix": null,
"priority": 0
}
],
"count": 1,
"total": 1,
"current_page": 1,
"last_page": 1,
"per_page": 10,
"filters": {
"q": "turkey",
"iso2": null,
"calling_code": null
}
}
}
{
"success": false,
"message": "Invalid API key.",
"error_code": "INVALID_API_KEY"
}
/api/v1/country-phone-codes/all
Auth Required
Returns the full country calling code list without pagination.
X-Api-Key: your_api_key
GET /api/v1/country-phone-codes/all
{
"success": true,
"message": "All country phone codes fetched successfully.",
"data": {
"countries": [
{
"id": 1,
"name": "Turkey",
"iso2": "TR",
"calling_code": "+90",
"calling_code_digits": "90",
"area_codes": null,
"national_prefix": null,
"priority": 0
},
{
"id": 2,
"name": "United States",
"iso2": "US",
"calling_code": "+1",
"calling_code_digits": "1",
"area_codes": null,
"national_prefix": null,
"priority": 0
}
],
"count": 244
}
}
{
"success": false,
"message": "Invalid API key.",
"error_code": "INVALID_API_KEY"
}
/api/v1/country-phone-codes/{iso2}
Auth Required
Returns one country phone code record by ISO 3166-1 alpha-2 code. Example: /country-phone-codes/TR
X-Api-Key: your_api_key
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
iso2 |
string | required | TR |
ISO 3166-1 alpha-2 country code. |
GET /api/v1/country-phone-codes/TR
{
"success": true,
"message": "Country phone code fetched successfully.",
"data": {
"id": 1,
"name": "Turkey",
"iso2": "TR",
"calling_code": "+90",
"calling_code_digits": "90",
"area_codes": null,
"national_prefix": null,
"priority": 0
}
}
{
"success": false,
"message": "Country phone code not found.",
"error_code": "COUNTRY_PHONE_CODE_NOT_FOUND"
}