World Country Profiles Scraper - Flags, Capitals & Currencies avatar

World Country Profiles Scraper - Flags, Capitals & Currencies

Pricing

from $0.50 / 1,000 results

Go to Apify Store
World Country Profiles Scraper - Flags, Capitals & Currencies

World Country Profiles Scraper - Flags, Capitals & Currencies

$0.5/1K πŸ”₯ Country profiles scraper! Flags, capitals, currencies, languages, population & borders for 250 countries. No key. JSON, CSV, Excel or API in seconds. Power forms & travel apps ⚑

Pricing

from $0.50 / 1,000 results

Rating

0.0

(0)

Developer

ninhothedev

ninhothedev

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

11 days ago

Last modified

Share

World Country Profiles Scraper 🌍

Get a complete, structured profile for every country on earth β€” flag image, flag emoji, capital city, region, population, area, official languages, currencies, international calling code, land borders, timezones, top-level domain and GPS coordinates β€” in a single run. No API key, no signup, no rate-limit headaches.

Country reference data sounds trivial until you need it. Then you discover that the free API you bookmarked is deprecated, the CSV you found is five years old, the flag URLs are broken, and half the "countries" in your dropdown are missing their capital. This actor gives you one clean, refreshed dataset you can drop straight into a database, a form, or an LLM pipeline.


What you get

One row per country or territory (~250 records), with these fields:

FieldExampleNotes
name_commonGermanyEveryday name
name_officialFederal Republic of GermanyFull official name
cca2 / cca3DE / DEUISO 3166-1 alpha-2 & alpha-3
capitalBerlinPrimary capital
region / subregionEurope / Western Europe
continents["Europe"]
population83491249Latest available figure
area_km2357114Square kilometres
languages["German"]Plain language names
currencies["EUR - Euro"]Human-readable label
currency_codes["EUR"]ISO 4217 codes
flag_pnghttps://flagcdn.com/w320/de.pngReady-to-embed image URL
flag_emojiπŸ‡©πŸ‡ͺ
latitude / longitude51 / 9Country centroid
borders["AUT","BEL","CZE", …]Neighbours as alpha-3
border_count9
timezones["UTC+01:00"]
tld[".de"]
calling_code+49International dialling prefix
driving_sideright
un_member / independenttrue / true
google_maps_urlGoogle Maps search link
source / scraped_atprovenance + UTC timestamp

Every field is nullable β€” small territories legitimately have no capital, no borders or no currency.


Input

{
"mode": "all",
"maxItems": 300
}
{
"mode": "countries",
"countries": ["Germany", "Japan", "BR", "USA"],
"maxItems": 300
}
InputTypeDefaultDescription
modeselect all / countriesallScrape every country, or only the ones you list
countriesarray of strings[]Names or ISO codes (Germany, DE, DEU, Deutschland all work)
maxItemsinteger (1–1000)300Cap on how many profiles get pushed

Use cases

1. Country dropdowns & signup forms. One run gives you name, ISO code, flag image and calling code β€” everything a country <select>, a phone-number field or a shipping form needs, already sorted and consistent. No more hand-maintained JSON files that drift out of date.

2. Travel & booking apps. Combine capital, coordinates, timezone, currency, driving side and Google Maps link to build destination pages, currency converters, or "what you need to know before you fly" cards without stitching together five different sources.

3. CRM & lead data enrichment. Map raw country strings from your leads ("DE", "Deutschland", "Germany") onto a canonical record with region, subregion and continent β€” then segment campaigns, assign sales territories, or normalise a messy import in minutes.

4. Teaching, quizzes & data journalism. Population, area, borders and flags are the raw material for geography quizzes, classroom datasets, choropleth maps and newsroom fact-checks. Border data (borders + border_count) also powers graph/network exercises.


Data source (and why it matters)

The classic free restcountries.com v1–v4 endpoints were shut down β€” every legacy request now returns {"success": false, "errors":[{"message":"This API version has been deprecated…"}]}, and the replacement v5 API requires an account and an Authorization: Bearer key.

This actor is built to keep working without a key:

  1. It still probes the legacy restcountries.com/v3.1/all?fields=… endpoint first, and uses it automatically if it ever comes back (source: "restcountries").
  2. Otherwise it falls back to the mledoze/countries dataset β€” the very open dataset restcountries itself was built on β€” served from GitHub raw (source: "mledoze"), enriched with:
    • population from the keyless World Bank indicator API (SP.POP.TOTL, most recent year),
    • timezones from the archived restcountries v2 dataset dump,
    • flag images from flagcdn.com (w320 PNG, hotlink-friendly).

The source field on every record tells you exactly which path was used for that run.


Pricing

Runs on the pay-per-usage model. A full ~250-country run finishes in well under a minute on 512 MB, which works out to roughly $0.5 per 1,000 country profiles β€” a complete world dataset for a few cents.


Output sample

{
"name_common": "Germany",
"name_official": "Federal Republic of Germany",
"cca2": "DE",
"cca3": "DEU",
"capital": "Berlin",
"region": "Europe",
"subregion": "Western Europe",
"continents": ["Europe"],
"population": 83491249,
"area_km2": 357114,
"languages": ["German"],
"currencies": ["EUR - Euro"],
"currency_codes": ["EUR"],
"flag_png": "https://flagcdn.com/w320/de.png",
"flag_emoji": "πŸ‡©πŸ‡ͺ",
"latitude": 51,
"longitude": 9,
"borders": ["AUT", "BEL", "CZE", "DNK", "FRA", "LUX", "NLD", "POL", "CHE"],
"border_count": 9,
"timezones": ["UTC+01:00"],
"tld": [".de"],
"calling_code": "+49",
"driving_side": "right",
"un_member": true,
"independent": true,
"google_maps_url": "https://www.google.com/maps/search/?api=1&query=Germany",
"source": "mledoze",
"scraped_at": "2026-07-28T13:59:09+00:00"
}

Export as JSON, CSV, Excel or XML, or pull it straight from the Apify API into your app.


FAQ

Do I need an API key? No. That is the whole point of this actor.

How many countries are there? 250 entries, covering UN members, observer states and dependent territories. Filter with un_member or independent if you only want sovereign states.

Why is capital empty for a few rows? Places like Antarctica or Bouvet Island genuinely have no capital. Same logic applies to borders for islands.

Can I get a specific country only? Yes β€” set mode to countries and list names or ISO codes.

How fresh is the data? Boundaries, codes and currencies come from a continuously maintained open dataset; population is the most recent World Bank figure available.



Development

python -m py_compile src/*.py
python tests/test_smoke.py # offline smoke tests
apify run # local run

Legal note: all data comes from public, openly licensed datasets (mledoze/countries, World Bank Open Data, flagcdn). No personal data is collected.