curl -X GET 'https://api.countrystatecity.in/v1/phone/US' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
{
"country": "IN",
"dial_code": "+91",
"iso2": "IN",
"iso3": "IND"
}
Phone Endpoints
Get Dial Code by Country
Retrieve the international dial code for a single country by ISO2, ISO3, or numeric ID
GET
/
v1
/
phone
/
{ciso}
curl -X GET 'https://api.countrystatecity.in/v1/phone/US' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
{
"country": "IN",
"dial_code": "+91",
"iso2": "IN",
"iso3": "IND"
}
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: Supporter 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.Authentication
Your API key for authentication
Path Parameters
ISO2 code, ISO3 code, or numeric country ID. Case-insensitive for ISO codes.
Response
A single phone entry (object, not an array — unlike the list endpoint).ISO 3166-1 alpha-2 code of the country (e.g.
"US"). Convenience field equal to iso2.Dial code with leading
+ (e.g. "+91").Present only for NANP entries with a fixed area-code prefix in the underlying data (e.g.
"246" for Barbados). Omitted when not applicable — do not assume the field exists.ISO 3166-1 alpha-2 code.
ISO 3166-1 alpha-3 code.
curl -X GET 'https://api.countrystatecity.in/v1/phone/US' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
{
"country": "IN",
"dial_code": "+91",
"iso2": "IN",
"iso3": "IND"
}
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
Was this page helpful?
⌘I