curl -X GET 'https://api.countrystatecity.in/v1/phone/US' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/phone/IND' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/phone/233' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
const response = await fetch('https://api.countrystatecity.in/v1/phone/US', {
headers: { 'X-CSCAPI-KEY': 'YOUR_API_KEY' }
});
const { dial_code } = await response.json();
console.log(dial_code); // "+1"
import requests
response = requests.get(
'https://api.countrystatecity.in/v1/phone/IN',
headers={'X-CSCAPI-KEY': 'YOUR_API_KEY'}
)
print(response.json()['dial_code']) # "+91"
{
"country": "IN",
"dial_code": "+91",
"iso2": "IN",
"iso3": "IND"
}
{
"country": "BB",
"dial_code": "+1",
"area_code": "246",
"iso2": "BB",
"iso3": "BRB"
}
{
"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"
}
}
{
"status": "error",
"message": "Country not found."
}
{
"status": "error",
"message": "No dial code available for this country."
}
Phone
Get Dial Code by Country
Retrieve the international dial code for a single country by ISO2, ISO3, or numeric ID
GET
/
phone
/
{ciso}
curl -X GET 'https://api.countrystatecity.in/v1/phone/US' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/phone/IND' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/phone/233' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
const response = await fetch('https://api.countrystatecity.in/v1/phone/US', {
headers: { 'X-CSCAPI-KEY': 'YOUR_API_KEY' }
});
const { dial_code } = await response.json();
console.log(dial_code); // "+1"
import requests
response = requests.get(
'https://api.countrystatecity.in/v1/phone/IN',
headers={'X-CSCAPI-KEY': 'YOUR_API_KEY'}
)
print(response.json()['dial_code']) # "+91"
{
"country": "IN",
"dial_code": "+91",
"iso2": "IN",
"iso3": "IND"
}
{
"country": "BB",
"dial_code": "+1",
"area_code": "246",
"iso2": "BB",
"iso3": "BRB"
}
{
"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"
}
}
{
"status": "error",
"message": "Country not found."
}
{
"status": "error",
"message": "No dial code available for this country."
}
Get the dial code for one country. The path parameter accepts three forms — the same identifier flexibility as the rest of the geographic API:
- ISO 3166-1 alpha-2 (e.g.
US,IN) - ISO 3166-1 alpha-3 (e.g.
USA,IND) - Numeric CSC country ID (e.g.
233)
Availability: Starter plan and above. Returns
403 on lower tiers.Responses are cached server-side for 24 hours. Numeric IDs
1 and 001 resolve to the same cache slot; letter codes are case-insensitive.Response
A single phone entry (object, not an array — unlike the list endpoint).curl -X GET 'https://api.countrystatecity.in/v1/phone/US' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/phone/IND' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/phone/233' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
const response = await fetch('https://api.countrystatecity.in/v1/phone/US', {
headers: { 'X-CSCAPI-KEY': 'YOUR_API_KEY' }
});
const { dial_code } = await response.json();
console.log(dial_code); // "+1"
import requests
response = requests.get(
'https://api.countrystatecity.in/v1/phone/IN',
headers={'X-CSCAPI-KEY': 'YOUR_API_KEY'}
)
print(response.json()['dial_code']) # "+91"
{
"country": "IN",
"dial_code": "+91",
"iso2": "IN",
"iso3": "IND"
}
{
"country": "BB",
"dial_code": "+1",
"area_code": "246",
"iso2": "BB",
"iso3": "BRB"
}
{
"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"
}
}
{
"status": "error",
"message": "Country not found."
}
{
"status": "error",
"message": "No dial code available for this country."
}
Related Endpoints
- List Dial Codes — every country, plus reverse lookup by dial code
- Parse Phone Number — given an E.164 number, identify the country
- Get Country Details — full country record, including
phonecode
Authorizations
API key for authentication. Get your free key at app.countrystatecity.in.
Path Parameters
ISO 3166-1 alpha-2 (e.g., IN), alpha-3 (e.g., IND), or numeric country ID (e.g., 101). Case-insensitive.
Example:
"IN"
Response
Dial code for the country
International dial code entry for a country. Follows ITU-T E.164 standards.
ISO 3166-1 alpha-2 country code
Example:
"IN"
International dial code with + prefix
Example:
"+91"
ISO 3166-1 alpha-2 code
Example:
"IN"
ISO 3166-1 alpha-3 code
Example:
"IND"
Fixed area code for NANP territories (e.g., 246 for Barbados). Present only when applicable.
Example:
null