← Docs

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. Core gives country identity, continent, currency, calling code, flag, languages and timezones. Paid deep adds the country profile, statistics and regional conventions.

Lookup

GET
api.parseapi.com/country/{code}
Country identity, currency, languages and timezones
Explore
Parameters 3
codestring · path · required

ISO 3166-1 alpha-2 or alpha-3, or a country name (germany)

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

deepboolean · query · optional

Country profiles, physical geography, statistics, regional conventions, tax references and alternate identifiers. Included on paid plans.

Run uses the free demo on API 2.0.0. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.country("ca");
console.log(result);

Run on your server with a secret key. Calling from a browser or app?

Example response (excerpt)

This example shows selected fields or shortened lists. Run the request for the full response.

{
  "country": "CA",
  "name": "Canada",
  "continent": "NA",
  "currency": "CAD",
  "currency_name": "Canadian Dollar",
  "currency_symbol": "C$",
  "calling_code": "+1",
  "emoji": "🇨🇦",
  "languages": [
    "en"
  ],
  "timezones": [
    "America/Cambridge_Bay",
    "America/Dawson",
    "America/Dawson_Creek",
    "America/Edmonton"
  ]
}

Response fields

countrystring
ISO2 country code
namestring or null
Common name
name_localstring or null
Local-language name, null when absent or identical to name
continentstring or null
Continent code (NA, EU, AF, AS, OC, SA, AN)
currencystring or null
ISO currency code
currency_namestring or null
Currency name
currency_symbolstring or null
Currency symbol
calling_codestring or null
International calling code with plus (+1, +44)
emojistring or null
Flag emoji
languagesarray or null
ISO 639 language codes. Expand each at /language/{code}
timezonesarray or null
IANA timezone ids used in the country. The US lists 29

States in a country

Every state or region in that country. Built for address forms and shipping rules.

GET
api.parseapi.com/country/{code}/states
States and regions in a country
Explore
Parameters 2
codestring · path · required

ISO country code

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

Run uses the free demo on API 2.0.0. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.country.states("us");
console.log(result);

Run on your server with a secret key. Calling from a browser or app?

Example response (excerpt)

This example shows selected fields or shortened lists. Run the request for the full response.

{
  "country": "US",
  "states": [
    {
      "state": "AL",
      "name": "Alabama",
      "type": "state"
    },
    {
      "state": "AK",
      "name": "Alaska",
      "type": "state"
    },
    {
      "state": "NC",
      "name": "North Carolina",
      "type": "state"
    }
  ]
}

Response fields

countrystring
ISO2 country code
statesarray
Every state or province in the country
states[].statestring or null
State or province code
states[].namestring or null
State or province name
states[].typestring or null
State, province, etc.

Deep

?deep=true Country profiles, physical geography, statistics, regional conventions, tax references and alternate identifiers. Included on paid plans.

Run this Deep example with a paid-plan key. Deep is included in the pooled request, with no separate lookup charge.

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.country("ca", { deep: true });
console.log(result);

Run on your server with a secret key. Calling from a browser or app?

Example response (excerpt)

This example shows selected fields or shortened lists. Run the request for the full response.

{
  "country": "CA",
  "name": "Canada",
  "continent": "NA",
  "currency": "CAD",
  "currency_name": "Canadian Dollar",
  "currency_symbol": "C$",
  "calling_code": "+1",
  "emoji": "🇨🇦",
  "languages": [
    "en"
  ],
  "timezones": [
    "America/Cambridge_Bay",
    "America/Dawson",
    "America/Dawson_Creek",
    "America/Edmonton"
  ],
  "deep": {
    "iso3": "CAN",
    "numeric": 124,
    "full_name": "Canada",
    "demonym": "Canadian",
    "capital": "Ottawa",
    "capital_lat": 45.42,
    "capital_lon": -75.7,
    "region": "Americas",
    "subregion": "Northern America",
    "population": 41288599,
    "population_period": null,
    "area": 9984670,
    "land_area": 9093507,
    "water_area": 891163,
    "coastline": 202080,
    "elevation": 487,
    "lowest_point": {
      "name": "Atlantic/Pacific/Arctic Oceans",
      "elevation": 0
    },
    "highest_point": {
      "name": "Mount Logan",
      "elevation": 5959
    },
    "tld": ".ca",
    "borders": [
      "US"
    ],
    "blocs": [
      "G7",
      "NATO",
      "OECD"
    ],
    "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": "GST",
    "tax_rate": 5,
    "tax_id_format": "999999999RT9999",
    "tax_id_regex": "^[0-9]{9}RT[0-9]{4}$",
    "ioc": "CAN",
    "fifa": "CAN",
    "plate": "CDN"
  }
}

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.

Deep fields

deep.iso3string or null
Three-letter country code
deep.numericinteger or null
UN numeric code
deep.full_namestring or null
Official long name
deep.demonymstring or null
Demonym
deep.capitalstring or null
Capital city
deep.capital_latnumber or null
Capital latitude (null when there is no capital)
deep.capital_lonnumber or null
Capital longitude (null when there is no capital)
deep.regionstring or null
UN region
deep.subregionstring or null
UN subregion
deep.populationinteger or null
Population estimate
deep.population_periodstring or null
Observation year or multi-year period for this population estimate (YYYY or YYYY-YYYY). Null when the record has no verified period or population. Never the import date.
deep.areanumber or null
Total area in km²
deep.land_areanumber or null
Published land area in km². Null when unavailable or its published total differs from area
deep.water_areanumber or null
Published water area in km². Null when unavailable or its published total differs from area
deep.coastlinenumber or null
Published coastline length in kilometers. Zero is known zero; null is unavailable
deep.elevationnumber or null
Mean elevation in meters above sea level. Null when unavailable
deep.lowest_pointobject or null
Lowest geographic point, or null when unavailable or ambiguous
deep.lowest_point.namestring or null
Published place name. Null when unnamed
deep.lowest_point.elevationnumber
Meters above sea level. Negative values are below sea level
deep.highest_pointobject or null
Highest geographic point, or null when unavailable or ambiguous
deep.highest_point.namestring or null
Published place name. Null when unnamed
deep.highest_point.elevationnumber
Meters above sea level
deep.tldstring or null
Top-level domain
deep.bordersarray or null
Neighboring country ISO2 codes
deep.blocsarray
Bloc memberships (EU, EEA, SCHENGEN, EUROZONE, SEPA, NATO, and more). Expand each at /bloc/{code}
deep.week_startstring or null
First day of the week (monday, sunday, saturday)
deep.unitsstring or null
Measurement system (metric or imperial)
deep.driving_sidestring or null
left or right
deep.plugsarray or null
Power plug types, IEC letters (A through O)
deep.voltagenumber or null
Residential mains voltage. Null when no single standard exists
deep.frequencynumber or null
Mains frequency in Hz. Null when the grid is split (Japan runs both 50 and 60)
deep.emergencyobject or null
Emergency numbers: police, ambulance, fire. Null when not confirmed
deep.postal_formatstring or null
Postal code mask, # is a digit and A is a letter. Null when the country has no postal codes
deep.postal_regexstring or null
Anchored regex matching valid postal codes
deep.taxstring or null
National levy name (VAT, GST). Null when unavailable or no national levy applies, like the US
deep.tax_ratenumber or null
Standard national reference rate in percent: 19 means 19%. Do not add it to a state or ZIP reference
deep.tax_id_formatstring or null
Tax id example format, 9 is a digit (DE999999999)
deep.tax_id_regexstring or null
Anchored tax ID format regex. A match does not establish registration
deep.iocstring or null
Olympic committee code (GER, NED, SUI)
deep.fifastring or null
FIFA code. Null for GB, the home nations are the members
deep.platestring or null
International vehicle plate code (D, UK, CH)

Display language

Pass lang with a language tag such as fr, pt-BR, or zh-Hant. Country name and currency_name; deep.region and deep.subregion when requested. All 250 country records have names in each of the 41 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. This option follows the current API contract. Requests selecting frozen 1.0.0 retain that contract. Select API 2.0.0 to use display language.

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.

41 display language choices
Language tagLanguage
enAmerican English
zh-Hans简体中文
frfrançais (France)
deDeutsch
ititaliano
ja日本語
ko한국어
esespañol de España
arالعربية
bgбългарски
cacatalà
hrhrvatski
csčeština
dadansk
nlNederlands
fisuomi
elΕλληνικά
heעברית
hiहिन्दी
humagyar
idIndonesia
kkқазақ тілі
msMelayu
nbnorsk bokmål
plpolski
ptportuguês (Brasil)
roromână
ruрусский
skslovenčina
svsvenska
thไทย
trTürkçe
ukукраїнська
viTiếng Việt
zh-Hant繁體中文
en-AUAustralian English
en-GBBritish English
fr-CAfrançais canadien
es-419español latinoamericano
pt-PTportuguês europeu
zh-Hant-HK繁體中文(中國香港特別行政區)

Build with Country

All tutorials →

Questions? Email