Custom Connector

REST Countries API

Global

The REST Countries API provides a RESTful interface to access comprehensive country data — names, flags, regions, languages, currencies, and more. It supports querying country data by name, code, currency, language, region, and other criteria, with no authentication required.

Type
Virtual machines, Single VM, BYOL
Runs on
Google Compute Engine
Last update
24 Oct 2024
Category
Integration
Overview

Integration Overview

The REST Countries API offers the following integration points to query country-related data, with optional field filtering to customize responses.

  • Get All / Independent Countries. Retrieve all countries (with field filtering), or only independent ones.
  • Get Country by Name / Code / Codes. Retrieve country details by name, a single ISO code, or a list of codes.
  • Get by Currency / Demonym / Language. Fetch countries by currency, demonym, or spoken language.
  • Get by Capital / Region / Subregion / Translation. Fetch countries by capital, region, subregion, or translated name.
  • Generic Service with Field Filtering. Query any service with customizable field filtering.
Documentation

Detailed Integration Documentation

Get All / Independent Countries

ActionsGet All Countries / getIndependentCountries
EndpointsGET /all · GET /independent
PurposeRetrieves all countries (with optional field filtering), or only countries that are independent.
ParametersAll — optional:
fields (e.g. name,flags). Independent — required:
status (boolean, e.g. true).
OutputSuccessful: a JSON array of countries. Failure: error if fields is malformed or status is missing/invalid.
Workflow exampleGET /all?fields=name,flags to populate a dashboard, or /independent?status=true to filter.

Get Country by Name / Code / Codes

ActionsgetCountryByName / getCountryByCode / getCountriesByCodes
EndpointsGET /name/{name} · GET /alpha/{code} · GET /alpha?codes=
PurposeRetrieves a country by full/partial name, by a single ISO 3166-1 code, or several countries by a list of codes.
Parametersname (path) + optional fullText (boolean); code (path) — alpha-2 or alpha-3; codes — comma-separated (e.g. US,GB,FR).
OutputSuccessful: a JSON object or array with country details. Failure: error if no match / invalid code.
Workflow exampleGET /name/Canada?fullText=true, GET /alpha/US, or GET /alpha?codes=US,GB,FR.

Get by Currency / Demonym / Language

ActionsgetCountriesByCurrency / getCountriesByDemonym / getCountriesByLanguage
EndpointsGET /currency/{currency} · GET /demonym/{demonym} · GET /lang/{language}
PurposeRetrieves countries that use a currency (ISO 4217), match a demonym, or speak a language (ISO 639-1).
ParametersRequired (path):
currency (e.g. usd), demonym (e.g. American), or language (e.g. en).
OutputSuccessful: a JSON array of matching countries. Failure: error if the value is invalid.
Workflow exampleGET /currency/usd, /demonym/American, or /lang/en.

Get by Capital / Region / Subregion / Translation

ActionsgetCountriesByCapital / getCountriesByRegion / getCountriesBySubregion / getCountriesByTranslation
EndpointsGET /capital/{capital} · /region/{region} · /subregion/{subregion} · /translation/{translation}
PurposeRetrieves countries by capital city, region (e.g. Europe), subregion (e.g. Northern Europe), or translated name (e.g. Deutschland).
ParametersRequired (path):
capital, region, subregion, or translation.
OutputSuccessful: a JSON array of matching countries. Failure: error if the value is invalid or no match.
Workflow exampleGET /region/Europe, /subregion/Northern Europe, or /translation/Deutschland.

Generic Service with Field Filtering

ActiongetGenericService
EndpointGET /{service}
PurposeA flexible endpoint to query any service with customizable field filtering.
ParametersRequired (path):
service (e.g. all). Optional:
fields (e.g. name,flags,region).
OutputSuccessful: a JSON response with filtered data. Failure: error if the service or fields are invalid.
Workflow exampleGET /all?fields=name,flags,region to extract specific fields.

Example Workflow: Country Information Dashboard

Fetch all countriesGET /all?fields=name,flags,region to populate names and flags.
Country detailGET /name/France?fullText=true for population, capital, and languages.
FilterUse region/subregion endpoints to segment the dashboard.
MonitorHandle invalid inputs gracefully and log calls; use fields to reduce payloads (CORS supported, no auth).

Use Case

A travel insights platform integrates the REST Countries API on GCP for real-time access to global country metadata. Using /all, /name/{name}, and /region/{region}, the system fetches flags, regions, capitals, currencies, and languages, ingested into BigQuery for demographic analysis and multilingual personalization. Filtered field queries reduce payloads, and responses are cached in Cloud Storage — powering destination intelligence, regional segmentation, and international compliance across web and mobile services.

Support

For technical support, contact custom-connectors-support@isolutions.sa.

free consultation

Schedule a Free Consultation With Our Specialists

Book a free demo
request

Begin Your Adventure With Experienced Professionals

Send request
help desk

Do You Have Questions or Want More Information? Call Now.

Contact support