# Twelve Data Forex Pairs Scraper (`acquistion-automation/twelve-data-forex-pairs-scraper`) Actor

Collects forex pairs from the Twelve Data API by country and returns each one as a flat row with symbol, currency group, base currency, and quote currency.

- **URL**: https://apify.com/acquistion-automation/twelve-data-forex-pairs-scraper.md
- **Developed by:** [Acquisition Automation Co.](https://apify.com/acquistion-automation) (community)
- **Categories:** Business, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.62 / 1,000 results

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

[![Acquisition Automation](https://api.apify.com/v2/key-value-stores/AOdPHdOpeDpzEPS5f/records/banner.jpg)](https://apify.com/acquistion-automation)

### Twelve Data Forex Pairs Scraper

**Scrape forex pairs from Twelve Data by country, up to a million per run.** Every pair comes with its symbol, base and quote currency, and currency group. No login or API key required for the demo endpoint. Export to CSV, JSON, Excel, or XML.

Twelve Data's official API needs a paid plan for full access and rate-limits you. This reads the public forex pairs endpoint directly, filtered by country code, and returns each match in one fixed schema. You get the complete list of available forex pairs without writing a single API call.

| Who uses it | What they scrape Twelve Data for |
|---|---|
| Forex traders | Build a watchlist of all available pairs for a specific country |
| Quantitative analysts | Seed a backtesting database with the universe of tradeable forex symbols |
| Fintech developers | Populate a currency pair picker inside a trading application |
| Data journalists | Audit which minor and exotic pairs a data provider covers |

### What it does

This Actor collects forex pairs from the Twelve Data API by country and returns each one as a flat row with symbol, currency group, base currency, and quote currency.

- 🌍 **Country filter:** pull only pairs relevant to a single market, or leave empty for the global list.
- 📊 **Structured output:** every row is a flat object with symbol, currency\_group, currency\_base, and currency\_quote.
- ⚡ **Direct API read:** no browser, no headless rendering, a fast HTTP call to the verified endpoint.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with Twelve Data data

**🇺🇸 Build a US forex watchlist.**

A retail trader sets the country filter to US and exports all USD-cross pairs into a trading journal.

**📈 Seed a backtesting universe.**

A quant researcher pulls the full global list of pairs and cross-references it with historical price data to find new trading opportunities.

**💱 Populate a currency picker.**

A fintech startup uses the Actor to load every available pair into their app's dropdown so users can select any supported market.

**🔍 Audit exotic pair coverage.**

A data journalist scrapes all pairs and compares the list against other providers to see which exotic currencies are tracked.

### Why choose this scraper

| | What you get |
|---|---|
| **No API coding** | The Actor handles the HTTP request and pagination for you |
| **Clean schema** | Every pair arrives with the same four fields, ready for a database or spreadsheet |
| **Free tier ready** | Works with the demo API key so you can test without a Twelve Data account |
| **Bulk export** | Save results as CSV, JSON, Excel, or XML in one click |

### What a Twelve Data record looks like

Every record returns as one flat JSON row. Here is a real one from a run:

```json
{
 "symbol": "AED/ARS",
 "currency_group": "Exotic-Cross",
 "currency_base": "UAE Dirham",
 "currency_quote": "Argentinian Peso"
}
```

Every value above comes from a real run. A field a record does not have comes back as `null`.

### Configure the run

Drive the Actor with a country code and a max items limit, and the filter runs before data reaches your dataset so you only pay for the rows you keep. The Input tab lists every parameter.

A first run with the defaults:

```json
{
 "maxItems": 10,
 "country": "US"
}
```

A larger pull:

```json
{
 "maxItems": 200,
 "country": "US"
}
```

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up).
2. Open the [Twelve Data Forex Pairs Scraper](https://apify.com/acquistion-automation/twelve-data-forex-pairs-scraper).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to Twelve Data through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=acquistion-automation/twelve-data-forex-pairs-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 country code. It must be a valid ISO 3166-1 alpha-2 code like US or GB. If the code is valid but still returns nothing, that country may not have any forex pairs listed by Twelve Data. Try leaving the country field empty to see the full list.

**Why did my run fail with an HTTP error?**

The Twelve Data demo endpoint may be temporarily unavailable or rate-limited. Wait a few minutes and retry. If the error persists, check the Apify platform status and Twelve Data's service status page.

**I only got 10 items but I am a paid Apify user.**

The maxItems input field defaults to 10. Increase it to a higher number, up to 1,000,000, and rerun the Actor.

**The output is missing a field I expected.**

This Actor returns only the fields provided by the Twelve Data forex pairs endpoint: symbol, currency\_group, currency\_base, and currency\_quote. If you need additional fields like exchange name or timezone, you will need a different Twelve Data API endpoint.

### FAQ

| Question | Answer |
|---|---|
| Do I need a Twelve Data API key? | No. The Actor uses the public demo endpoint, which returns data without authentication. You can upgrade to a paid Twelve Data plan later if you need higher rate limits, but the Actor itself does not require a key. |
| What countries can I filter by? | You can pass any ISO 3166-1 alpha-2 country code, such as US, GB, JP, or CH. Leave the country field empty to receive all available forex pairs across every country. |
| How many pairs can I get in one run? | Free Apify users are limited to 10 items. Paid Apify users can set maxItems up to 1,000,000, which is more than the total number of pairs Twelve Data publishes. |
| What fields does each row contain? | Every row includes the symbol, currency\_group, currency\_base, and currency\_quote. The exact field list is shown in the sample output on the Actor's page. |
| Can I get historical forex data with this Actor? | No. This Actor only returns the current list of available forex pairs. For historical price data you would need a different Twelve Data endpoint or a dedicated historical data scraper. |
| Does this Actor respect rate limits? | Yes. The Actor makes a single API call per run and respects the server's response headers. If you run it too frequently you may hit Twelve Data's demo rate limit, but the Actor will surface the error clearly. |
| Can I schedule this Actor to run daily? | Yes. You can set up an Apify schedule to run the Actor every day and receive the latest forex pair list automatically. |
| What output formats are supported? | You can export your dataset as CSV, JSON, Excel, or XML directly from the Apify console. |

### Related actors

Browse the full [Acquisition Automation collection](https://apify.com/acquistion-automation) for more scrapers.

🆘 **Need help?** Open an issue in the Issues tab of this Actor with your run ID, your input, and what you expected.

### Pricing

This Actor uses **pay-per-result** pricing: **$0.004 per result** collected. You are billed only for the results you receive, so a run that returns nothing costs nothing.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Twelve Data Pte. Ltd. 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.

# Actor input Schema

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

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

## `country` (type: `string`):

Filter forex pairs by country code (e.g., US, GB, JP). Leave empty for all countries.

## Actor input object example

```json
{
  "maxItems": 10,
  "country": "US"
}
```

# Actor output Schema

## `results` (type: `string`):

Complete dataset of all scraped records.

# 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,
    "country": "US"
};

// Run the Actor and wait for it to finish
const run = await client.actor("acquistion-automation/twelve-data-forex-pairs-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,
    "country": "US",
}

# Run the Actor and wait for it to finish
run = client.actor("acquistion-automation/twelve-data-forex-pairs-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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,
  "country": "US"
}' |
apify call acquistion-automation/twelve-data-forex-pairs-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,acquistion-automation/twelve-data-forex-pairs-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/uCEtwRA4Lm7y46Rsc/builds/yTo7n8cSkPxixlzbg/openapi.json
