Skip to main content
GET
/
v1
/
phone
curl -X GET 'https://api.countrystatecity.in/v1/phone' \
  -H 'X-CSCAPI-KEY: YOUR_API_KEY'
[
  { "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" }
]

Documentation Index

Fetch the complete documentation index at: https://docs.countrystatecity.in/llms.txt

Use this file to discover all available pages before exploring further.

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: Supporter 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.

Authentication

X-CSCAPI-KEY
string
required
Your API key for authentication

Query Parameters

code
string
Optional. Restrict the response to countries with the given dial code. Accepts:
  • With or without leading + (+91 or 91)
  • 1–4 digits
  • Leading zeros are stripped (so 01, 001, 1 all match +1)
  • NANP area-code variants — ?code=+1 returns the US, Canada, and every NANP territory in one response
Without this parameter, every country with a dial code is returned (sorted by ISO2 code).

Response

The response is an array of phone entries, even when the result is a single country.
country
string
ISO 3166-1 alpha-2 code of the country (e.g. "US"). Convenience field equal to iso2.
dial_code
string
Dial code with leading + (e.g. "+91").
area_code
string
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.
iso2
string
ISO 3166-1 alpha-2 code (e.g. "US").
iso3
string
ISO 3166-1 alpha-3 code (e.g. "USA").
curl -X GET 'https://api.countrystatecity.in/v1/phone' \
  -H 'X-CSCAPI-KEY: YOUR_API_KEY'
[
  { "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" }
]