# REST Countries Info Scraper (`parseforge/restcountries-info-scraper`) Actor

Export 250+ countries with population, capital, area, currencies, languages, borders, demonyms, flags, region, subregion, and timezones. Query all, by name, region, language, currency, or independence status. Open dataset, no auth.

- **URL**: https://apify.com/parseforge/restcountries-info-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Developer tools, Education, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.00 / 1,000 result items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## 🌍 REST Countries Info Scraper

> 🚀 **Export the global country reference dataset in seconds.** Pull **250+ countries** with population, capital, currencies, languages, borders, flags, and demonyms. No API key, no registration, no manual CSV wrangling.

> 🕒 **Last updated:** 2026-05-22 · **📊 29 fields** per record · **🌎 250+ countries** · **🗣️ 184 languages** · **💱 174 currencies**

The **REST Countries Info Scraper** exports the community-maintained country reference catalog and returns **29 fields per record**, including ISO 3166 codes, official and common names, population, capital cities, currencies, spoken languages, neighboring borders, demonyms, flags, calling codes, and continent assignments. The underlying source is one of the most widely cited open country datasets on the web.

The catalog covers **every UN-recognized state, observer entities, and dependent territories**, across all continents and 184 spoken languages. This Actor turns that reference into a downloadable dataset as CSV, Excel, JSON, or XML in under five minutes. Six query modes let you pull the whole world, search by name, or filter by region, language, currency, or independence status.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Trip-planning platforms, edtech publishers, fintech onboarding, BI dashboards, news desks, NGOs, GIS engineers | Country pickers, geo dropdowns, currency-aware checkouts, language fallback logic, demographic dashboards, classroom worksheets |

---

### 📋 What the REST Countries Scraper does

Six query workflows in a single run:

- 🌐 **Worldwide export.** Every country, territory, and dependency in one pull.
- 🔎 **Search by name.** Pass a full or partial country name and get matching records.
- 🗺️ **Filter by region.** Africa, Americas, Asia, Europe, Oceania, or Antarctic.
- 🗣️ **Filter by language.** Restrict to countries that speak Spanish, French, Arabic, and 180+ more.
- 💱 **Filter by currency.** Filter by any ISO 4217 currency code, like USD, EUR, or JPY.
- 🕊️ **Independent countries only.** Skip observer entities and dependent territories.

Each record bundles identifiers (ISO 2, ISO 3, numeric), geography (capital, region, subregion, continents, lat/lng), demographics (population, area), culture (languages, demonyms, translations), economics (currencies, calling codes), and reference links to Google Maps and OpenStreetMap.

> 💡 **Why it matters:** every product with a country dropdown, a currency formatter, or a language selector needs this data, and most teams hand-roll it from CSVs that go stale within a year. This Actor keeps your country reference fresh on every run.

---

### 🎬 Full Demo

_🚧 Coming soon: a 3-minute walkthrough showing how to go from sign-up to a downloaded dataset._

---

### ⚙️ Input

<table>
<thead>
<tr><th>Input</th><th>Type</th><th>Default</th><th>Behavior</th></tr>
</thead>
<tbody>
<tr><td><code>maxItems</code></td><td>integer</td><td><code>10</code></td><td>Records to return. Free plan caps at 10, paid plan at 1,000,000.</td></tr>
<tr><td><code>mode</code></td><td>enum</td><td><code>"all"</code></td><td>Query mode: <code>all</code>, <code>name</code>, <code>region</code>, <code>lang</code>, <code>currency</code>, or <code>independent</code>.</td></tr>
<tr><td><code>nameQuery</code></td><td>string</td><td><code>""</code></td><td>Full or partial country name. Used when mode is <code>name</code>.</td></tr>
<tr><td><code>region</code></td><td>enum</td><td><code>""</code></td><td>Africa, Americas, Asia, Europe, Oceania, or Antarctic. Used when mode is <code>region</code>.</td></tr>
<tr><td><code>language</code></td><td>string</td><td><code>""</code></td><td>Language name like <code>spanish</code>. Used when mode is <code>lang</code>.</td></tr>
<tr><td><code>currencyCode</code></td><td>string</td><td><code>""</code></td><td>ISO 4217 code like <code>EUR</code>. Used when mode is <code>currency</code>.</td></tr>
<tr><td><code>fields</code></td><td>array</td><td><code>[]</code></td><td>Optional projection of the 35 source fields. Empty returns the full record.</td></tr>
</tbody>
</table>

**Example: every country in Europe.**

```json
{
    "maxItems": 60,
    "mode": "region",
    "region": "europe"
}
````

**Example: countries that use the Euro.**

```json
{
    "maxItems": 30,
    "mode": "currency",
    "currencyCode": "EUR"
}
```

> ⚠️ **Good to Know:** population, area, and currency lists reflect the upstream community dataset and are not real-time economic figures. For high-stakes financial workflows, cross-check against a primary statistical source. Demonyms and translations are crowd-sourced and may vary in regional spelling.

***

### 📊 Output

Each country record contains **29 fields**. Download the dataset as CSV, Excel, JSON, or XML.

#### 🧾 Schema

| Field | Type | Example |
|---|---|---|
| 🏳️ `flagUrl` | string | `"https://flagcdn.com/w320/de.png"` |
| 🇨 `commonName` | string | `"Germany"` |
| 🏛️ `officialName` | string | `"Federal Republic of Germany"` |
| 🆔 `cca2` | string | `"DE"` |
| 🆔 `cca3` | string | `"DEU"` |
| 🔢 `ccn3` | string | `"276"` |
| 🕊️ `independent` | boolean | `true` |
| 🇺🇳 `unMember` | boolean | `true` |
| 🏛️ `capital` | array | `["Berlin"]` |
| 🌍 `region` | string | `"Europe"` |
| 🗺️ `subregion` | string | `"Western Europe"` |
| 🌎 `continents` | array | `["Europe"]` |
| 👥 `population` | number | `83240525` |
| 📐 `area` | number | `357114` |
| 🗣️ `languages` | object | `{"deu": "German"}` |
| 💱 `currencies` | object | `{"EUR": {"name": "Euro", "symbol": "€"}}` |
| 👤 `demonyms` | object | `{"eng": {"f": "German", "m": "German"}}` |
| 🤝 `borders` | array | `["AUT","BEL","CZE","DNK","FRA","LUX","NLD","POL","CHE"]` |
| 🕒 `timezones` | array | `["UTC+01:00"]` |
| 📍 `latlng` | array | `[51, 9]` |
| 🌐 `tld` | array | `[".de"]` |
| ☎️ `callingCodes` | array | `["+49"]` |
| 🚗 `drivingSide` | string | `"right"` |
| 📅 `startOfWeek` | string | `"monday"` |
| 🗺️ `mapsGoogle` | string | `"https://goo.gl/maps/..."` |
| 🗺️ `mapsOpenStreetMaps` | string | `"https://www.openstreetmap.org/..."` |
| 🌐 `translations` | object | `{"fra": {"official": "République fédérale d'Allemagne", "common": "Allemagne"}}` |
| 🕒 `scrapedAt` | ISO 8601 | `"2026-05-22T00:00:00.000Z"` |
| ⚠️ `error` | string | null | `null` |

#### 📦 Sample records

<details>
<summary><strong>🇩🇪 European country: Germany</strong></summary>

```json
{
    "flagUrl": "https://flagcdn.com/w320/de.png",
    "commonName": "Germany",
    "officialName": "Federal Republic of Germany",
    "cca2": "DE",
    "cca3": "DEU",
    "ccn3": "276",
    "independent": true,
    "unMember": true,
    "capital": ["Berlin"],
    "region": "Europe",
    "subregion": "Western Europe",
    "continents": ["Europe"],
    "population": 83240525,
    "area": 357114,
    "languages": {"deu": "German"},
    "currencies": {"EUR": {"name": "Euro", "symbol": "€"}},
    "demonyms": {"eng": {"f": "German", "m": "German"}},
    "borders": ["AUT", "BEL", "CZE", "DNK", "FRA", "LUX", "NLD", "POL", "CHE"],
    "timezones": ["UTC+01:00"],
    "latlng": [51, 9],
    "tld": [".de"],
    "callingCodes": ["+49"],
    "drivingSide": "right",
    "startOfWeek": "monday",
    "mapsGoogle": "https://goo.gl/maps/mD9FBMq1nvXUBrkv6",
    "mapsOpenStreetMaps": "https://www.openstreetmap.org/relation/51477",
    "translations": {"fra": {"official": "République fédérale d'Allemagne", "common": "Allemagne"}},
    "scrapedAt": "2026-05-22T00:00:00.000Z"
}
```

</details>

<details>
<summary><strong>🇯🇵 Island nation: Japan</strong></summary>

```json
{
    "flagUrl": "https://flagcdn.com/w320/jp.png",
    "commonName": "Japan",
    "officialName": "Japan",
    "cca2": "JP",
    "cca3": "JPN",
    "ccn3": "392",
    "independent": true,
    "unMember": true,
    "capital": ["Tokyo"],
    "region": "Asia",
    "subregion": "Eastern Asia",
    "continents": ["Asia"],
    "population": 125836021,
    "area": 377930,
    "languages": {"jpn": "Japanese"},
    "currencies": {"JPY": {"name": "Japanese yen", "symbol": "¥"}},
    "demonyms": {"eng": {"f": "Japanese", "m": "Japanese"}},
    "borders": [],
    "timezones": ["UTC+09:00"],
    "latlng": [36, 138],
    "tld": [".jp"],
    "callingCodes": ["+81"],
    "drivingSide": "left",
    "startOfWeek": "monday",
    "mapsGoogle": "https://goo.gl/maps/NGTLSCSrA8bMrvnX9",
    "mapsOpenStreetMaps": "https://www.openstreetmap.org/relation/382313",
    "translations": {"fra": {"official": "Japon", "common": "Japon"}},
    "scrapedAt": "2026-05-22T00:00:00.000Z"
}
```

</details>

<details>
<summary><strong>🇻🇦 Micro state: Vatican City</strong></summary>

```json
{
    "flagUrl": "https://flagcdn.com/w320/va.png",
    "commonName": "Vatican City",
    "officialName": "Vatican City State",
    "cca2": "VA",
    "cca3": "VAT",
    "ccn3": "336",
    "independent": true,
    "unMember": false,
    "capital": ["Vatican City"],
    "region": "Europe",
    "subregion": "Southern Europe",
    "continents": ["Europe"],
    "population": 451,
    "area": 0.44,
    "languages": {"ita": "Italian", "lat": "Latin"},
    "currencies": {"EUR": {"name": "Euro", "symbol": "€"}},
    "demonyms": {"eng": {"f": "Vatican", "m": "Vatican"}},
    "borders": ["ITA"],
    "timezones": ["UTC+01:00"],
    "latlng": [41.9, 12.45],
    "tld": [".va"],
    "callingCodes": ["+379"],
    "drivingSide": "right",
    "startOfWeek": "monday",
    "mapsGoogle": "https://goo.gl/maps/DTKvw5Bd1QnGNZPk9",
    "mapsOpenStreetMaps": "https://www.openstreetmap.org/relation/36989",
    "translations": {"fra": {"official": "État de la Cité du Vatican", "common": "Cité du Vatican"}},
    "scrapedAt": "2026-05-22T00:00:00.000Z"
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 🌍 | **Global coverage.** 250+ countries, territories, and dependencies across all six populated continents. |
| 🎯 | **Six query modes.** All, by name, by region, by language, by currency, or independence-only. |
| 🆔 | **Canonical codes.** ISO 3166 alpha-2, alpha-3, and numeric codes for clean joins with billing, shipping, and analytics pipelines. |
| 💱 | **Currency-ready.** Native currency objects with code, symbol, and name make checkout and pricing logic trivial. |
| 🗣️ | **Multilingual.** Common-name translations into French, German, Spanish, Portuguese, Italian, Japanese, and more. |
| 🔁 | **Always fresh.** Every run pulls the latest reference data so flags, capitals, and population figures stay current. |
| 🚫 | **No authentication.** Public dataset. No login, no token, no rate-limit games. |

> 📊 Accurate country reference data underpins every signup form, currency converter, shipping calculator, and dashboard in modern software.

***

### 📈 How it compares to alternatives

| Approach | Cost | Coverage | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| **⭐ REST Countries Scraper** *(this Actor)* | $5 free credit, then pay-per-use | **250+** worldwide | **Live per run** | name, region, language, currency, independent | ⚡ 2 min |
| Statistical office bulk downloads | Free | One country at a time | Annual | None | 🐢 Days |
| Commercial geo data feeds | $200+/month | Global | Daily | Many | ⏳ Hours |
| Hand-built CSVs from Wikipedia | Free | Whatever you typed | Never | None | 🕒 Painful |

Pick this Actor when you want broad global coverage, fast filtering, and a reference dataset you don't have to maintain.

***

### 🚀 How to use

1. 📝 **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. 🌐 **Open the Actor.** Go to the REST Countries Info Scraper page on the Apify Store.
3. 🎯 **Set input.** Pick a query mode, fill in the matching field, and set `maxItems`.
4. 🚀 **Run it.** Click **Start** and let the Actor collect your dataset.
5. 📥 **Download.** Grab results in the **Dataset** tab as CSV, Excel, JSON, or XML.

> ⏱️ Total time from signup to downloaded dataset: **3-5 minutes.** No coding required.

***

### 💼 Business use cases

<table>
<tr>
<td width="50%" valign="top">

#### ✈️ Travel & Trip Planning

- Country pickers with native names and flags
- Currency-aware budgeting tools
- Visa-and-border feature lookups
- Capital-city geo enrichment for itineraries

</td>
<td width="50%" valign="top">

#### 🎓 Edtech & Reference

- Classroom worksheets with verified country facts
- Quiz-app question banks with flags and capitals
- Geography curriculum data feeds
- Language-coverage maps for ESL platforms

</td>
</tr>
<tr>
<td width="50%" valign="top">

#### 📊 BI Dashboards & Analytics

- Country reference table for sales pipelines
- Population-weighted market analyses
- Region rollups for executive dashboards
- Currency-converted revenue normalization

</td>
<td width="50%" valign="top">

#### 💳 Fintech & Onboarding

- ISO-3166 dropdowns for KYC flows
- Calling-code prefixes for SMS verification
- Country-of-residence checks for compliance
- Currency lists for cross-border payments

</td>
</tr>
</table>

***

### 🔌 Automating REST Countries Scraper

Control the scraper programmatically for scheduled runs and pipeline integrations:

- 🟢 **Node.js.** Install the `apify-client` NPM package.
- 🐍 **Python.** Use the `apify-client` PyPI package.
- 📚 See the [Apify API documentation](https://docs.apify.com/api/v2) for full details.

The [Apify Schedules feature](https://docs.apify.com/platform/schedules) lets you trigger this Actor on any cron interval. Hourly, daily, or weekly refreshes keep downstream databases in sync automatically.

***

### 🌟 Beyond business use cases

Country reference data powers far more than commercial workflows. The same records support research, education, civic projects, and personal initiatives.

<table>
<tr>
<td width="50%">

#### 🎓 Research and academia

- Demographic comparisons across regions
- Geospatial coursework with verified codes and coordinates
- Reproducible studies with cited, versioned dataset pulls
- Open-data exercises on global statistics

</td>
<td width="50%">

#### 🎨 Personal and creative

- Hobby projects, flag-quiz apps, and trivia bots
- Travel maps and bucket-list dashboards
- Wallpaper packs and infographic content
- Language-learning side projects

</td>
</tr>
<tr>
<td width="50%">

#### 🤝 Non-profit and civic

- Aid-program coverage maps by country
- Civic transparency around international cooperation
- Investigative journalism on cross-border issues
- OpenStreetMap and open-knowledge contributions

</td>
<td width="50%">

#### 🧪 Experimentation

- Train country-classification or NER models
- Validate localization hypotheses with real data
- Prototype agent pipelines that resolve geo entities
- Seed mock data with realistic country references

</td>
</tr>
</table>

***

### 🤖 Ask an AI assistant about this scraper

Open a ready-to-send prompt about this ParseForge actor in the AI of your choice:

- 💬 [**ChatGPT**](https://chat.openai.com/?q=How%20do%20I%20use%20the%20REST%20Countries%20Info%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🧠 [**Claude**](https://claude.ai/new?q=How%20do%20I%20use%20the%20REST%20Countries%20Info%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🔍 [**Perplexity**](https://perplexity.ai/search?q=How%20do%20I%20use%20the%20REST%20Countries%20Info%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🅒 [**Copilot**](https://copilot.microsoft.com/?q=How%20do%20I%20use%20the%20REST%20Countries%20Info%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)

***

### ❓ Frequently Asked Questions

#### 🧩 How does it work?

Pick a query mode, fill in the matching field, click Start, and the Actor pulls structured records straight from the public country reference catalog. No browser automation, no captchas, no setup.

#### 📏 How accurate is the data?

Country codes, capitals, and continents are stable and well-vetted. Population and area reflect the upstream community catalog and lag behind official statistical office figures by months or quarters. For high-stakes economic work, cross-check against a primary statistical source.

#### 🔁 How often is the dataset refreshed?

The community catalog is updated continuously. Every run of this Actor fetches the latest data so your dataset reflects current records as of run time.

#### 🗣️ How many languages and currencies does it cover?

The catalog tracks 184 spoken languages and 174 currencies across 250+ countries, territories, and dependencies.

#### 🤝 Does it include borders and neighbors?

Yes. Every country record includes a `borders` array of neighboring countries by ISO 3 code. Useful for routing, logistics, and trade-flow analysis.

#### ⚖️ Is this data legal to use?

The underlying catalog is published under a permissive open-data license. Review the downstream terms of your specific use case, but raw country reference data is generally public.

#### 💼 Can I use this data commercially?

Yes. The catalog is published under an open license that permits commercial use. You are responsible for complying with the license and with any downstream regulatory requirements in your own product.

#### 💳 Do I need a paid Apify plan to use this Actor?

No. The free Apify plan is enough for testing and small pulls (10 records per run). A paid plan lifts the limit and gives you access to scheduling, higher concurrency, and larger datasets.

#### 🔁 What happens if a run fails or gets interrupted?

Apify automatically retries transient errors. If a run still fails, inspect the log in the Runs tab, fix the input, and re-run. Partial datasets from failed runs are preserved so you never lose progress.

#### 🏳️ Does it include flags and map links?

Yes. Every record includes a hosted flag image URL plus Google Maps and OpenStreetMap deep links for the country.

#### 🆘 What if I need help?

Our support team is here to help. Contact us through the Apify platform or use the Tally form linked below.

***

### 🔌 Integrate with any app

REST Countries Info Scraper connects to any cloud service via [Apify integrations](https://apify.com/integrations):

- [**Make**](https://docs.apify.com/platform/integrations/make) - Automate multi-step workflows
- [**Zapier**](https://docs.apify.com/platform/integrations/zapier) - Connect with 5,000+ apps
- [**Slack**](https://docs.apify.com/platform/integrations/slack) - Get run notifications in your channels
- [**Airbyte**](https://docs.apify.com/platform/integrations/airbyte) - Pipe country data into your warehouse
- [**GitHub**](https://docs.apify.com/platform/integrations/github) - Trigger runs from commits and releases
- [**Google Drive**](https://docs.apify.com/platform/integrations/drive) - Export datasets straight to Sheets

You can also use webhooks to trigger downstream actions when a run finishes. Refresh country dropdowns in your product backend, or push updates into a CRM.

***

### 🔗 Recommended Actors

- [**✈️ OurAirports Scraper**](https://apify.com/parseforge/ourairports-scraper) - 85,000+ airports, heliports, and airfields worldwide
- [**🗺️ Nominatim OSM Scraper**](https://apify.com/parseforge/nominatim-osm-scraper) - Geocode addresses via OpenStreetMap
- [**📈 Indexmundi Scraper**](https://apify.com/parseforge/indexmundi-scraper) - Global demographic and economic indicators
- [**🌍 GBIF Biodiversity Scraper**](https://apify.com/parseforge/gbif-biodiversity-scraper) - Global biodiversity occurrence records
- [**🌐 OpenSky Flights Scraper**](https://apify.com/parseforge/opensky-flights-scraper) - Live air-traffic positions worldwide

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more reference-data scrapers.

***

**🆘 Need Help?** [**Open our contact form**](https://tally.so/r/BzdKgA) to request a new scraper, propose a custom data project, or report an issue.

***

> **⚠️ Disclaimer:** this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by REST Countries or any of its contributors. All trademarks mentioned are the property of their respective owners. Only publicly available open country reference data is collected.

# Actor input Schema

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## `mode` (type: `string`):

How to query the dataset.

## `nameQuery` (type: `string`):

Used when mode is 'Search by Name'. Full or partial country name (e.g. 'germany', 'united').

## `region` (type: `string`):

Used when mode is 'Filter by Region'.

## `language` (type: `string`):

Used when mode is 'Filter by Language'. Language name (e.g. 'spanish', 'french', 'arabic').

## `currencyCode` (type: `string`):

Used when mode is 'Filter by Currency Code'. ISO 4217 code (e.g. 'USD', 'EUR', 'JPY').

## `fields` (type: `array`):

Optional. Only include the selected fields. Leave empty to return the full record.

## Actor input object example

```json
{
  "maxItems": 10,
  "mode": "all"
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 10,
    "mode": "all"
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/restcountries-info-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "maxItems": 10,
    "mode": "all",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/restcountries-info-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 10,
  "mode": "all"
}' |
apify call parseforge/restcountries-info-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=parseforge/restcountries-info-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "REST Countries Info Scraper",
        "description": "Export 250+ countries with population, capital, area, currencies, languages, borders, demonyms, flags, region, subregion, and timezones. Query all, by name, region, language, currency, or independence status. Open dataset, no auth.",
        "version": "1.0",
        "x-build-id": "2CE1yoQlFYBVcpHrF"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~restcountries-info-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-restcountries-info-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/parseforge~restcountries-info-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-restcountries-info-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/parseforge~restcountries-info-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-restcountries-info-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
                    },
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "all",
                            "name",
                            "region",
                            "lang",
                            "currency",
                            "independent"
                        ],
                        "type": "string",
                        "description": "How to query the dataset."
                    },
                    "nameQuery": {
                        "title": "Country Name",
                        "type": "string",
                        "description": "Used when mode is 'Search by Name'. Full or partial country name (e.g. 'germany', 'united')."
                    },
                    "region": {
                        "title": "Region",
                        "enum": [
                            "africa",
                            "americas",
                            "asia",
                            "europe",
                            "oceania",
                            "antarctic"
                        ],
                        "type": "string",
                        "description": "Used when mode is 'Filter by Region'."
                    },
                    "language": {
                        "title": "Language",
                        "type": "string",
                        "description": "Used when mode is 'Filter by Language'. Language name (e.g. 'spanish', 'french', 'arabic')."
                    },
                    "currencyCode": {
                        "title": "Currency Code",
                        "type": "string",
                        "description": "Used when mode is 'Filter by Currency Code'. ISO 4217 code (e.g. 'USD', 'EUR', 'JPY')."
                    },
                    "fields": {
                        "title": "Fields Projection",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Optional. Only include the selected fields. Leave empty to return the full record.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "name",
                                "tld",
                                "cca2",
                                "cca3",
                                "ccn3",
                                "cioc",
                                "independent",
                                "status",
                                "unMember",
                                "currencies",
                                "idd",
                                "capital",
                                "altSpellings",
                                "region",
                                "subregion",
                                "languages",
                                "translations",
                                "latlng",
                                "landlocked",
                                "borders",
                                "area",
                                "demonyms",
                                "flag",
                                "maps",
                                "population",
                                "gini",
                                "fifa",
                                "car",
                                "timezones",
                                "continents",
                                "flags",
                                "coatOfArms",
                                "startOfWeek",
                                "capitalInfo",
                                "postalCode"
                            ]
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
