RestCountries
Overview
Simple get country info from RestCountries API. You can search by country code (Alpha2Code or Alpha3Code), calling code, currency, name, language, capital, region or regional block. Only need some info, but not all? Simply filter on fields by entering a comma seperated list of field names (see restcountries.com for field names). All calls will return a list of countries (when available).
Documentation
Description
Simple get country info from RestCountries API. You can search by country code (Alpha2Code or Alpha3Code), calling code, currency, name, language, capital, region or regional block.
Only need some info, but not all? Simply filter on fields by entering a comma seperated list of field names (see restcountries.com for field names).
All calls will return a list of countries (when available).
Typical usage scenario
Do you want to check some info on a country? What is the country flag, what is the used currency, what borders does the country have, what languages are there, what timezones,…..
Features and limitations
Get country information by one of the listed parameters.
- All
Get all countries availabe. - Alpha
Use Alpha2Code of Alpha3Code. Like NL or NLD. You can request multiple by using a comma seperated list of code like nl,be,gb,lu. - Calling code
Use the calling code. Like 31 or 32 (without + or 00) - Capital
Use acapital city of the country. Like Amsterdam. - Currency
Use a currency. Like EUR. - Language
Use a language. Like nl or nld. - Name
Use a country name (English or native). Like Netherlands or Nederland - Region
Use a region. The options are:- Africa
- Americas
- Asia
- Europ,
- Oceania
- Regional bloc
Use a regional bloc. The options are:- 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)
Dependencies
- Mendix 8.12.1+
- RestCountries.eu API
Installation
Simply import the module into your project.
Configuration
No configuration needed!
Usage
- Create a CountrySearch entity. Use the three attributes:
- SearchString
String to search for. - FieldFilter (can be empty)
Comma seperated list of fields. Like name,capital,currencies,languages - EndPoint
Enumeration with all endpoints.
- SearchString
- Call microflow GetCountries with CountrySearch as parameter.
The microflow will return the list of countries. The list will also be associated with the CountrySearch object.
Frequently Asked Questions
- Q: Do I need an account for RestCountries API?
- A: No! At this moment it is a free service! Their statement:
"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.”