Snipget.ai

Phone country dial lookup

Exact
phone_country_dial_lookup

Deterministic and authoritative — the canonical answer for this input.

Look up a country's international dial prefix, or reverse (dial prefix → countries). Accepts ISO2/ISO3/country name/+prefix. Shared prefixes (+1 NANP, +44 UK+Crown, +7 RU+KZ) return ranked candidates with the primary country first. Processing multiple inputs? Use `phone_country_dial_lookup_batch` to do up to 1000 in one call.

Parameters

valuestringrequired

ISO2, ISO3, country name, or +dial prefix.

Call it

curl -X POST https://api.snipget.ai/v1/phone/country-dial/lookup \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"value":"DE"}'

The Batch tab sends up to 1000 inputs in one call via /v1/phone/country-dial/lookup/batch.

Example response

{
  "input": "DE",
  "is_valid": true,
  "matched_via": "iso2",
  "top_match": {
    "iso2": "DE",
    "iso3": "DEU",
    "name": "Germany",
    "dial": "+49"
  },
  "matches": [
    {
      "iso2": "DE",
      "iso3": "DEU",
      "name": "Germany",
      "dial": "+49"
    }
  ],
  "is_ambiguous": false
}

FAQ

What does this do for me?

It turns a country into its international dialing prefix (or a prefix back into the country). Give it a country name, a two- or three-letter country code, or a +prefix, and it returns the matching dial code from a maintained reference table so you do not have to keep a country-code list yourself.

Can I look it up both ways?

Yes. It is bidirectional. Pass 'Germany', 'DE', or 'DEU' to get +49, or pass '+49' to get Germany back. It also accepts loose input, so '49' without the plus sign still works.

Why do some prefixes return more than one country?

Several dial codes are shared. +1 covers the US, Canada, and many Caribbean countries, +44 covers the UK and its Crown Dependencies, and +7 covers Russia and Kazakhstan. In those cases you get a ranked list of matches with the primary country listed first, and is_ambiguous is set to true.

Is the answer reliable?

Yes. This is an exact, deterministic lookup against a fixed reference dataset, so the same input always returns the same answer. It is the canonical dial code, not a guess.

What happens if I type something it cannot match?

It does not throw an error. You get is_valid false with a why_invalid reason explaining that no country matched, so you can spot bad input in your data without your workflow crashing.

Related tools