> ## 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.

# Get Dial Code by Country

> Retrieve the international dial code for a single country by ISO2, ISO3, or numeric ID

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`)

<Note>**Availability:** Supporter plan and above. Returns `403` on lower tiers.</Note>

<Info>Responses are cached server-side for 24 hours. Numeric IDs `1` and `001` resolve to the same cache slot; letter codes are case-insensitive.</Info>

## Authentication

<ParamField header="X-CSCAPI-KEY" type="string" required>
  Your API key for authentication
</ParamField>

## Path Parameters

<ParamField path="ciso" type="string" required>
  ISO2 code, ISO3 code, or numeric country ID. Case-insensitive for ISO codes.
</ParamField>

## Response

A single phone entry (object, **not** an array — unlike the list endpoint).

<ResponseField name="country" type="string">
  ISO 3166-1 alpha-2 code of the country (e.g. `"US"`). Convenience field equal to `iso2`.
</ResponseField>

<ResponseField name="dial_code" type="string">
  Dial code with leading `+` (e.g. `"+91"`).
</ResponseField>

<ResponseField name="area_code" type="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.
</ResponseField>

<ResponseField name="iso2" type="string">
  ISO 3166-1 alpha-2 code.
</ResponseField>

<ResponseField name="iso3" type="string">
  ISO 3166-1 alpha-3 code.
</ResponseField>

<RequestExample>
  ```bash cURL (ISO2) theme={null}
  curl -X GET 'https://api.countrystatecity.in/v1/phone/US' \
    -H 'X-CSCAPI-KEY: YOUR_API_KEY'
  ```

  ```bash cURL (ISO3) theme={null}
  curl -X GET 'https://api.countrystatecity.in/v1/phone/IND' \
    -H 'X-CSCAPI-KEY: YOUR_API_KEY'
  ```

  ```bash cURL (numeric ID) theme={null}
  curl -X GET 'https://api.countrystatecity.in/v1/phone/233' \
    -H 'X-CSCAPI-KEY: YOUR_API_KEY'
  ```

  ```javascript JavaScript theme={null}
  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"
  ```

  ```python Python theme={null}
  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"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Standard country theme={null}
  {
    "country": "IN",
    "dial_code": "+91",
    "iso2": "IN",
    "iso3": "IND"
  }
  ```

  ```json 200 - NANP entry (with area_code) theme={null}
  {
    "country": "BB",
    "dial_code": "+1",
    "area_code": "246",
    "iso2": "BB",
    "iso3": "BRB"
  }
  ```

  ```json 403 - Feature Restricted theme={null}
  {
    "error": "This feature is not available on your current plan.",
    "feature": "phoneDialCode",
    "upgradeUrl": "https://app.countrystatecity.in/pricing"
  }
  ```

  ```json 404 - Country Not Found theme={null}
  {
    "error": "Country not found."
  }
  ```

  ```json 404 - No Dial Code on Record theme={null}
  {
    "error": "No dial code available for this country."
  }
  ```
</ResponseExample>

## Related Endpoints

* [List Dial Codes](/api/endpoints/list-dial-codes) — every country, plus reverse lookup by dial code
* [Parse Phone Number](/api/endpoints/parse-phone-number) — given an E.164 number, identify the country
* [Get Country Details](/api/endpoints/get-country-details) — full country record, including `phonecode`
