REST Countries Reference Data Scraper
Pricing
from $10.00 / 1,000 result items
REST Countries Reference Data Scraper
Pull rich reference data on every country: official + common names, capital, currencies, languages, region, demonym, calling code, top-level domain, area, population, flag, coat-of-arms, timezones, borders, IDD. Filter by name, code, region, or currency.
Pricing
from $10.00 / 1,000 result items
Rating
0.0
(0)
Developer
ParseForge
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Share
REST Countries Reference Data Scraper
Scrape country reference data from REST Countries, up to a million records per run. Every country comes with its name, codes, capital, region, subregion, currencies, languages, population, area, and more. No API key or login. Export to CSV, JSON, Excel, or XML.
REST Countries is a free public API that provides reference data for every country in the world, but querying it directly means writing code, handling pagination, and parsing nested JSON. This Actor reads the API for you, filters by name, code, region, subregion, currency, language, or capital, and returns each country as one flat row. No registration, no rate limits to manage, no code to write.
| Who uses it | What they scrape REST Countries for |
|---|---|
| Data analysts | Building a clean country reference table for joins and lookups |
| Market researchers | Segmenting countries by region, language, or currency for reports |
| App developers | Populating a country picker or localization settings |
| Logistics teams | Mapping country codes to names and capitals for shipping rules |
| Educators | Downloading a current country dataset for geography lessons |
What it does
This Actor collects country records from the REST Countries API by lookup mode and returns each country as a flat row with its name, ISO codes, capital, region, subregion, currencies, languages, population, area, and other reference fields.
- 🌍 All countries: collect every country in one run, up to your maxItems limit.
- 🔎 Lookup by name: get one country by its common name, like Spain or Japan.
- 🏷️ Lookup by code: pass ISO-2 or ISO-3 codes, semicolon-separated, like US;FR;JP.
- 🗺️ Lookup by region or subregion: filter to Africa, Europe, South America, or any subregion.
- 💱 Lookup by currency: find every country that uses EUR, USD, JPY, or any ISO 4217 code.
- 🗣️ Lookup by language: list countries where Spanish, English, French, or Mandarin is spoken.
- 🏛️ Lookup by capital: find the country for a capital city like Tokyo, London, or Brasília.
Results export to CSV, JSON, Excel, or XML, or straight from the API.
What you can do with REST Countries data
📊 Build a country reference table.
A data analyst runs the Actor in all mode with maxItems 250 and exports the CSV to join country codes with sales data.
🌐 Segment markets by language.
A market researcher looks up countries by language Spanish and uses the list to plan a localized campaign.
💱 Find currency zones.
A fintech product manager looks up countries by currency EUR to see which markets share the euro.
🗺️ Filter by region for reporting.
An operations manager looks up countries by region Asia and downloads the JSON to feed a regional dashboard.
🏛️ Resolve capital cities.
A logistics developer looks up countries by capital Tokyo and gets the ISO codes needed for shipping rules.
Why choose this scraper
| What you get | |
|---|---|
| No API key or login | The Actor calls the public REST Countries API directly, so you can start a run immediately. |
| Flat, consistent rows | Nested fields like currencies and languages are flattened into a fixed schema for easy export. |
| Flexible lookups | Filter by name, ISO code, region, subregion, currency, language, or capital in one input. |
| Up to a million records | Set maxItems as high as you need, from one country to the entire dataset. |
| Multiple export formats | Download results as CSV, JSON, Excel, or XML from the Apify dataset. |
How it compares
No other Store actor targets REST Countries the same way, so the honest comparison is with the alternatives teams actually weigh.
| REST Countries Reference Data Scraper | Build it in-house | By hand | |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When REST Countries changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |
Configure the run
Drive the Actor from a lookup mode and value, and set a maximum number of countries to collect per run. Filters run as each record is read so only matches reach your dataset. The Input tab lists every parameter.
A first run with the defaults:
{"maxItems": 10,"mode": "all"}
A larger pull:
{"maxItems": 200,"mode": "all"}
Pricing
Pay-per-result: $0.01333 per result collected. You pay only for the results written to your dataset.
| Results collected | Approximate cost |
|---|---|
| 100 results | $1.33 |
| 1,000 results | $13.33 |
| 10,000 results | $133.30 |
New Apify accounts start with $5 in free credit.
Free users
Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.
Run it
- Create a free Apify account with $5 in credit.
- Open the REST Countries Reference Data Scraper.
- Set your inputs and any filters, then click Start.
- Export the results as CSV, Excel, JSON, or XML from the Dataset tab.
Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.
Use with AI agents (MCP)
Give an AI agent live access to REST Countries through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:
$claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/rest-countries-scraper"
Then prompt it in plain language to run the scraper and read back the results.
Troubleshooting
Why am I getting no results?
Check your lookup value for typos and make sure it matches the expected format for the mode. For example, currency codes must be 3-letter ISO 4217 codes, and region names must be one of the listed values.
Why did I get fewer results than maxItems?
The Actor returns only the countries that match your lookup. If you used a specific mode and value, there may be fewer matches than your maxItems limit. Try all mode to get every country.
Why is the capital field empty for some countries?
Some countries in the REST Countries API do not have a capital listed, such as Antarctica. This is expected and not an error.
Why are currencies and languages returned as objects?
The Actor flattens nested fields into a fixed schema, but some fields like currencies and languages may still contain structured data. You can parse them further in your downstream tool.
Can I filter by multiple languages or currencies at once?
The current input accepts one lookup value per run. To get countries for multiple languages or currencies, run the Actor multiple times with different values and merge the results.
FAQ
| Question | Answer |
|---|---|
| What is REST Countries? | REST Countries is a free public API that provides reference data for every country in the world, including names, codes, capitals, regions, currencies, languages, population, and area. This Actor scrapes that API and returns the data as flat rows. |
| Do I need an API key or login? | No. The Actor calls the public REST Countries API directly, so you can start a run immediately without any registration or credentials. |
| What lookup modes are available? | You can look up countries by name, ISO-2 or ISO-3 code, region, subregion, currency, language, or capital. You can also collect all countries in one run. |
| How do I pass multiple ISO codes? | In code mode, separate the codes with semicolons, for example US;FR;JP or USA;FRA;JPN. The Actor will return all matching countries. |
| What is the maximum number of countries I can collect? | You can set maxItems up to 1,000,000, which is more than the total number of countries in the world, so you can collect the entire dataset in one run. |
| What fields are returned for each country? | Each row includes the country name, ISO-2 and ISO-3 codes, capital, region, subregion, currencies, languages, population, area, and other reference fields from the API. |
| Can I export the results? | Yes. The Actor stores results in an Apify dataset, and you can export them as CSV, JSON, Excel, or XML from the Apify console or API. |
| Is the data current? | The Actor reads the live REST Countries API on each run, so the data reflects the latest information available from that source. |
| Can I schedule this Actor to run regularly? | Yes. You can set up a schedule in Apify to run the Actor daily, weekly, or at any interval, and it will always fetch the latest country data. |
| What if I get no results? | Check your lookup value for typos and make sure it matches the expected format for the mode. For example, currency codes must be 3-letter ISO 4217 codes, and region names must be one of the listed values. |
Related actors
Browse the full ParseForge collection for more scrapers.
🆘 Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.
⚠️ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by REST Countries. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.
