# Country Calling Code API

> Country Calling Code is a phone number country code API that looks up international dialing codes and official names from a two-letter ISO country code. It returns an array of calling prefixes, standard country identifiers and, on request, the country's exit and trunk prefixes, other regions sharing its code, valid number lengths and example numbers by line type.

**Endpoint:** `GET https://api.apiverve.com/v1/callingcode`  
**Category:** Data Lookup  
**Cost:** 1 credit per call  
**Canonical page:** https://apiverve.com/marketplace/callingcode

## Overview

A country calling code API for phone inputs, signup forms and SMS routing. Pass a two-letter ISO country code such as FR and get its calling codes (+33), common name and official name; calling codes come back as an array because some countries use more than one. Add dialing=true for the international (exit) prefix on every plan. Paid plans add the region and subregion, and in the dialing block the national trunk prefix, the other countries that share the calling code, valid number lengths and example numbers for fixed-line, mobile and toll-free lines, taken from Google's libphonenumber metadata. To check whether a specific number is valid, use Phone Number Validator.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/callingcode?country=FR&dialing=true" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `country` | string | Yes | The country: a 2 or 3 letter ISO code (e.g. FR or FRA; UK is read as GB), an IOC code (e.g. GER) or an English name (e.g. France). length 2-60 |
| `dialing` | boolean | No | Include the dialing block: the international prefix, and (paid plans) the national prefix, regions sharing the calling code, valid number lengths and example numbers. default false |

## Response fields

- `country` — string · Full country name (e.g., France, United States)
- `officialName` — string · Official country name (e.g., French Republic)
- `countryCode` — string · Two-letter ISO country code (e.g., FR, US)
- `callingcodes` — array · Array of international calling codes (e.g., +33)
- `region` — string · Geographic continent/region (e.g., Europe, Asia, Americas) · (premium)
- `subregion` — string · Specific geographic subregion (e.g., Western Europe) · (premium)
- `dialing` — object · Dialing rules for the country, present only when dialing=true; null where the phone numbering data has no entry for the country
  - `dialing.internationalPrefix` — string · Prefix dialed to call out of the country (e.g. 00, 011); a ~ means wait for a second dial tone; null where carriers each use their own code
  - `dialing.nationalPrefix` — string · Trunk prefix dialed before domestic numbers and dropped when calling from abroad (e.g. 0); null where the country has none · (premium)
  - `dialing.sharedWith` — array · Other ISO country codes that share this calling code (e.g. RU for KZ) · (premium)
  - `dialing.possibleLengths` — object · Valid national number lengths for fixedLine, mobile and tollFree; null for a line type the country does not have · (premium)
    - `dialing.possibleLengths.fixedLine` — array · (premium)
    - `dialing.possibleLengths.mobile` — array · (premium)
    - `dialing.possibleLengths.tollFree` — array · (premium)
  - `dialing.exampleNumbers` — object · An example fixedLine, mobile and tollFree number, each in international, national and E.164 format; null for a line type the country does not have · (premium)
    - `dialing.exampleNumbers.fixedLine` — object · (premium)
      - `dialing.exampleNumbers.fixedLine.international` — string · (premium)
      - `dialing.exampleNumbers.fixedLine.national` — string · (premium)
      - `dialing.exampleNumbers.fixedLine.e164` — string · (premium)
    - `dialing.exampleNumbers.mobile` — object · (premium)
      - `dialing.exampleNumbers.mobile.international` — string · (premium)
      - `dialing.exampleNumbers.mobile.national` — string · (premium)
      - `dialing.exampleNumbers.mobile.e164` — string · (premium)
    - `dialing.exampleNumbers.tollFree` — object · (premium)
      - `dialing.exampleNumbers.tollFree.international` — string · (premium)
      - `dialing.exampleNumbers.tollFree.national` — string · (premium)
      - `dialing.exampleNumbers.tollFree.e164` — string · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "country": "France",
    "officialName": "French Republic",
    "countryCode": "FR",
    "callingcodes": [
      "+33"
    ],
    "region": "Europe",
    "subregion": "Western Europe",
    "dialing": {
      "internationalPrefix": "00",
      "nationalPrefix": "0",
      "sharedWith": [],
      "possibleLengths": {
        "fixedLine": [
          9
        ],
        "mobile": [
          9
        ],
        "tollFree": [
          9
        ]
      },
      "exampleNumbers": {
        "fixedLine": {
          "international": "+33 1 23 45 67 89",
          "national": "01 23 45 67 89",
          "e164": "+33123456789"
        },
        "mobile": {
          "international": "+33 6 12 34 56 78",
          "national": "06 12 34 56 78",
          "e164": "+33612345678"
        },
        "tollFree": {
          "international": "+33 801 23 45 67",
          "national": "0 801 23 45 67",
          "e164": "+33801234567"
        }
      }
    }
  }
}
```

## Use cases

- **Signup Form Prepopulation** — When users pick their nationality on signup forms, frontends populate the international phone prefix automatically to avoid input errors.
- **Contact Record Normalization** — Clean customer address books by appending verified country dialing prefixes to local phone numbers stored with ISO country codes.
- **SMS Gateway Routing** — To dispatch two-factor authentication alerts, messaging systems verify recipient phone prefixes against their registered account country.
- **Logistics Contact Sheets** — Shipping platforms convert destination ISO codes into international dialing prefixes so couriers can contact international package recipients.

## SDKs

- **npm** — `npm install @apiverve/callingcode` (https://www.npmjs.com/package/@apiverve/callingcode)
- **NuGet** — `dotnet add package APIVerve.API.CountryCallingCode` (https://www.nuget.org/packages/APIVerve.API.CountryCallingCode)
- **Source** — https://github.com/apiverve/callingcode-api

## More

- Full reference: https://docs.apiverve.com/ref/callingcode
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
