Country calling codes from an API

Get a country's phone calling code from its ISO code, pull every dialing code at once for a phone input, or find which country a +code belongs to. No API key.

Back

Phone inputs need the +code. Here's where to get them without hard-coding a list that goes stale.

One country

curl https://countries.dev/alpha/IN
{ "name": "India", "alpha2Code": "IN", "callingCodes": ["91"] }

callingCodes is an array — most countries have one, a few have several.

The whole list, for a phone input

Pull only what a country-code selector needs:

curl "https://countries.dev/countries?fields=name,alpha2Code,flag,callingCodes&sort=name"
const options = countries.map(
  (c) => `${c.flag} ${c.name} +${c.callingCodes[0]}`
);

Reverse lookup

Have a +code and want the country?

curl https://countries.dev/callingcode/91

Pass the digits without the +. Docs →

Written by

Dov Azencot

At

Tue Jun 23 2026