curl -X GET 'https://api.countrystatecity.in/v1/phone' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/phone?code=%2B1' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/phone?code=91' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
const response = await fetch(
'https://api.countrystatecity.in/v1/phone?code=' + encodeURIComponent('+44'),
{ headers: { 'X-CSCAPI-KEY': 'YOUR_API_KEY' } }
);
const entries = await response.json();
// entries: [{ country: "GB", dial_code: "+44", iso2: "GB", iso3: "GBR" }, ...]
import requests
response = requests.get(
'https://api.countrystatecity.in/v1/phone',
params={'code': '+1'},
headers={'X-CSCAPI-KEY': 'YOUR_API_KEY'}
)
nanp_countries = response.json()
print(f"{len(nanp_countries)} countries share +1")
[
{ "country": "AG", "dial_code": "+1", "area_code": "268", "iso2": "AG", "iso3": "ATG" },
{ "country": "AI", "dial_code": "+1", "area_code": "264", "iso2": "AI", "iso3": "AIA" },
{ "country": "BB", "dial_code": "+1", "area_code": "246", "iso2": "BB", "iso3": "BRB" },
{ "country": "BS", "dial_code": "+1", "area_code": "242", "iso2": "BS", "iso3": "BHS" },
{ "country": "CA", "dial_code": "+1", "iso2": "CA", "iso3": "CAN" },
{ "country": "US", "dial_code": "+1", "iso2": "US", "iso3": "USA" }
]
[
{ "country": "IN", "dial_code": "+91", "iso2": "IN", "iso3": "IND" }
]
{
"status": "error",
"message": "Invalid dial code. Provide a non-empty value (e.g., +1, 44)."
}
{
"status": "error",
"message": "Invalid dial code format. Expected digits (e.g., 91, 1, 44)."
}
{
"status": "error",
"message": "This feature is not available on your current plan.",
"details": {
"feature": "phoneDialCode",
"currentTier": "community",
"requiredTier": "starter",
"upgradeUrl": "https://app.countrystatecity.in/pricing"
}
}
Phone
List Dial Codes
List every country’s international dial code, with optional reverse lookup by dial code
GET
/
phone
curl -X GET 'https://api.countrystatecity.in/v1/phone' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/phone?code=%2B1' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/phone?code=91' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
const response = await fetch(
'https://api.countrystatecity.in/v1/phone?code=' + encodeURIComponent('+44'),
{ headers: { 'X-CSCAPI-KEY': 'YOUR_API_KEY' } }
);
const entries = await response.json();
// entries: [{ country: "GB", dial_code: "+44", iso2: "GB", iso3: "GBR" }, ...]
import requests
response = requests.get(
'https://api.countrystatecity.in/v1/phone',
params={'code': '+1'},
headers={'X-CSCAPI-KEY': 'YOUR_API_KEY'}
)
nanp_countries = response.json()
print(f"{len(nanp_countries)} countries share +1")
[
{ "country": "AG", "dial_code": "+1", "area_code": "268", "iso2": "AG", "iso3": "ATG" },
{ "country": "AI", "dial_code": "+1", "area_code": "264", "iso2": "AI", "iso3": "AIA" },
{ "country": "BB", "dial_code": "+1", "area_code": "246", "iso2": "BB", "iso3": "BRB" },
{ "country": "BS", "dial_code": "+1", "area_code": "242", "iso2": "BS", "iso3": "BHS" },
{ "country": "CA", "dial_code": "+1", "iso2": "CA", "iso3": "CAN" },
{ "country": "US", "dial_code": "+1", "iso2": "US", "iso3": "USA" }
]
[
{ "country": "IN", "dial_code": "+91", "iso2": "IN", "iso3": "IND" }
]
{
"status": "error",
"message": "Invalid dial code. Provide a non-empty value (e.g., +1, 44)."
}
{
"status": "error",
"message": "Invalid dial code format. Expected digits (e.g., 91, 1, 44)."
}
{
"status": "error",
"message": "This feature is not available on your current plan.",
"details": {
"feature": "phoneDialCode",
"currentTier": "community",
"requiredTier": "starter",
"upgradeUrl": "https://app.countrystatecity.in/pricing"
}
}
Return every country’s international dial code in one call, or do the reverse — find every country that shares a given dial code (useful for NANP
+1 countries like the US and Canada).
Dial codes follow ITU-T E.164 and are returned with a leading +. For NANP countries with an area-code prefix in the underlying data (e.g. Barbados as +1-246), the area code is returned as a separate area_code field.
Availability: Starter plan and above. Returns
403 on lower tiers.Responses are cached server-side for 24 hours. Equivalent dial-code inputs (
+91, 91, 091, 0091) all resolve to the same cache slot.Response
The response is an array of phone entries, even when the result is a single country.curl -X GET 'https://api.countrystatecity.in/v1/phone' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/phone?code=%2B1' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/phone?code=91' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
const response = await fetch(
'https://api.countrystatecity.in/v1/phone?code=' + encodeURIComponent('+44'),
{ headers: { 'X-CSCAPI-KEY': 'YOUR_API_KEY' } }
);
const entries = await response.json();
// entries: [{ country: "GB", dial_code: "+44", iso2: "GB", iso3: "GBR" }, ...]
import requests
response = requests.get(
'https://api.countrystatecity.in/v1/phone',
params={'code': '+1'},
headers={'X-CSCAPI-KEY': 'YOUR_API_KEY'}
)
nanp_countries = response.json()
print(f"{len(nanp_countries)} countries share +1")
[
{ "country": "AG", "dial_code": "+1", "area_code": "268", "iso2": "AG", "iso3": "ATG" },
{ "country": "AI", "dial_code": "+1", "area_code": "264", "iso2": "AI", "iso3": "AIA" },
{ "country": "BB", "dial_code": "+1", "area_code": "246", "iso2": "BB", "iso3": "BRB" },
{ "country": "BS", "dial_code": "+1", "area_code": "242", "iso2": "BS", "iso3": "BHS" },
{ "country": "CA", "dial_code": "+1", "iso2": "CA", "iso3": "CAN" },
{ "country": "US", "dial_code": "+1", "iso2": "US", "iso3": "USA" }
]
[
{ "country": "IN", "dial_code": "+91", "iso2": "IN", "iso3": "IND" }
]
{
"status": "error",
"message": "Invalid dial code. Provide a non-empty value (e.g., +1, 44)."
}
{
"status": "error",
"message": "Invalid dial code format. Expected digits (e.g., 91, 1, 44)."
}
{
"status": "error",
"message": "This feature is not available on your current plan.",
"details": {
"feature": "phoneDialCode",
"currentTier": "community",
"requiredTier": "starter",
"upgradeUrl": "https://app.countrystatecity.in/pricing"
}
}
Related Endpoints
- Get Dial Code by Country — one country at a time when you already know the country
- Parse Phone Number — given an E.164 number, identify the country
Authorizations
API key for authentication. Get your free key at app.countrystatecity.in.
Query Parameters
Response
List of dial code entries ordered by country ISO2 code