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.
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.
31 fields on every country.
Take them all, or name the ones you want with ?fields= and keep the response small.
idStable numeric identifiernameEnglish nameiso2ISO 3166-1 alpha-2iso3ISO 3166-1 alpha-3numeric_codeISO 3166-1 numericphonecodeInternational dial codecapitalCapital citycurrencyISO 4217 codecurrency_nameCurrency in wordscurrency_symbolDisplay symboltldCountry-code top-level domainnationalityDemonymnativeName in the local scriptregionUN regionsubregionUN subregiontimezonesEvery zone the country spanslatitudeCentroid latitudelongitudeCentroid longitudeemojiFlag emojiemojiUFlag emoji code pointspopulationLatest published figuregdpLatest published figurearea_sq_kmLand areapostal_code_formatExpected postcode shapepostal_code_regexValidation patterntranslationsName in other languageswikiDataIdWikidata itemWhat 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.