Country API

Every country, in one endpoint.

A REST endpoint for every sovereign state and dependent territory, with ISO 3166-1 codes, dial codes, currencies, capitals, regions and coordinates. Plain JSON over REST or GraphQL, and the free tier needs no card.

250 countries and territories
31 fields per record
3,000 free requests / mo
Request200 OK
curl --location 'https://api.countrystatecity.in/v1/countries/IN' \
  --header 'X-CSCAPI-KEY: YOUR_API_KEY'
Response
{
  "id": 101,
  "name": "India",
  "iso2": "IN",
  "iso3": "IND",
  "numeric_code": "356",
  "phonecode": "91",
  "capital": "New Delhi",
  "currency": "INR",
  "currency_name": "Indian rupee",
  "currency_symbol": "₹",
  "tld": ".in",
  "nationality": "Indian",
  "native": "भारत",
  "region": "Asia",
  "subregion": "Southern Asia",
  "latitude": "20.00000000",
  "longitude": "77.00000000",
  "emoji": "🇮🇳",
  "wikiDataId": "Q668"
}

Endpoints

Every path below is live on https://api.countrystatecity.in/v1 and takes your key in the X-CSCAPI-KEY header.

GET/countriesEvery country, newest data first
GET/countries/{ciso}One country by ISO2 code or numeric id
GET/iso/countryLook a country up by any ISO code
GET/iso/country/convertConvert between ISO2, ISO3 and numeric
GET/subregions/{id}/countriesCountries within a UN subregion

31 fields on every country.

Take them all, or name the ones you want with ?fields= and keep the response small.

idStable numeric identifier
nameEnglish name
iso2ISO 3166-1 alpha-2
iso3ISO 3166-1 alpha-3
numeric_codeISO 3166-1 numeric
phonecodeInternational dial code
capitalCapital city
currencyISO 4217 code
currency_nameCurrency in words
currency_symbolDisplay symbol
tldCountry-code top-level domain
nationalityDemonym
nativeName in the local script
regionUN region
subregionUN subregion
timezonesEvery zone the country spans
latitudeCentroid latitude
longitudeCentroid longitude
emojiFlag emoji
emojiUFlag emoji code points
populationLatest published figure
gdpLatest published figure
area_sq_kmLand area
postal_code_formatExpected postcode shape
postal_code_regexValidation pattern
translationsName in other languages
wikiDataIdWikidata item

What people build with it.

  • Country dropdowns in a signup or checkout form, with flags and dial codes already attached.
  • Validating a shipping address against the right postcode pattern before you call a carrier.
  • Converting between ISO2, ISO3 and numeric codes when two systems disagree.
  • Routing or pricing by UN region and subregion rather than by a hand-kept list.

Questions.

Is the country API free?

Yes. The free tier covers 3,000 requests a month and needs only an API key, no card. Paid plans start at $5 and raise the limit; the data and the fields are identical on every tier.

How many countries does it return?

250 entries, covering the 193 UN member states plus observer states, dependent territories and special administrative regions. Each carries its own ISO 3166-1 codes.

Can I get the data offline instead of over HTTP?

Yes. The same dataset is published as SQL, JSON, CSV, XML and more through the export tool and the open-source database, so you can ship it inside your application.

How often does the country data change?

Country-level fields change rarely, but currencies, capitals and dial codes do move. Changes are published through the /changes feed so you can diff rather than re-import.

Free up to 3,000 requests a month.

Paid plans from $5 add higher limits. Supporter adds fuzzy search; Professional adds GraphQL and the change feed.