TL;DR Short answer: REST Countries ETL tools load country reference data, such as ISO codes, names, capitals, regions, currencies, languages and calling codes, into a warehouse as a dimension table. REST Countries retired its free legacy versions, including v3.1, and the stable v5 API now needs an API key and returns paginated results, so older pipelines need migrating. Airbyte's Connector Builder or dlt can load v5, the open-source code can be self-hosted, and static datasets such as pycountry, GeoNames and the World Bank API remove the API dependency entirely. Eight REST Countries ETL tools compared:
Airbyte : build a REST Countries v5 source in the no-code Connector Builder and load it next to 700+ other sources.REST Countries v5 API : the current hosted API, with Bearer token authentication, pagination and field filters.Self-hosted REST Countries : the open-source REST Countries code, run on your own infrastructure for a keyless, stable endpoint.mledoze/countries dataset : a widely used open dataset of country data in JSON, CSV and other formats.pycountry : a Python library with ISO 3166 countries and subdivisions, ISO 4217 currencies and ISO 639 languages.GeoNames : free country information files with codes, capitals, populations, areas and neighbours.World Bank API : free country metadata with regions and income groups, plus development indicators.dbt seeds : load a country CSV into your warehouse as a version-controlled table.The REST Countries constraint: legacy versions such as v3.1 now return an error message with an HTTP 200 status, so pipelines that check only status codes can fail silently; validate response contents, and pin a dataset version for reference tables that should not change unexpectedly. REST Countries ETL tools load country reference data into a warehouse so every other table can join on a consistent country dimension, with codes, names, regions and currencies, rather than inconsistent free text. Country data changes rarely, so the main goals are correctness, stability and clear licensing rather than frequent syncs. For general API pipelines, see our guide to REST API ETL tools .
What changed in REST Countries v5, and how do you migrate from v3.1? REST Countries was the free, keyless API behind thousands of tutorials and country pickers. Its maintainers have deprecated versions 1 to 4, and the stable API is now v5:
New base URL: v5 is served from a dedicated API domain with paths such as /countries/v5, replacing the old /v3.1/all style endpoints.Authentication: v5 requires an API key, sent as a Bearer token or a key query parameter.Response shape: results come in a JSON:API-style envelope with pagination, rather than a bare array of countries.Field names: fields are reorganised under paths such as codes.alpha_3 and names.common, so mappings need updating.Silent failures: legacy endpoints return an error message with HTTP 200, so check response contents, not just status codes.Migration steps: get an API key, update endpoints and field mappings, add pagination, then compare row counts and codes against your old table before switching.ISO 3166 country codes: which code should your warehouse use? Country datasets carry several codes, and choosing one primary key avoids broken joins:
ISO 3166-1 alpha-2: two-letter codes such as DE and JP, the most common choice for joins with web analytics, payments and CRM data.ISO 3166-1 alpha-3: three-letter codes such as DEU and JPN, common in statistics and the World Bank and UN datasets.ISO 3166-1 numeric: three-digit codes such as 276, useful where scripts or languages vary.Other codes: IOC codes for sport, FIFA codes and calling codes such as +49 are different systems, so keep them as attributes rather than keys.Edge cases: Kosovo uses the user-assigned code XK, and disputed or dependent territories may be missing from some datasets.Store alpha-2 as the primary key and keep the other codes as columns, so any source can be mapped in. For data quality checks on reference tables, see our guide to data quality tools .
How do the REST Countries ETL tools compare? Tool Approach Auth Best for Cost and licence Airbyte Connector Builder on v5 API key Country data next to other sources Free self-hosted Core; paid Cloud plans REST Countries v5 Hosted API API key Current hosted data with search Check current plans Self-hosted REST Countries Your own instance None Keyless, stable internal endpoint Free; MPL-2.0 code mledoze/countries Static dataset None Pinned reference tables Free; ODbL pycountry Python library None ISO codes in Python pipelines Free; LGPL-2.1 GeoNames Downloadable files None for files Populations, areas and neighbours Free; CC BY 4.0 World Bank API Open data API None Income groups and indicators Free; CC BY 4.0 dbt seeds CSV in your dbt project None Version-controlled dimension tables Free with dbt Core
Which REST Countries ETL tools should you consider? Eight REST Countries ETL tools, from the hosted API to static datasets:
1. Airbyte Airbyte is the open-source data connectivity platform for AI and analytics. It does not have a dedicated REST Countries connector, so among REST Countries ETL tools Airbyte works through the no-code Connector Builder: you configure the v5 countries endpoint with Bearer token authentication and pagination, and sync it as a small full-refresh stream. For other ELT options, see our guide to ELT tools .
That loads a country dimension into the same warehouse as payments, CRM and analytics data from 700+ connectors, so every country field can be standardised. Airbyte runs in Airbyte Cloud, in your own environment with Airbyte Flex, or self-hosted with Airbyte Core.
Key features Connector Builder: configure Bearer authentication and pagination visually.Full refresh: reload the small country table on a schedule.Record selection: extract nested fields such as codes and names.Any destination: BigQuery, Snowflake, Postgres, Databricks and more.Best for: teams that want a managed country dimension next to other warehouse data.
Pricing: self-hosted Airbyte Core is free; Airbyte Cloud is billed on volume, and Pro and Airbyte Flex on capacity.
Pros Cons Custom v5 source with no code No dedicated REST Countries connector Country dimension next to other sources Needs a REST Countries API key Cloud, Flex or self-hosted Core Field mappings change with API versions
2. REST Countries v5 API Underneath most REST Countries ETL tools, the current hosted REST Countries API serves country data from a dedicated API domain, with list, search-by-property and lookup endpoints, field filters, pagination and documented error responses, including rate limiting. It requires an API key, and the hosted service is now offered under proprietary terms, so check its plans and terms before relying on it.
Key features Countries endpoint: list and search countries with pagination.Property search: filter by codes, names, region, membership and more.Field selection: return only the fields you need.Versioning policy: documented API versions and deprecations.Best for: teams that want hosted, maintained country data with search.
Pricing: check current plans on the REST Countries website.
Pros Cons Maintained hosted data Requires an API key Search by any field Proprietary terms for the hosted service Pagination and field filters Breaking changes from v3.1
3. Self-hosted REST Countries The REST Countries source code remains open source under the Mozilla Public License 2.0, so teams can run their own instance and get a keyless, stable endpoint that changes only when they upgrade it. It suits organisations that want the familiar API without depending on the hosted service. For relational storage of the results, see our guide to PostgreSQL ETL tools .
Key features Open source: full source available for self-hosting.Stable contract: no surprise version retirements.Internal network: serve country data inside your own infrastructure.Customisable: add internal attributes if needed.Best for: platform teams that want an internal country API.
Pricing: free under the MPL-2.0 licence; you pay for hosting.
Pros Cons Keyless and stable You run and maintain the service Familiar REST Countries model Data updates depend on your upgrades Open-source MPL-2.0 code Java service to host
4. mledoze/countries dataset Among REST Countries ETL tools that avoid APIs entirely, the mledoze/countries project on GitHub publishes country data, including ISO codes, names in many languages, capitals, currencies, languages, borders and calling codes, in JSON, CSV, XML and YAML. Pinning a release gives a reproducible reference table with no API dependency.
Key features Formats: JSON, CSV, XML and YAML.Codes: ISO alpha-2, alpha-3, numeric and more.Translations: country names in many languages.Borders and calling codes: neighbours and international dialling codes.Best for: teams that want a pinned, file-based country table.
Pricing: free under the Open Database License (ODbL).
Pros Cons No API dependency Updates require pulling new releases Many formats and translations ODbL licence requires attribution and share-alike Reproducible when pinned No search API
5. pycountry pycountry is a Python library that packages the ISO 3166 country and subdivision databases, ISO 4217 currencies and ISO 639 languages from Debian's iso-codes project. It is the quickest of the REST Countries ETL tools for Python pipelines that need to validate or translate codes. For more code-first options, see our guide to Python ETL tools .
Key features Countries: ISO 3166-1 codes and names.Subdivisions: ISO 3166-2 states, provinces and regions.Currencies and languages: ISO 4217 and ISO 639 data.Fuzzy search: look up countries by partial names.Best for: Python teams validating and translating country codes.
Pricing: free and open source under the LGPL-2.1 licence.
Pros Cons ISO standards in one library Python only Subdivisions included Fewer attributes than REST Countries No network calls Updates arrive with library releases
6. GeoNames GeoNames is one of the REST Countries ETL tools that adds geography: it publishes a free country information file with ISO codes, capitals, areas, populations, continents, top-level domains, currencies, calling codes, languages and neighbouring countries, alongside its much larger gazetteer of places. It suits teams that also need geographic attributes.
Key features Country info file: codes, capitals, areas, populations and neighbours.Gazetteer: millions of places for geocoding.Admin divisions: subdivision codes and names.Web services: free API with registration.Best for: teams needing geographic context beyond codes and names.
Pricing: free under the Creative Commons Attribution 4.0 licence.
Pros Cons Rich geographic attributes Tab-separated files need parsing Neighbours and populations Attribution required Free downloads Web service limits on the free tier
7. World Bank API Among REST Countries ETL tools for economic context, the World Bank's open data API returns country metadata, including region, income group and lending type, using ISO alpha-3 codes, plus thousands of development indicators. It suits analytics that segment countries by income level or join economic indicators.
Key features Country metadata: region, income group and capital.Indicators: population, GDP and many more series.Formats: JSON and XML responses.Aggregates: regional and income-group totals.Best for: analysts segmenting countries by income or development indicators.
Pricing: free open data under the Creative Commons Attribution 4.0 licence.
Pros Cons Income groups and regions Uses its own regional groupings Thousands of indicators Not a full reference dataset Free, no key required Some aggregates mixed with countries
8. dbt seeds The simplest of the REST Countries ETL tools for warehouse teams, dbt seeds load CSV files stored in your dbt project into the warehouse, which makes them a natural home for a country table built from any of the datasets above. The table is version-controlled, reviewed like code and tested with dbt tests. For more testing options, see our guide to ETL testing tools .
Key features CSV seeds: load CSV files as warehouse tables.Version control: review changes in pull requests.Tests: check uniqueness and not-null on country codes.Documentation: describe columns in dbt docs.Best for: teams that model their warehouse with dbt.
Pricing: free with dbt Core; the managed dbt platform is paid.
Pros Cons Version-controlled reference data Manual updates Tests run alongside models Best for small tables No external dependency at run time Requires a dbt project
What should you check before loading country data? Whichever REST Countries ETL tools you choose, check these first:
Primary key: choose ISO alpha-2 or alpha-3 as the key and keep other codes as attributes.Response validation: check row counts and key fields, since legacy API versions return errors with HTTP 200.Licensing: confirm attribution and share-alike terms, especially for ODbL and CC BY datasets.Disputed territories: decide how to treat Kosovo, Taiwan, Western Sahara and dependent territories consistently.Names: pick a naming standard, such as common English names, and store official and local names separately.Change control: pin versions and review changes, because country tables feed every other report.How do you start loading REST Countries data with Airbyte? If you decide to test Airbyte, loading REST Countries v5 takes three steps.
Step 1: Get a REST Countries API key Create an account on the REST Countries website and generate an API key for the v5 API.
Step 2: Build a source in the Connector Builder In Airbyte, open the Connector Builder and create a stream for the v5 countries endpoint, with Bearer token authentication and pagination. Test it, then publish it to your workspace.
Step 3: Set up a destination and connection Pick a destination, such as BigQuery, Snowflake or Postgres, and schedule a weekly or monthly full refresh. The process is the same whether you start with Airbyte Cloud or run self-hosted Airbyte Core .
Which REST Countries ETL tool should you choose? Choosing between REST Countries ETL tools depends on how much you want to depend on an external API. For hosted, maintained data, load the v5 API with Airbyte's Connector Builder or dlt. For a keyless internal endpoint, self-host REST Countries. For reference tables that should never change unexpectedly, pin the mledoze/countries dataset or pycountry and load it with dbt seeds, and add GeoNames or the World Bank API for geographic and economic attributes. For spreadsheet-based reference data, see our guide to Google Sheets ETL tools .
Load country reference data with Airbyte Build a REST Countries v5 source with the Connector Builder and load a clean country dimension next to 700+ other sources, in Airbyte Cloud, in your own environment with Airbyte Flex, or self-hosted with Airbyte Core.
Try Airbyte Cloud free for 14 days or talk to our team .
Frequently Asked Questions (FAQs) 1. What are the best REST Countries ETL tools? For the hosted API, use Airbyte's Connector Builder or dlt on REST Countries v5. For stable reference tables, self-host REST Countries or load static datasets such as mledoze/countries, pycountry or GeoNames with dbt seeds, and use the World Bank API for income groups.
2. Is REST Countries v3.1 still working? No. REST Countries has deprecated versions 1 to 4, including v3.1. The stable API is v5, which requires an API key and returns paginated results.
3. Does REST Countries v5 need an API key? Yes. v5 requires an API key, sent as a Bearer token or a key query parameter.
4. Which country code should I use as a primary key? ISO 3166-1 alpha-2 codes, such as US and DE, are the most common choice because most analytics, payments and CRM systems use them. Keep alpha-3 and numeric codes as attributes.
5. Is there a free alternative to the REST Countries API? Yes. The REST Countries code can be self-hosted, and static datasets such as mledoze/countries, pycountry and GeoNames provide country data without an API key.
Suggested reads REST API ETL Tools
Data Quality Tools
Python ETL Tools
Google Sheets ETL Tools