Restcountries
Get information about countries via a RESTful API
Install / Use
/learn @apilayer/RestcountriesREADME
REST Countries
Get information about countries via a RESTful API https://restcountries.eu
Donate!
The restcountries project has been acquired by apilayer, one of the leading providers of API microservices. We will keep supporting restcountries and providing it as a free solution for developers. We will finance this project fully and have turned off the donations feature.
Users
RESTCountries has over 1200 users, including:
Spotify International Pricing Index
Stay up-to-date
Follow RESTCountries on Twitter
Or subscribe to the mailing list
API Endpoints
Below are described the REST endpoints available that you can use to search for countries
All
https://restcountries.eu/rest/v2/all
Name
Search by country name. It can be the native name or partial name
https://restcountries.eu/rest/v2/name/{name}
https://restcountries.eu/rest/v2/name/eesti
https://restcountries.eu/rest/v2/name/united
Full Name
Search by country full name
https://restcountries.eu/rest/v2/name/{name}?fullText=true
https://restcountries.eu/rest/v2/name/aruba?fullText=true
Code
Search by ISO 3166-1 2-letter or 3-letter country code
https://restcountries.eu/rest/v2/alpha/{code}
https://restcountries.eu/rest/v2/alpha/co
https://restcountries.eu/rest/v2/alpha/col
List of codes
Search by list of ISO 3166-1 2-letter or 3-letter country codes
https://restcountries.eu/rest/v2/alpha?codes={code};{code};{code}
https://restcountries.eu/rest/v2/alpha?codes=col;no;ee
Currency
Search by ISO 4217 currency code
https://restcountries.eu/rest/v2/currency/{currency}
https://restcountries.eu/rest/v2/currency/cop
Language
Search by ISO 639-1 language code
https://restcountries.eu/rest/v2/lang/{et}
https://restcountries.eu/rest/v2/lang/es
Capital city
Search by capital city
https://restcountries.eu/rest/v2/capital/{capital}
https://restcountries.eu/rest/v2/capital/tallinn
Calling code
Search by calling code
https://restcountries.eu/rest/v2/callingcode/{callingcode}
https://restcountries.eu/rest/v2/callingcode/372
Region
Search by region: Africa, Americas, Asia, Europe, Oceania
https://restcountries.eu/rest/v2/region/{region}
https://restcountries.eu/rest/v2/region/europe
Regional Bloc
Search by regional bloc:
- EU (European Union)
- EFTA (European Free Trade Association)
- CARICOM (Caribbean Community)
- PA (Pacific Alliance)
- AU (African Union)
- USAN (Union of South American Nations)
- EEU (Eurasian Economic Union)
- AL (Arab League)
- ASEAN (Association of Southeast Asian Nations)
- CAIS (Central American Integration System)
- CEFTA (Central European Free Trade Agreement)
- NAFTA (North American Free Trade Agreement)
- SAARC (South Asian Association for Regional Cooperation)
https://restcountries.eu/rest/v2/regionalbloc/{regionalbloc}
https://restcountries.eu/rest/v2/regionalbloc/eu
Response Example
https://restcountries.eu/rest/v2/alpha/col
[[{
"name": "Colombia",
"topLevelDomain": [".co"],
"alpha2Code": "CO",
"alpha3Code": "COL",
"callingCodes": ["57"],
"capital": "Bogotá",
"altSpellings": ["CO", "Republic of Colombia", "República de Colombia"],
"region": "Americas",
"subregion": "South America",
"population": 48759958,
"latlng": [4.0, -72.0],
"demonym": "Colombian",
"area": 1141748.0,
"gini": 55.9,
"timezones": ["UTC-05:00"],
"borders": ["BRA", "ECU", "PAN", "PER", "VEN"],
"nativeName": "Colombia",
"numericCode": "170",
"currencies": [{
"code": "COP",
"name": "Colombian peso",
"symbol": "$"
}],
"languages": [{
"iso639_1": "es",
"iso639_2": "spa",
"name": "Spanish",
"nativeName": "Español"
}],
"translations": {
"de": "Kolumbien",
"es": "Colombia",
"fr": "Colombie",
"ja": "コロンビア",
"it": "Colombia",
"br": "Colômbia",
"pt": "Colômbia"
},
"flag": "https://restcountries.eu/data/col.svg",
"regionalBlocs": [{
"acronym": "PA",
"name": "Pacific Alliance",
"otherAcronyms": [],
"otherNames": ["Alianza del Pacífico"]
}, {
"acronym": "USAN",
"name": "Union of South American Nations",
"otherAcronyms": ["UNASUR", "UNASUL", "UZAN"],
"otherNames": ["Unión de Naciones Suramericanas", "União de Nações Sul-Americanas", "Unie van Zuid-Amerikaanse Naties", "South American Union"]
}]
}]
Filter Response
You can filter the output of your request to include only the specified fields.
https://restcountries.eu/rest/v2/{service}?fields={field};{field};{field}
https://restcountries.eu/rest/v2/all?fields=name;capital;currencies
Sources
Similar projects
- Countries of the world
- REST Countries Node.js
- REST Countries Ruby
- REST Countries Go
- REST Countries Python
- world-currencies
- REST Countries C#
License
Mozilla Public License MPL 2.0
Related Skills
bluebubbles
352.2kUse when you need to send or manage iMessages via BlueBubbles (recommended iMessage integration). Calls go through the generic message tool with channel="bluebubbles".
gh-issues
352.2kFetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
healthcheck
352.2kHost security hardening and risk-tolerance configuration for OpenClaw deployments
node-connect
352.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
