Countries Data Scraper โ Population, Capitals & More
Pricing
from $0.0004 / country scraped
Countries Data Scraper โ Population, Capitals & More
Fetch country reference data in bulk as clean JSON, CSV or Excel: name, ISO codes, capital, region, population, area, languages, currencies, borders, coordinates, timezones, flags and calling codes. Get all countries, or filter by name, region or ISO code.
Pricing
from $0.0004 / country scraped
Rating
0.0
(0)
Developer
hiper soft
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
20 hours ago
Last modified
Categories
Share
Pull reference data for every country in the world as clean, structured JSON, CSV, Excel or XML. Get common and official names, ISO codes, capital, region, population, area, languages, currencies, borders, coordinates, timezones, flags and calling codes โ for all countries at once, or filtered by name, region or ISO code. Ideal for dropdowns, forms, dashboards, data enrichment and automated pipelines.
What does Countries Data Scraper do?
This actor turns world country data into a ready-to-use dataset. Choose a mode โ all countries, by name, by region, or by ISO code โ and it returns one tidy record per country with names, codes, capital, region, population, currencies, languages and more. Use it to seed a country/currency picker, enrich records with ISO codes, build a geography dashboard, or keep a fresh copy of country reference data on a schedule.
What data can you get?
| Field | Description |
|---|---|
name | Object with the country's common and official name. |
cca2 | Two-letter ISO 3166-1 country code (e.g. SG). |
cca3 | Three-letter ISO 3166-1 country code (e.g. SGP). |
capital | Capital city or cities. |
region | Region (e.g. Asia, Europe, Americas). |
subregion | Subregion (e.g. South-Eastern Asia). |
population | Population count. |
area | Land area in kmยฒ. |
languages | Spoken languages as code โ name pairs. |
currencies | Currencies as code โ { name, symbol } pairs. |
borders | Three-letter codes of bordering countries. |
latlng | Latitude and longitude of the country. |
flag | URL of the country's flag as a PNG image. |
timezones | Timezones observed in the country. |
tld | Internet top-level domain(s), e.g. .sg. |
callingCodes | International dialling code(s), e.g. +65. |
Use cases
- Dropdowns & forms โ populate country, currency or dialling-code pickers with correct ISO codes.
- Data enrichment โ add capital, region, population or currency to your existing records by ISO code.
- Dashboards & maps โ power geography, demographics or logistics dashboards.
- Localization โ map users to region, timezone, currency and language.
- Data pipelines โ feed structured country reference data into BI tools, notebooks or apps.
How to use it
- Add Countries Data Scraper to your Apify account and open its input.
- Pick a mode: all countries, by name, by region, or by ISO code.
- Fill in the matching field โ names, region, or codes โ for the filtered modes.
- Optionally set fields to keep only the columns you need, and maxItems to cap the output.
- Click Run, then export the results as JSON, CSV, Excel or XML.
Input
{"mode": "byRegion","region": "Europe"}
| Field | Description |
|---|---|
mode | all, byName, byRegion or byCode. |
names | For byName: country names to match (partial, case-insensitive). |
region | For byRegion: a single region, e.g. Europe. |
codes | For byCode: two- or three-letter ISO codes, e.g. US, SG, JPN. |
fields | Optional allow-list of output fields to keep. Empty = all fields. |
maxItems | Cap the number of countries returned. 0 = no limit. |
What you get
One flat JSON record per country, ready to export to CSV, Excel, JSON or XML.
{"name": { "common": "Singapore", "official": "Republic of Singapore" },"cca2": "SG","cca3": "SGP","capital": ["Singapore"],"region": "Asia","subregion": "South-Eastern Asia","population": 5685807,"area": 710,"languages": { "eng": "English", "msa": "Malay", "tam": "Tamil", "zho": "Chinese" },"currencies": { "SGD": { "name": "Singapore dollar", "symbol": "$" } },"borders": [],"latlng": [1.36666666, 103.8],"flag": "https://flagcdn.com/w320/sg.png","timezones": ["UTC+08:00"],"tld": [".sg"],"callingCodes": ["+65"]}
FAQ
How do I get every country?
Set mode to all. You'll get one record for every country.
How do I look up specific countries?
Use mode: "byCode" with a list of ISO codes (US, SG, JPN), or mode: "byName" with country names (partial matches work).
How do I get all countries in a region?
Use mode: "byRegion" with one of: Africa, Americas, Antarctic, Asia, Europe, Oceania.
Can I return only some fields?
Yes โ set fields to an allow-list, e.g. ["name", "cca2", "capital", "population"], to keep just those columns.
What export formats are available? JSON, CSV, Excel and XML, plus programmatic access through the Apify API.
Can I use this with n8n? Yes. Run it from the Apify n8n community node or trigger it over HTTP, then pass the dataset items straight into your n8n workflow to build dropdowns, enrich records or drive downstream steps.
Can I connect this to my other tools? It works with Make, Zapier, Slack, Airbyte, GitHub, Google Drive and many more, plus the Apify API, JavaScript/Python clients and MCP. Or use webhooks to trigger an action whenever a run finishes.
How fresh is the data? Static fields such as codes, capitals and borders change rarely; dynamic figures like population reflect the latest published values at run time. Re-run on a schedule to keep your copy current.
Related Actors
- World Bank Indicators Scraper โ GDP, population, inflation and thousands more indicators by country and year.
- Open-Meteo Weather Scraper โ free weather forecasts and history for any coordinates.
- CoinGecko Scraper โ live crypto prices, market cap and volume.
Notes
Original clean-room implementation. Returns only public country reference data; you are responsible for compliant use. Country names and boundaries are provided for reference and do not imply any political position. All trademarks belong to their respective owners.