REST Countries Scraper avatar

REST Countries Scraper

Pricing

Pay per event

Go to Apify Store
REST Countries Scraper

REST Countries Scraper

Get comprehensive data for 250 countries — population, currencies, languages, capitals, flags, timezones, borders, and more.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

Get comprehensive data for 250 countries — population, currencies, languages, capitals, flags, timezones, borders, and more. Filter by region or search by name.

What does REST Countries Scraper do?

REST Countries Scraper fetches structured country data from the REST Countries API. Get all 250 countries at once, filter by region (Africa, Americas, Asia, Europe, Oceania), or search by country name. Results are sorted by population for easy analysis.

Each country includes official and native names, ISO codes, capital city, population, area, currencies with symbols, languages, timezones, bordering countries, flag images (PNG and SVG), coat of arms, map links, and more.

Why use REST Countries Scraper?

  • 250 countries — complete global coverage with rich metadata
  • Multiple modes — get all, filter by region, or search by name
  • Flag images — PNG and SVG flag URLs plus emoji flags
  • Currency details — codes, names, and symbols for every currency
  • Language data — all official languages with ISO codes
  • Geographic data — borders, timezones, area, map links, continents

Use cases

  • Educational resources — build geography quizzes, flashcards, or reference tools
  • Data enrichment — add country metadata to your datasets
  • Localization — get currencies, languages, and timezones for i18n
  • Analytics dashboards — visualize population, area, and regional distribution
  • Travel apps — show country info, flags, currencies, and driving side
  • Research — compare countries by population, borders, UN membership

How to use REST Countries Scraper

  1. Go to the REST Countries Scraper input page.
  2. Choose a Mode: all countries, filter by region, or search by name.
  3. Click Start and wait for the run to finish.
  4. Download your data in JSON, CSV, or Excel format.

Input parameters

ParameterTypeRequiredDefaultDescription
modestringNoallSelection mode: all, region, or search
regionstringNoEuropeRegion filter (Africa, Americas, Asia, Europe, Oceania)
searchQuerystringNoCountry name to search for (partial matches work)

Example input

{
"mode": "region",
"region": "Europe"
}

Output example

Each country returns comprehensive structured data:

{
"name": "Germany",
"officialName": "Federal Republic of Germany",
"nativeNames": ["Bundesrepublik Deutschland"],
"alpha2Code": "DE",
"alpha3Code": "DEU",
"capital": "Berlin",
"region": "Europe",
"subregion": "Western Europe",
"population": 83240525,
"area": 357114,
"currencies": "EUR (€)",
"currencyDetails": [{ "code": "EUR", "name": "Euro", "symbol": "€" }],
"languages": "German",
"languageDetails": [{ "code": "deu", "name": "German" }],
"timezones": ["UTC+01:00"],
"borders": ["AUT", "BEL", "CZE", "DNK", "FRA", "LUX", "NLD", "POL", "CHE"],
"flagPng": "https://flagcdn.com/w320/de.png",
"flagSvg": "https://flagcdn.com/de.svg",
"flagEmoji": "🇩🇪",
"coatOfArms": "https://mainfacts.com/media/images/coats_of_arms/de.png",
"googleMaps": "https://goo.gl/maps/mD9FBMq1nvXUBrkv6",
"openStreetMaps": "https://www.openstreetmap.org/relation/51477",
"independent": true,
"unMember": true,
"landlocked": false,
"startOfWeek": "monday",
"carSide": "right",
"continents": ["Europe"],
"scrapedAt": "2026-03-03T05:36:58.638Z"
}

Output fields

FieldTypeDescription
namestringCommon country name
officialNamestringOfficial country name
nativeNamesarrayNative name(s) in local language(s)
alpha2CodestringISO 3166-1 alpha-2 code (e.g., US, DE)
alpha3CodestringISO 3166-1 alpha-3 code (e.g., USA, DEU)
capitalstringCapital city name
regionstringGeographic region
subregionstringGeographic subregion
populationnumberTotal population
areanumberArea in square kilometers
currenciesstringSummary of currencies with symbols
currencyDetailsarrayDetailed currency info (code, name, symbol)
languagesstringSummary of languages
languageDetailsarrayDetailed language info (code, name)
timezonesarrayAll timezones
bordersarrayBordering country codes (alpha-3)
flagPngstringPNG flag image URL
flagSvgstringSVG flag image URL
flagEmojistringFlag emoji
coatOfArmsstringCoat of arms image URL
googleMapsstringGoogle Maps link
openStreetMapsstringOpenStreetMap link
independentbooleanWhether the country is independent
unMemberbooleanUN member status
landlockedbooleanWhether the country is landlocked
startOfWeekstringStart day of the week
carSidestringDriving side (left/right)
continentsarrayContinent(s) the country belongs to
scrapedAtstringISO 8601 timestamp of extraction

Pricing

REST Countries Scraper uses pay-per-event pricing:

EventPrice
Run started$0.001
Country extracted$0.0005 per country

Cost examples

ScenarioCost
All 250 countries$0.126
Europe (53 countries)$0.0275
Search for "united"~$0.003

API usage

Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("YOUR_USERNAME/rest-countries-scraper").call(
run_input={"mode": "region", "region": "Europe"}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(f"{item['flagEmoji']} {item['name']}{item['capital']} — pop: {item['population']:,}")

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('YOUR_USERNAME/rest-countries-scraper').call({
mode: 'region',
region: 'Europe',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach(item => {
console.log(`${item.flagEmoji} ${item.name}${item.capital} — pop: ${item.population.toLocaleString()}`);
});

Integrations

Connect REST Countries Scraper to your workflow with Apify integrations:

  • Webhooks — trigger actions when extraction completes
  • Google Sheets — export country data to spreadsheets
  • Zapier / Make — connect to 5,000+ apps and services
  • REST API — call the actor programmatically from any language

Tips and best practices

  • Use "all" mode to get the complete dataset of 250 countries in one run
  • Results are sorted by population (largest first) for easy analysis
  • Search mode supports partial matches — searching "united" finds United States, United Kingdom, UAE, etc.
  • Flag URLs are hosted on reliable CDNs and can be used directly in applications
  • Border codes are in alpha-3 format — use with the alpha3Code field to resolve names

Changelog

  • v0.1 — Initial release with all/region/search modes and comprehensive country data