482 scrapers live47.7K runs1,562 usersRebuilt in the last 30 days: 482 of 482

Scrapers / Developer & File Tools

Countries Data Scraper logo

Countries Data Scraper

hipersoft/restcountries-scraper

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.

Total users

2

Monthly users

1

Total runs

63

Per country scraped

$0.0008

Last rebuilt

Oct 26, 2026

Overview

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

  1. Add Countries Data Scraper to your Apify account and open its input.
  2. Pick a mode: all countries, by name, by region, or by ISO code.
  3. Fill in the matching field — names, region, or codes — for the filtered modes.
  4. Optionally set fields to keep only the columns you need, and maxItems to cap the output.
  5. 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.

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.

Input

FieldTypeDescription
mode
Mode
string · all, byName, byRegion, byCodeHow to select countries. "All countries" returns every country. "By name" filters by the names you list. "By region" returns every country in one region. "By ISO code" returns the exact countries whose two- or three-letter ISO codes you list.
Default: "all"
names
Country names
arrayUsed when mode is "By name". One or more country names to match (partial, case-insensitive), e.g. "Singapore", "united", "korea". Matches common, official and native names.
region
Region
stringUsed when mode is "By region". A single region name: Africa, Americas, Antarctic, Asia, Europe or Oceania.
codes
ISO codes
arrayUsed when mode is "By ISO code". Two-letter (cca2) or three-letter (cca3) ISO country codes, e.g. "US", "SG", "JPN". Case-insensitive.
fields
Fields
arrayOptional allow-list of output fields to keep, e.g. "name", "cca2", "capital", "population". Leave empty to return every field. Valid names: name, cca2, cca3, capital, region, subregion, population, area, languages, currencies, borders, latlng, flag, timezones,
maxItems
Max countries
integerMaximum number of countries to output. 0 = no limit.
Default: 0

API

curl -X POST "https://api.apify.com/v2/acts/hipersoft~restcountries-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "names": [
    "Singapore",
    "Japan"
  ],
  "region": "Europe",
  "codes": [
    "US",
    "SG",
    "JP"
  ],
  "fields": [
    "name",
    "cca2",
    "capital",
    "population"
  ]
}'

Pricing

EventPricePaid plans from
Country Scraped
Charged per country returned.
$0.0008$0.0004

You pay only for what the run returns. Set a maximum cost per run and it stops cleanly at that limit.

Related scrapers

Bulk Image Downloader

Download thousands of images from a list of URLs and store each in the key-value store with a public link. Returns content type, size, dimensions and SHA-256 per image. Bulk-ready. Great for datasets, backups and media pipelines.

8,102 runs · 103 users · $0.056 / url processed

Text to Speech

Convert any text to natural-sounding speech as an MP3 download. 300+ premium neural voices across 70+ languages, adjustable rate, pitch and volume. Great for voiceovers, videos, accessibility and audio content. No setup.

278 runs · 22 users · $0.01 / audio generated

Google Maps Email Extractor

Search Google Maps for businesses, then crawl each business website to extract emails, social profiles and extra phone numbers. Turns any Maps search into a ready lead list. No setup.

159 runs · 8 users · $0.006 / business lead scraped

Website Screenshot

Capture full-page or viewport screenshots of any URL as PNG or JPEG, at any device size. For monitoring, previews, thumbnails and automation workflows.

156 runs · 3 users · $0.004 / screenshot captured

Bulk URL Status Checker

Check thousands of URLs over plain HTTP: status codes, broken links (404/410/5xx), full redirect chains, response time, content type, page title and SSL certificate expiry.

154 runs · 13 users · $0.002 / url checked

Google Search Scraper

Scrape Google Search results (organic listings) for any query: title, URL, displayed URL, snippet and position. Multi-query, per-country/language, pagination. Uses Google SERP proxy — reliable, no captcha, no setup.

121 runs · 8 users · $0.001 / result scraped
Need a source that isn't here?

Send the site and the fields. We build it and you get it first.

Request a build