# Currency Converter & Exchange Rates for AI Agents (`haketa/currency-converter`) Actor

Real-time currency, FX & crypto conversion tool for AI agents & LLMs. Convert between 30+ fiat currencies and thousands of cryptocurrencies with live and historical rates. MCP-callable real-time grounding for finance & travel agents.

- **URL**: https://apify.com/haketa/currency-converter.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** AI, Agents, MCP servers
- **Stats:** 1 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## Currency Converter & Exchange Rates — for AI Agents

A **real-time currency, FX and crypto conversion tool built for AI agents, LLMs and RAG pipelines.** Convert between **30+ fiat currencies and thousands of cryptocurrencies** with live and historical rates — the kind of data an LLM can't produce from its training set. Ideal as a **tool-call / MCP grounding source** for finance assistants, travel agents and chatbots.

Small, structured output — one clean record per conversion, perfect for an LLM context or an agent tool response. Works from the Apify Console, on a schedule, or via API. Callable by **Claude, ChatGPT, LangChain, CrewAI, LlamaIndex and any MCP client** (every Apify actor is MCP-callable via `mcp.apify.com`).

> **💱 Live rates, not stale training data.** "How much is 150 EUR in USD? What's 1 BTC in EUR right now?" — the actor answers with current, sourced rates.

---

### 🤖 Why this is an AI-agent tool

LLMs don't know today's exchange rate. Agents fix that with a **tool call** to a live source. Currency conversion is one of the most frequently called agent tools:

- ✅ **Live + historical** — latest ECB fiat rates and any past date; real-time crypto
- ✅ **Fiat + crypto in one tool** — 30+ currencies and thousands of coins
- ✅ **Tool-shaped** — from + to + amount in, a clean converted number out
- ✅ **MCP-ready** — call it from any agent framework or MCP client

---

### 📋 What this actor does

Give it a source, one or more targets and an amount:

- ✅ **Fiat ↔ fiat** — e.g. EUR → USD, GBP, JPY (ECB reference rates)
- ✅ **Crypto ↔ fiat** — e.g. BTC → USD, ETH → EUR
- ✅ **Fiat ↔ crypto** — e.g. USD → BTC
- ✅ **Crypto ↔ crypto** — e.g. BTC → ETH
- ✅ **Historical fiat rates** — any date back to 1999
- ✅ **24-hour change** for crypto

---

### 🚀 Quick start

1. Enter a **From** currency (e.g. `EUR`, `USD`, `BTC`).
2. Add one or more **To** currencies (e.g. `USD`, `GBP`, `BTC`).
3. Set an **Amount** (default 1) and optionally a historical **Date**.
4. Click **Start** and read the structured result from **Storage → Dataset**.

---

### ⚙️ Input

| Field | Type | Description |
| --- | --- | --- |
| **From currency** | string | Source fiat code (EUR, USD, GBP, TRY, JPY) or crypto (BTC, ETH, SOL, or a CoinGecko id like `bitcoin`). |
| **To currencies** | array | One or more targets, e.g. `["USD"]`, `["USD", "GBP", "BTC"]`. |
| **Amount** | integer | Amount of the source to convert. Default 1. |
| **Historical date** | string | Optional `YYYY-MM-DD` for a historical fiat rate. Latest if empty. |
| **Proxy** | object | Optional — the rate APIs have no anti-bot. |

#### Example 1 — 150 EUR to several currencies

```json
{ "from": "EUR", "to": ["USD", "GBP", "JPY"], "amount": 150 }
````

#### Example 2 — 1 BTC to USD and EUR

```json
{ "from": "BTC", "to": ["USD", "EUR"], "amount": 1 }
```

#### Example 3 — Historical USD → EUR

```json
{ "from": "USD", "to": ["EUR"], "amount": 100, "date": "2024-01-15" }
```

***

### 📦 Output

```json
{
  "from": "EUR",
  "to": "USD",
  "amount": "150",
  "rate": "1.1448",
  "result": "171.72",
  "fromType": "fiat",
  "toType": "fiat",
  "change24h": null,
  "date": "2026-07-04",
  "source": "frankfurter",
  "scrapedAt": "2026-07-04T00:00:00.000Z"
}
```

For crypto, `change24h` holds the 24-hour percentage change:

```json
{ "from": "BTC", "to": "USD", "amount": "1", "rate": "62466.00", "result": "62466.00", "toType": "fiat", "change24h": "1.05", "source": "coingecko" }
```

#### Output fields

| Field | Description |
| --- | --- |
| `from` / `to` | Source and target currency/crypto codes. |
| `amount` / `rate` / `result` | Amount, exchange rate, and converted amount (amount × rate). |
| `fromType` / `toType` | `fiat` or `crypto`. |
| `change24h` | 24-hour percentage change (crypto). |
| `date` | Date of the rate used. |
| `source` | `frankfurter` (fiat, ECB) or `coingecko` (crypto). |

***

### 💱 Supported currencies

**Fiat (30+, ECB):** USD, EUR, GBP, JPY, CHF, AUD, CAD, CNY, HKD, SGD, INR, TRY, BRL, MXN, ZAR, PLN, SEK, NOK, DKK, KRW, IDR, PHP, THB, MYR, and more.

**Crypto:** BTC, ETH, USDT, BNB, SOL, XRP, USDC, ADA, DOGE, TRX, TON, DOT, MATIC, LTC, AVAX, LINK, and thousands more (use the symbol or a CoinGecko id).

***

### 🔌 AI & integrations

- **MCP:** every Apify actor is callable from `mcp.apify.com` — add this as a tool in Claude Desktop, VS Code or any MCP client.
- **Frameworks:** LangChain (`ApifyActorsTool`), LlamaIndex, CrewAI, Vercel AI SDK, n8n.
- **API:** run and fetch results with the Apify API or JS / Python clients.

***

### ❓ FAQ

**Do I need an API key?**
No — both rate sources are keyless.

**How fresh are the rates?**
Fiat rates are ECB reference rates (updated every working day); crypto is real-time.

**Which historical range is supported?**
Fiat historical rates go back to 1999. Historical crypto uses the latest price.

**Can an AI agent call this directly?**
Yes — it's designed as a tool-call source and is MCP-callable via Apify.

***

### ⚖️ Legal & responsible use

This actor uses public exchange-rate APIs (European Central Bank via Frankfurter, and CoinGecko). Respect their terms and rate limits. Rates are for information only, not financial advice.

***

### 🛟 Support

Need an extra currency or hit an issue? Open a ticket from the actor's **Issues** tab.

Happy converting! 💱

# Actor input Schema

## `from` (type: `string`):

Source currency or crypto to convert from. Fiat code (EUR, USD, GBP, TRY, JPY) or crypto (BTC, ETH, SOL, or a CoinGecko id like bitcoin).

## `to` (type: `array`):

One or more target currencies/cryptos to convert to, e.g. \["USD"], \["USD", "GBP", "BTC"].

## `amount` (type: `integer`):

Amount of the source currency to convert. Default 1.

## `date` (type: `string`):

Optional date (YYYY-MM-DD) for a historical fiat rate, e.g. 2024-01-15. Leave empty for the latest rate.

## `proxyConfiguration` (type: `object`):

Apify Proxy settings. The rate APIs are keyless with no anti-bot, so a proxy is OFF by default. Enable it only for very high-volume crypto lookups (CoinGecko rate-limits shared IPs).

## Actor input object example

```json
{
  "from": "EUR",
  "to": [
    "USD"
  ],
  "amount": 1,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `from` (type: `string`):

Source currency/crypto code

## `to` (type: `string`):

Target currency/crypto code

## `amount` (type: `string`):

Amount converted

## `rate` (type: `string`):

Exchange rate (1 from = rate to)

## `result` (type: `string`):

Converted amount (amount × rate)

## `fromType` (type: `string`):

fiat or crypto

## `toType` (type: `string`):

fiat or crypto

## `change24h` (type: `string`):

24-hour price change for crypto

## `date` (type: `string`):

Date of the rate used

## `source` (type: `string`):

Data source (frankfurter / coingecko)

## `scrapedAt` (type: `string`):

Extraction timestamp

# 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 = {
    "from": "EUR",
    "to": [
        "USD"
    ],
    "amount": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/currency-converter").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 = {
    "from": "EUR",
    "to": ["USD"],
    "amount": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/currency-converter").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 '{
  "from": "EUR",
  "to": [
    "USD"
  ],
  "amount": 1
}' |
apify call haketa/currency-converter --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Currency Converter & Exchange Rates for AI Agents",
        "description": "Real-time currency, FX & crypto conversion tool for AI agents & LLMs. Convert between 30+ fiat currencies and thousands of cryptocurrencies with live and historical rates. MCP-callable real-time grounding for finance & travel agents.",
        "version": "0.1",
        "x-build-id": "CXQYxg6IKchLHzTUU"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/haketa~currency-converter/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-haketa-currency-converter",
                "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/haketa~currency-converter/runs": {
            "post": {
                "operationId": "runs-sync-haketa-currency-converter",
                "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/haketa~currency-converter/run-sync": {
            "post": {
                "operationId": "run-sync-haketa-currency-converter",
                "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": {
                    "from": {
                        "title": "From currency",
                        "type": "string",
                        "description": "Source currency or crypto to convert from. Fiat code (EUR, USD, GBP, TRY, JPY) or crypto (BTC, ETH, SOL, or a CoinGecko id like bitcoin)."
                    },
                    "to": {
                        "title": "To currencies",
                        "type": "array",
                        "description": "One or more target currencies/cryptos to convert to, e.g. [\"USD\"], [\"USD\", \"GBP\", \"BTC\"].",
                        "items": {
                            "type": "string"
                        }
                    },
                    "amount": {
                        "title": "Amount",
                        "type": "integer",
                        "description": "Amount of the source currency to convert. Default 1.",
                        "default": 1
                    },
                    "date": {
                        "title": "Historical date (optional)",
                        "type": "string",
                        "description": "Optional date (YYYY-MM-DD) for a historical fiat rate, e.g. 2024-01-15. Leave empty for the latest rate."
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify Proxy settings. The rate APIs are keyless with no anti-bot, so a proxy is OFF by default. Enable it only for very high-volume crypto lookups (CoinGecko rate-limits shared IPs).",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
