Country API
Country names, currency, languages, and timezones.
Look up a country by ISO2, ISO3, or its name. us, usa, and united states are the same record, and accents are optional (cote divoire works). Response country is always ISO2. Every plan gives country identity, continent, currency, calling code, flag, languages and timezones. Paid plans automatically include the country profile, statistics and regional conventions.
LookupCopy link
GET /country/{code}API Explorer ↗Country identity, currency, languages and timezones
Parameters
- codestring · path · required
ISO 3166-1 alpha-2 or alpha-3, or a country name (germany)
- formatstring · query · optional
json by default. geojson returns simplified country land outlines for map display as Polygon/MultiPolygon Features with stable ISO2 IDs. Very small islands and holes may be omitted. Missing outlines retain null geometry; unavailable geometry storage returns 503. Selected country facts and existing Deep access are preserved. API 2.0.0.
Default:
jsonValues:
json, geojson- langstring · query · optional
Display language as one BCP 47 tag, such as fr or zh-Hant. Changes supported display labels only; IDs, codes, native names, facts, parsing and deep access stay unchanged. Omit for the original response. Unsupported regions use the supported language base; unsupported languages or scripts use English. Missing labels retain their source value. Accept-Language is not read automatically. Available on the current API contract; frozen 1.0.0 is unchanged.
Length: 2 to 64 characters
import { parseAPI } from '@parseapi/sdk';
const parse = parseAPI("YOUR_API_KEY");
const result = await parse.country("ca");
console.log(result);{
"country": "CA",
"iso_alpha3": "CAN",
"iso_numeric": 124,
"name": "Canada",
"name_full": "Canada",
"name_local": null,
"demonym": "Canadian",
"continent": "NA",
"region": "Americas",
"subregion": "Northern America",
"currency": "CAD",
"currency_name": "Canadian Dollar",
"currency_symbol": "C$",
"calling_code": "+1",
"flag": "🇨🇦",
"languages": [
"en",
"fr"
],
"timezones": [
"America/Cambridge_Bay",
"America/Dawson",
"America/Dawson_Creek",
"America/Edmonton",
"America/Fort_Nelson",
"America/Glace_Bay",
"America/Goose_Bay",
"America/Halifax",
"America/Inuvik",
"America/Iqaluit",
"America/Moncton",
"America/Panama",
"America/Phoenix",
"America/Puerto_Rico",
"America/Rankin_Inlet",
"America/Regina",
"America/Resolute",
"America/St_Johns",
"America/Swift_Current",
"America/Toronto",
"America/Vancouver",
"America/Whitehorse",
"America/Winnipeg"
],
"borders": [
"US"
],
"blocs": [
"G7",
"NATO",
"OECD"
],
"capital": {
"name": "Ottawa",
"latitude": 45.42,
"longitude": -75.7
},
"population": 41288599,
"gdp_usd": 2319899772425.92,
"gdp_per_capita_usd": 55697.66,
"population_growth_percent": 0.94,
"urban_population_percent": 82.88,
"internet_users_percent": 94.35,
"area": 9984670,
"land_area": 9093507,
"water_area": 891163,
"coastline": 202080,
"elevation_average": 487,
"lowest_point": {
"name": "Atlantic/Pacific/Arctic Oceans",
"elevation": 0
},
"highest_point": {
"name": "Mount Logan",
"elevation": 5959
},
"tld": ".ca",
"week_start": "sunday",
"units": "metric",
"driving_side": "right",
"plugs": [
"A",
"B"
],
"voltage": 120,
"frequency": 60,
"emergency": {
"police": "911",
"ambulance": "911",
"fire": "911"
},
"postal_format": "A#A #A#",
"postal_regex": "^(?:[ABCEGHJKLMNPRSTVXY]\\d[ABCEGHJ-NPRSTV-Z] ?\\d[ABCEGHJ-NPRSTV-Z]\\d)$",
"tax": {
"name": "GST",
"rate": 5
},
"ioc": "CAN",
"fifa": "CAN",
"plate": "CDN"
}Response fields
- countryLink to countrystring
- ISO2 country code
- iso_alpha3Link to iso_alpha3string or null
- ISO 3166-1 alpha-3 country code
- iso_numericLink to iso_numericinteger or null
- ISO 3166-1 numeric country code
- nameLink to namestring or null
- Common name
- name_fullLink to name_fullstring or null
- Official long name
- name_localLink to name_localstring or null
- Local-language name, null when absent or identical to name
- demonymLink to demonymstring or null
- Name for a person from this country, such as American
- continentLink to continentstring or null
- Continent code (NA, EU, AF, AS, OC, SA, AN)
- regionLink to regionstring or null
- UN region
- subregionLink to subregionstring or null
- UN subregion
- currencyLink to currencystring or null
- ISO currency code
- currency_nameLink to currency_namestring or null
- Currency name
- currency_symbolLink to currency_symbolstring or null
- Currency symbol
- calling_codeLink to calling_codestring or null
- International calling code with plus (+1, +44)
- flagLink to flagstring or null
- Flag emoji
- languagesLink to languagesarray or null
- ISO 639 language codes. Expand each at /language/{code}
- timezonesLink to timezonesarray or null
- IANA timezone ids used in the country. The US lists 29
- bordersLink to bordersarray or null
- Neighboring country ISO2 codes
- blocsLink to blocsarray or null
- Country-group memberships, including EU, EEA, SCHENGEN, EUROZONE, SEPA and NATO
- capitalLink to capitalobject
- Selected capital city and its coordinates
- capital.nameLink to capital.namestring or null
- Capital city name; null when unavailable
- capital.latitudeLink to capital.latitudenumber or null
- Capital latitude in decimal degrees; null when unavailable
- capital.longitudeLink to capital.longitudenumber or null
- Capital longitude in decimal degrees; null when unavailable
- postal_formatLink to postal_formatstring or null
- Simple mask derived from a postal-format example: # is a digit and A is a letter. It may not cover every accepted format. Null when no example is available; it does not establish assignment or deliverability
- postal_regexLink to postal_regexstring or null
- Anchored postal-code format pattern. A match checks syntax only, not assignment, existence or address deliverability
States in a countryCopy link
Every state or region in that country. Built for address forms and shipping rules.
GET /country/{code}/statesAPI Explorer ↗States and regions in a country
Parameters
- codestring · path · required
ISO country code
- formatstring · query · optional
json by default. geojson returns simplified administrative Polygon/MultiPolygon outlines with country-qualified IDs and selected facts in properties. Coordinates are longitude first. Missing or ambiguous outlines retain null geometry. Unavailable boundary storage returns 503. Collections retain parent context. Existing Deep access and pooled allowance apply. API 2.0.0 and later.
Default:
jsonValues:
json, geojson- langstring · query · optional
Display language as one BCP 47 tag, such as fr or zh-Hant. Changes supported display labels only; IDs, codes, native names, facts, parsing and deep access stay unchanged. Omit for the original response. Unsupported regions use the supported language base; unsupported languages or scripts use English. Missing labels retain their source value. Accept-Language is not read automatically. Available on the current API contract; frozen 1.0.0 is unchanged.
Length: 2 to 64 characters
import { parseAPI } from '@parseapi/sdk';
const parse = parseAPI("YOUR_API_KEY");
const result = await parse.country.states("us");
console.log(result);{
"country": "US",
"states": [
{
"state": "AL",
"name": "Alabama",
"type": "state"
},
{
"state": "AK",
"name": "Alaska",
"type": "state"
},
{
"state": "NC",
"name": "North Carolina",
"type": "state"
}
]
}Response fields
- countryLink to countrystring
- ISO2 country code
- statesLink to statesarray
- Every state or province in the country
- states[].stateLink to states[].statestring or null
- State or province code
- states[].nameLink to states[].namestring or null
- State or province name
- states[].typeLink to states[].typestring or null
- State, province, etc.
Country catalogCopy link
GET /countryAPI Explorer ↗Country codes, names, flags and calling codes
Parameters
- formatstring · query · optional
json by default. geojson returns simplified country land outlines for map display as Polygon/MultiPolygon Features with stable ISO2 IDs. Very small islands and holes may be omitted. Missing outlines retain null geometry; unavailable geometry storage returns 503. Selected country facts and existing Deep access are preserved. API 2.0.0.
Default:
jsonValues:
json, geojson- countriesstring · query · optional
Optional comma-separated ISO2 codes, at most 50, with format=geojson only. Keeps catalog order and collapses duplicate codes. Unknown codes reject.
Length: 0 to 149 characters
Pattern:
^[a-zA-Z]{2}(,[a-zA-Z]{2}){0,49}$- langstring · query · optional
Display language as one BCP 47 tag, such as fr or zh-Hant. Changes supported display labels only; IDs, codes, native names, facts, parsing and deep access stay unchanged. Omit for the original response. Unsupported regions use the supported language base; unsupported languages or scripts use English. Missing labels retain their source value. Accept-Language is not read automatically. Available on the current API contract; frozen 1.0.0 is unchanged.
Length: 2 to 64 characters
GeoJSON country outlinesCopy link
Add format=geojson on API 2.2.0 to draw a simplified country outline, ready for your map. Lookup returns a Polygon or MultiPolygon Feature with the ISO2 code in id and the same selected country facts in properties. Very small islands and holes may be omitted from the display outline.
curl "https://api.parseapi.com/country/SM?format=geojson" \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-API-Version: 2.2.0"{
"type": "Feature",
"id": "SM",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
12.44,
43.96
],
[
12.4376,
43.958
],
[
12.4365,
43.9566
],
[
12.4319,
43.9572
],
[
12.431,
43.957
],
[
12.4196,
43.9579
],
[
12.4197,
43.9571
],
[
12.4171,
43.9546
],
[
12.4172,
43.9541
],
[
12.416,
43.9529
],
[
12.4144,
43.9532
],
[
12.4139,
43.9528
],
[
12.4117,
43.9525
],
[
12.4101,
43.9532
],
[
12.4085,
43.9534
],
[
12.4053,
43.9546
],
[
12.4043,
43.9559
],
[
12.4024,
43.9533
],
[
12.4051,
43.9482
],
[
12.4051,
43.9463
],
[
12.4047,
43.9456
],
[
12.4053,
43.9423
],
[
12.4067,
43.9411
],
[
12.4108,
43.9389
],
[
12.4124,
43.9376
],
[
12.4124,
43.937
],
[
12.412,
43.9361
],
[
12.4135,
43.9345
],
[
12.414,
43.9332
],
[
12.4149,
43.9322
],
[
12.4153,
43.9306
],
[
12.4147,
43.9284
],
[
12.4135,
43.9273
],
[
12.4122,
43.9268
],
[
12.4103,
43.9251
],
[
12.4098,
43.925
],
[
12.4089,
43.9233
],
[
12.4089,
43.9223
],
[
12.4081,
43.9221
],
[
12.4084,
43.9218
],
[
12.4076,
43.9215
],
[
12.4081,
43.9208
],
[
12.4079,
43.9206
],
[
12.4081,
43.9199
],
[
12.4091,
43.919
],
[
12.4125,
43.9094
],
[
12.4121,
43.9082
],
[
12.4088,
43.9032
],
[
12.4088,
43.9022
],
[
12.4102,
43.9017
],
[
12.4115,
43.9007
],
[
12.415,
43.9002
],
[
12.4189,
43.9005
],
[
12.4237,
43.9014
],
[
12.4249,
43.9031
],
[
12.4266,
43.9035
],
[
12.4277,
43.9043
],
[
12.4281,
43.9041
],
[
12.4277,
43.9033
],
[
12.4289,
43.9034
],
[
12.4288,
43.903
],
[
12.4298,
43.902
],
[
12.4326,
43.9014
],
[
12.4337,
43.9018
],
[
12.4347,
43.9033
],
[
12.4359,
43.9035
],
[
12.4363,
43.903
],
[
12.4371,
43.9034
],
[
12.4376,
43.9031
],
[
12.4382,
43.9035
],
[
12.4377,
43.9042
],
[
12.4385,
43.9047
],
[
12.4404,
43.906
],
[
12.442,
43.9061
],
[
12.4432,
43.9057
],
[
12.4441,
43.9041
],
[
12.4458,
43.9037
],
[
12.448,
43.9024
],
[
12.4484,
43.9013
],
[
12.4483,
43.9006
],
[
12.4488,
43.9
],
[
12.4485,
43.8996
],
[
12.448,
43.8997
],
[
12.4479,
43.8993
],
[
12.4494,
43.8985
],
[
12.4493,
43.8976
],
[
12.4506,
43.8961
],
[
12.455,
43.8939
],
[
12.4555,
43.8941
],
[
12.4576,
43.8936
],
[
12.4586,
43.8943
],
[
12.4588,
43.8941
],
[
12.4602,
43.8946
],
[
12.4624,
43.8938
],
[
12.463,
43.8948
],
[
12.4638,
43.8944
],
[
12.4652,
43.8948
],
[
12.4665,
43.8957
],
[
12.4677,
43.8953
],
[
12.4694,
43.8958
],
[
12.4699,
43.8975
],
[
12.4707,
43.8961
],
[
12.4754,
43.8969
],
[
12.4874,
43.8965
],
[
12.4885,
43.9
],
[
12.4896,
43.9026
],
[
12.4921,
43.9051
],
[
12.493,
43.9077
],
[
12.4956,
43.9093
],
[
12.4952,
43.9099
],
[
12.4933,
43.9101
],
[
12.4934,
43.9154
],
[
12.4929,
43.9156
],
[
12.4924,
43.9166
],
[
12.4929,
43.9184
],
[
12.4942,
43.9202
],
[
12.4964,
43.9213
],
[
12.4965,
43.922
],
[
12.4974,
43.9228
],
[
12.5014,
43.9231
],
[
12.5033,
43.9236
],
[
12.5039,
43.9245
],
[
12.5039,
43.9266
],
[
12.5041,
43.9275
],
[
12.5048,
43.9282
],
[
12.505,
43.9298
],
[
12.5053,
43.9303
],
[
12.5063,
43.9305
],
[
12.5065,
43.9311
],
[
12.5073,
43.9319
],
[
12.5077,
43.9338
],
[
12.5095,
43.9344
],
[
12.511,
43.9363
],
[
12.512,
43.9369
],
[
12.5124,
43.9377
],
[
12.517,
43.9409
],
[
12.516,
43.9415
],
[
12.5159,
43.9442
],
[
12.5128,
43.951
],
[
12.5064,
43.9581
],
[
12.5093,
43.9627
],
[
12.5075,
43.9645
],
[
12.5072,
43.9689
],
[
12.5059,
43.9711
],
[
12.51,
43.9716
],
[
12.5108,
43.9722
],
[
12.5118,
43.9721
],
[
12.5123,
43.9728
],
[
12.5124,
43.9736
],
[
12.5115,
43.9752
],
[
12.5113,
43.9779
],
[
12.5108,
43.9784
],
[
12.5105,
43.9794
],
[
12.5105,
43.9804
],
[
12.51,
43.9809
],
[
12.5102,
43.9815
],
[
12.5109,
43.9817
],
[
12.5119,
43.9827
],
[
12.5124,
43.9839
],
[
12.5137,
43.9845
],
[
12.5159,
43.9846
],
[
12.5149,
43.9884
],
[
12.5151,
43.9895
],
[
12.5144,
43.9908
],
[
12.5134,
43.9913
],
[
12.5099,
43.9909
],
[
12.5093,
43.9913
],
[
12.5097,
43.9919
],
[
12.5096,
43.992
],
[
12.5082,
43.9915
],
[
12.5078,
43.9911
],
[
12.5065,
43.9913
],
[
12.5058,
43.9906
],
[
12.5045,
43.9911
],
[
12.5036,
43.9907
],
[
12.5046,
43.9903
],
[
12.5042,
43.9901
],
[
12.504,
43.989
],
[
12.5031,
43.9889
],
[
12.5035,
43.9882
],
[
12.5021,
43.9868
],
[
12.5003,
43.9867
],
[
12.4995,
43.9864
],
[
12.4991,
43.9858
],
[
12.4983,
43.9863
],
[
12.498,
43.9861
],
[
12.4961,
43.9863
],
[
12.4947,
43.9849
],
[
12.4948,
43.9846
],
[
12.4944,
43.9846
],
[
12.4925,
43.9828
],
[
12.4902,
43.9833
],
[
12.4873,
43.9819
],
[
12.4855,
43.9814
],
[
12.4829,
43.9808
],
[
12.4817,
43.9811
],
[
12.4778,
43.9805
],
[
12.4698,
43.9777
],
[
12.4684,
43.9769
],
[
12.4682,
43.9765
],
[
12.4636,
43.9747
],
[
12.4595,
43.9724
],
[
12.4581,
43.9724
],
[
12.4574,
43.9715
],
[
12.4537,
43.9697
],
[
12.4526,
43.9687
],
[
12.4519,
43.9692
],
[
12.4495,
43.967
],
[
12.4487,
43.9659
],
[
12.4474,
43.9663
],
[
12.4465,
43.9658
],
[
12.4445,
43.9634
],
[
12.4425,
43.9616
],
[
12.4397,
43.9606
],
[
12.4401,
43.9603
],
[
12.44,
43.96
]
]
]
},
"properties": {
"country": "SM",
"iso_alpha3": "SMR",
"iso_numeric": 674,
"name": "San Marino",
"name_full": "Most Serene Republic of San Marino",
"name_local": null,
"demonym": "Sammarinese",
"continent": "EU",
"region": "Europe",
"subregion": "Southern Europe",
"currency": "EUR",
"currency_name": "Euro",
"currency_symbol": "€",
"calling_code": "+378",
"flag": "🇸🇲",
"languages": [
"it"
],
"timezones": [
"Europe/Rome"
],
"borders": [
"IT"
],
"blocs": [
"SEPA"
],
"capital": {
"name": "San Marino",
"latitude": 43.94,
"longitude": 12.45
},
"postal_format": null,
"postal_regex": null
}
}| Country | JSON | Gzip |
|---|---|---|
| United States | 69 KB | 14 KB |
| Canada | 177 KB | 36 KB |
| Italy | 12 KB | 4 KB |
| Japan | 13 KB | 3 KB |
Measured example lookups with compact JSON. Geometry, selected facts and pretty formatting affect size. HTTP compression is negotiated with your client.
/country?format=geojson returns the catalog as a FeatureCollection. Use countries=SM,VA to select up to 50 country codes and load only those outlines. The complete outline catalog is much larger than the ordinary dropdown list. Geometry uses WGS84 [longitude, latitude] and the existing generalized land extent; it does not include territorial waters or establish a legal border. A missing stored outline keeps geometry: null. Unavailable boundary storage returns HTTP 503.
Omit format or use format=json for ordinary JSON. Country lookup keeps its existing profile access and pooled request allowance. Use HTTP for GeoJSON; published SDK and MCP country methods keep their ordinary response.
Included dataCopy link
Country profiles, physical geography, statistics, regional conventions, tax references and alternate identifiers. Included automatically on paid plans in API 2.2.
Geographic measurements are archived reference values. Land and water area use km², coastline uses kilometers, and mean elevation uses meters above sea level. lowest_point and highest_point each carry a name and elevation. Unknown values are null; zero and negative elevations keep their meaning. Land and water area are null when their published total differs from area.
Paid plan fields
- populationLink to populationinteger or null
- Population estimate
- gdp_usdLink to gdp_usdnumber or null
- GDP in current US dollars. Latest available annual figure; null when unavailable.
- gdp_per_capita_usdLink to gdp_per_capita_usdnumber or null
- Rounded to two decimal places. GDP per person in current US dollars. Latest available annual figure; null when unavailable.
- population_growth_percentLink to population_growth_percentnumber or null
- Rounded to two decimal places. Annual population growth in percent. It may be negative or exceed 100; null when unavailable.
- urban_population_percentLink to urban_population_percentnumber or null
- Rounded to two decimal places. Urban population as a percentage of total population, from 0 to 100; null when unavailable.
- internet_users_percentLink to internet_users_percentnumber or null
- Rounded to two decimal places. People using the internet as a percentage of population, from 0 to 100; null when unavailable.
- areaLink to areanumber or null
- Total area in km²
- land_areaLink to land_areanumber or null
- Published land area in km². Null when unavailable or its published total differs from area
- water_areaLink to water_areanumber or null
- Published water area in km². Null when unavailable or its published total differs from area
- coastlineLink to coastlinenumber or null
- Published coastline length in kilometers. Zero is known zero; null is unavailable
- elevation_averageLink to elevation_averagenumber or null
- Mean elevation in meters above sea level. Null when unavailable
- lowest_pointLink to lowest_pointobject or null
- Lowest geographic point, or null when unavailable or ambiguous
- lowest_point.nameLink to lowest_point.namestring or null
- Published place name. Null when unnamed
- lowest_point.elevationLink to lowest_point.elevationnumber
- Meters above sea level. Negative values are below sea level
- highest_pointLink to highest_pointobject or null
- Highest geographic point, or null when unavailable or ambiguous
- highest_point.nameLink to highest_point.namestring or null
- Published place name. Null when unnamed
- highest_point.elevationLink to highest_point.elevationnumber
- Meters above sea level
- tldLink to tldstring or null
- Top-level domain
- week_startLink to week_startstring or null
- First day of the week (monday, sunday, saturday or friday)
- unitsLink to unitsstring or null
- Broad local measurement-display preference (metric or imperial). It does not change the documented metric units of geography fields
- driving_sideLink to driving_sidestring or null
- left or right
- plugsLink to plugsarray or null
- Power plug types, IEC letters (A through O)
- voltageLink to voltagenumber or null
- Common residential mains voltage in volts, not a universal value for every circuit or location. Null when unavailable
- frequencyLink to frequencynumber or null
- Mains frequency in Hz. Null when the grid is split (Japan runs both 50 and 60)
- emergencyLink to emergencyobject or null
- Emergency numbers: police, ambulance, fire. Null when not confirmed
- taxLink to taxobject
- National tax name and standard reference rate; child values are null when unavailable
- tax.nameLink to tax.namestring or null
- National levy name (VAT, GST). Null when unavailable or no national levy applies, like the US
- tax.rateLink to tax.ratenumber or null
- Standard national reference rate in percent: 19 means 19%. Do not add it to a state or ZIP reference
- iocLink to iocstring or null
- Olympic committee code (GER, NED, SUI)
- fifaLink to fifastring or null
- FIFA code. Null for GB, the home nations are the members
- plateLink to platestring or null
- International vehicle plate code (D, UK, CH)
Display languageCopy link
Pass lang with a language tag such as fr, pt-BR, or zh-Hant. Country name and currency_name; region and subregion. All 250 country records have names in each of the 33 choices. State names use separately sourced translations when available.
Omitting lang preserves the original response. Codes, IDs, numeric facts and native-name fields stay unchanged. Missing translations keep their existing source value; unknown values stay null. A preserved name_local may equal the translated name.
Send a chosen browser preference explicitly, for example { lang: navigator.language } in your JavaScript SDK options. The API does not read Accept-Language automatically. Unsupported regions fall back to their supported base language; unsupported languages or scripts use English. Empty, invalid or repeated tags return 400.
Content-Language identifies languages used in translated display fields and known English fallbacks. Display language is available on API 2.1.0; requests selecting frozen 1.0.0 retain their original contract. See API versions.
GET /country/DE?lang=fr
name: "Allemagne"
name_local: "Deutschland"
country: "DE"For a country dropdown, request /country?lang=fr, use each returned name as its label and country as its submitted value. These selected fields illustrate the display change.
33 display language choices
| Language tag | Language |
|---|---|
| en | English |
| ar | العربية |
| ca | català |
| hr | hrvatski |
| cs | čeština |
| da | dansk |
| nl | Nederlands |
| fi | suomi |
| fr | français |
| de | Deutsch |
| el | Ελληνικά |
| he | עברית |
| hi | हिन्दी |
| hu | magyar |
| id | Indonesia |
| it | italiano |
| ja | 日本語 |
| ko | 한국어 |
| ms | Melayu |
| nb | norsk bokmål |
| pl | polski |
| pt | português |
| ro | română |
| ru | русский |
| zh-Hans | 简体中文 |
| sk | slovenčina |
| es | español |
| sv | svenska |
| th | ไทย |
| zh-Hant | 繁體中文 |
| tr | Türkçe |
| uk | українська |
| vi | Tiếng Việt |