# XE.com Currency Conversion & Exchange Rate Scraper (`vexaloom-labs/xe-com-currency-conversion-and-exchange-rate`) Actor

Convert an amount between currencies, pull a full exchange-rate table for a base currency on any date since the late 1990s, or look up a currency's issuing country, symbol and central bank, for 180+ fiat and crypto currencies.

- **URL**: https://apify.com/vexaloom-labs/xe-com-currency-conversion-and-exchange-rate.md
- **Developed by:** [vexaloom-labs](https://apify.com/vexaloom-labs) (community)
- **Categories:** Automation, Developer tools, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 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/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

## XE.com Currency Conversion & Exchange Rate Scraper

Convert currency amounts, pull live or historical exchange-rate tables, and look up currency metadata for 180+ world and crypto currencies — powered by xe.com's public currency data. No login, API key, cookies, or proxy required.

### What this actor does

- **Three modes:** `convert`, `ratesTable`, `currencyInfo`
- **Live conversion:** convert any amount between any two of 180+ currencies
- **Historical conversion:** convert on a past date (or a batch of dates) using XE's daily historical rate table
- **Full rate tables:** every currency's rate against a base currency, live or on a historical date
- **Historical rates:** daily-close exchange rates back to ~1995
- **Currency metadata:** full name, plural name, crypto flag, obsolete flag, buy/sell availability
- **Crypto support:** BTC, ETH, LTC, XRP, and more, alongside fiat currencies
- **Empty fields are omitted**

### Output per record

#### `mode=convert` (conversion record)

- `fromCurrency`, `fromCurrencyName`, `toCurrency`, `toCurrencyName`
- `amount`, `convertedAmount`, `exchangeRate`, `inverseRate`
- `timestamp` — when the underlying rate was captured
- `date` (historical conversions only) — the daily rate date used
- `rate7dHigh`, `rate7dLow`, `rate7dAverage`, `rate7dVolatilityPercent`, `rate7dStandardDeviation`, `rate7dDataPoints`, `rate7dHighTimestamp`, `rate7dLowTimestamp` — 7-day rate history stats for this pair (live conversions only)
- `rate30dHigh`, `rate30dLow`, `rate30dAverage`, `rate30dVolatilityPercent`, `rate30dStandardDeviation`, `rate30dDataPoints`, `rate30dHighTimestamp`, `rate30dLowTimestamp` — 30-day rate history stats
- `rate90dHigh`, `rate90dLow`, `rate90dAverage`, `rate90dVolatilityPercent`, `rate90dStandardDeviation`, `rate90dDataPoints`, `rate90dHighTimestamp`, `rate90dLowTimestamp` — 90-day rate history stats
- `sourceUrl` — the xe.com converter page for a live pair, or the historical rate table for a dated conversion
- `recordType: "conversion"`, `scrapedAt`

#### `mode=ratesTable` (one record per target currency)

- `baseCurrency`, `baseCurrencyName`, `targetCurrency`, `targetCurrencyName`
- `rate`, `inverseRate`
- `isCrypto`, `isObsolete` (only present when true)
- `date` (historical lookups only), `timestamp`
- `liveTrend`, `liveRateChangeValue`, `liveRateChangePercent` — today's live up/down movement, only for live (non-historical) rows and only for the handful of major pairs xe.com tracks on its live ticker (e.g. EUR/USD, USD/JPY, GBP/USD, USD/CHF, USD/CAD, EUR/JPY, AUD/USD, GBP/EUR)
- `centralBankInterestRatePercent` — the target currency's current central-bank benchmark interest rate, only for live (non-historical) rows and only for the handful of major currencies xe.com publishes this for (USD, EUR, GBP, JPY, CHF, CAD, AUD, NZD)
- `sourceUrl` — xe.com's currency encyclopedia page for the target currency
- `recordType: "rate"`, `scrapedAt`

#### `mode=currencyInfo` (currency metadata record)

- `currencyCode`, `name`, `namePlural`
- `isCrypto`, `isObsolete`, `isSellable`, `isBuyable`
- `sourceUrl` — xe.com's currency encyclopedia page, or its converter page as a fallback (only ever a link that's been checked to actually resolve; omitted entirely for the handful of currencies XE no longer publishes any page for, e.g. sanctioned/discontinued ones)
- `country` — the country/region primarily associated with this currency
- `currencySymbol`, `minorUnitSymbol`, `minorUnitLabel` — e.g. `$`, `¢`, `1/100 = cent`
- `centralBankName`, `centralBankUrl` — the issuing central bank
- `centralBankRatePercent`, `inflationRatePercent` — current benchmark interest rate and inflation rate, as published by xe.com
- `nicknames` — informal names for the currency (e.g. "buck", "greenback")
- `usedInCountries` — countries/territories that use this currency
- `coinDenominations`, `banknoteDenominations` — coins/banknotes in circulation, formatted with the currency's own symbol (e.g. `["1¢", "5¢", ..., "50¢ (rare)"]`, `["$1", "$5", ..., "$100"]`); omitted for currencies with no physical coins/notes (e.g. crypto)
- `shortDescription` — a short one-line summary xe.com publishes for a subset of currencies (mostly crypto, e.g. "Ethereum is a decentralized open-source blockchain system..."); omitted when xe.com doesn't publish one
- `description` — xe.com's currency-encyclopedia write-up (history, usage, notable facts), plain text
- `isTradable`
- `replacedByCurrency`, `replacedByCurrencyName` — for retired currencies, the successor currency xe.com itself names (e.g. `DEM` -> `EUR`), when published
- `recordType: "currencyInfo"`, `scrapedAt`

The extended fields (`country` through `isTradable`) come from xe.com's currency-encyclopedia page and are only included when `includeExtendedInfo: true` (default) and xe.com actually publishes that page/field for the currency.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `convert` | `convert` / `ratesTable` / `currencyInfo` |
| `amount` | number | `1` | Amount to convert (mode=convert) |
| `fromCurrency` | string | `USD` | Source currency (mode=convert) / base currency (mode=ratesTable) |
| `toCurrency` | string | `EUR` | Target currency (mode=convert) |
| `toCurrencies` | array | `[]` | Convert into multiple currencies at once (mode=convert), one record per currency from a single live-rates snapshot. Empty = use only `toCurrency`. Unknown codes are skipped with a status message |
| `date` | string | – | Historical date `YYYY-MM-DD`. In `convert`, converts using that day's historical rate table; in `ratesTable`, returns that day's full table. Leave empty for live/today. Ignored when `dates` is set |
| `dates` | array | `[]` | Batch of historical dates `YYYY-MM-DD` (up to 20), fetched in one run to build a trend series. `convert` emits one conversion per date and target; `ratesTable` emits each date's table. Overrides `date` when non-empty |
| `targetCurrencies` | array | `[]` | Restrict `ratesTable` / `currencyInfo` output to these currency codes. Empty = all |
| `sortBy` | string | `currencyCodeAsc` | Row order for `ratesTable`: `currencyCodeAsc` / `rateAsc` / `rateDesc` |
| `includeCryptoCurrencies` | boolean | `true` | Include crypto assets in `ratesTable` / `currencyInfo` |
| `includeObsoleteCurrencies` | boolean | `false` | Include retired currencies (pre-Euro DEM, FRF, ...) |
| `includeExtendedInfo` | boolean | `true` | `currencyInfo` only: fetch country, symbol, central bank, inflation rate, nicknames, used-in countries and description from xe.com's currency encyclopedia (one extra request per currency; disable for faster runs) |
| `includeRateStats` | boolean | `true` | `convert` only (live, not historical): attach XE's rolling 7/30/90-day high/low/average/volatility stats per pair (one small request per target; disable for the fastest multi-currency conversions) |
| `maxItems` | int | `50` | Hard cap on emitted records (1–10000). Raise it when batching dates or converting into many currencies |

#### Example: convert an amount

```json
{
  "mode": "convert",
  "amount": 500,
  "fromCurrency": "USD",
  "toCurrency": "JPY"
}
```

#### Example: convert an amount into several currencies at once

```json
{
  "mode": "convert",
  "amount": 500,
  "fromCurrency": "USD",
  "toCurrencies": ["EUR", "JPY", "GBP"]
}
```

#### Example: convert on a historical date

```json
{
  "mode": "convert",
  "amount": 500,
  "fromCurrency": "USD",
  "toCurrencies": ["EUR", "JPY"],
  "dates": ["2020-06-15", "2024-01-02"]
}
```

#### Example: today's full rate table for EUR

```json
{
  "mode": "ratesTable",
  "fromCurrency": "EUR",
  "sortBy": "rateAsc",
  "maxItems": 50
}
```

#### Example: historical rates on a specific date, restricted to a few currencies

```json
{
  "mode": "ratesTable",
  "fromCurrency": "GBP",
  "date": "2020-06-15",
  "targetCurrencies": ["USD", "EUR", "JPY"]
}
```

#### Example: currency metadata lookup

```json
{
  "mode": "currencyInfo",
  "targetCurrencies": ["USD", "BTC", "INR"]
}
```

### Use cases

- **Finance apps** — build a live currency converter or price checker
- **E-commerce** — display localized prices across storefronts
- **Accounting / invoicing** — convert transaction amounts for reporting
- **Historical analysis** — pull daily rate history for a currency pair over time
- **Crypto dashboards** — track crypto-to-fiat rates alongside traditional currencies
- **Data enrichment** — attach currency names, obsolete/crypto flags to a dataset of currency codes

### Limitations

- **Mid-market rates only.** XE's public pages quote the mid-market rate. They are not the buy/sell rate a bank or transfer provider charges, and this actor does not scrape provider quotes.
- **No intraday tick/chart history.** XE's public chart endpoint returns inconsistent series (a bogus first point and mixed pair orientation in spot checks), so it is not shipped. Historical output is XE's daily rate table, which goes back to the mid-1990s and thins out for older dates (~44 currencies in early 1998, 140+ from the early 2000s).
- **No upstream pagination.** XE returns a full rate table (~190 rows) in one response; there is no page cursor to follow. Use `maxItems` and `targetCurrencies` to control volume. Batch `dates` are capped at 20 per run (20 extra requests).
- **Coverage follows XE's own pages.** A handful of sanctioned/discontinued currencies (e.g. RUB, IRR, KPW) still have metadata but no live rate row or encyclopedia page, so their rate/sourceUrl/extended fields are omitted rather than fabricated.
- **Statistics are live-only.** The 7/30/90-day blocks reflect XE's current rolling windows and are never attached to historical conversions.
- **English/XE only.** No other locale, bank, or ECB feed is mixed in; every number comes from xe.com.

### FAQ

**Where does the data come from?**  [xe.com](https://www.xe.com), one of the most widely used currency-conversion services online. Rates are sourced from XE's mid-market feed and updated throughout the trading day; the daily rate table is a once-per-day close snapshot.

**How far back does historical data go?**  XE's daily rate table reliably covers 1998 onward, with a growing number of currencies the more recent the date (e.g. ~44 currencies in early 1998, 140+ from the early 2000s on). Some dates between 1995-1997 may return no data at all for a given base currency, in which case the actor returns a clear "no rate table" message rather than partial/fabricated data. Today's date and future dates are always rejected with a clear error.

**Why do some currencies show `isObsolete: true`?**  These are retired currencies (e.g. the German Deutsche Mark, French Franc — replaced by the Euro). They're excluded from `ratesTable` / `currencyInfo` by default; set `includeObsoleteCurrencies: true` to include them. Note that XE's daily rate table itself often doesn't carry rows for these legacy currencies even on dates before they were retired — in that case `currencyInfo` (which always has metadata) is the more reliable mode for looking them up. When XE publishes the successor currency for a retired one, `currencyInfo` also includes `replacedByCurrency` / `replacedByCurrencyName` (e.g. `DEM` -> `replacedByCurrency: "EUR"`).

**What currency codes are supported?**  180+ active ISO currency codes plus major cryptocurrencies (BTC, ETH, LTC, XRP, ADA, DOGE, and more). Pick from the dropdown in each currency field, or check the `currencyInfo` mode output for the full list.

**Is `mode=convert` real-time?**  With no date/dates it reflects XE's live quoted mid-market rate at request time, refreshed frequently throughout the day. Set `date` or `dates` to convert with XE's historical daily rate table instead; historical conversions omit the live 7/30/90-day statistics and carry the rate date.

**What happens to unknown currency codes in a multi-currency conversion?**  Valid codes are still converted; unknown ones are skipped and named in the run's status message, so one typo no longer discards the whole batch.

**Can I get rates for a currency pair that isn't USD-based?**  Yes — `mode=convert` computes the cross-rate between any two supported currencies directly (e.g. GBP → JPY), not just versus USD.

**Do I need a proxy or API key?**  No. This actor reads xe.com's public pages directly; no login, cookies, or paid API key needed.

**What do the `rate7dHigh`/`rate30dHigh`/`rate90dHigh` etc. fields mean?**  For `mode=convert`, XE also publishes rolling 7/30/90-day statistics for the requested pair: the highest and lowest rate seen (plus the exact UTC timestamp each occurred), the average rate, the standard deviation, the number of daily data points behind the stat, and the volatility (the day-to-day fluctuation, as a percentage) over that window. These are only included when `fromCurrency` and `toCurrency` differ, and each sub-field is only present when XE actually returns it for that window.

**What's in the extended `currencyInfo` fields (country, central bank, nicknames, ...)?**  These come straight from xe.com's public currency-encyclopedia page for that currency — the same page a visitor sees at `xe.com/currency/<code>-<name>/`. Every link the actor emits is checked live before being returned; for the small number of currencies xe.com no longer publishes any page for (currently a handful of sanctioned/discontinued currencies such as the Russian Ruble or North Korean Won), `sourceUrl` and the extended fields are simply omitted rather than pointing at a dead link.

# Actor input Schema

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

What to fetch.

## `amount` (type: `number`):

Amount of `fromCurrency` to convert.

## `fromCurrency` (type: `string`):

Source currency (mode=convert) or base currency for the rates table (mode=ratesTable).

## `toCurrency` (type: `string`):

Target currency to convert into.

## `toCurrencies` (type: `array`):

Convert the amount into multiple currencies at once instead of just 'To currency' (mode=convert). Emits one conversion record per currency, computed from the same live rates snapshot. Leave empty to use only the single 'To currency' field.

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

YYYY-MM-DD. Leave empty for live/today's rates. In mode=convert, converts the amount using XE's historical daily rate table for that date; in mode=ratesTable, fetches that day's full table. XE has daily rate history back to the mid-1990s; today's date and future dates are rejected. Ignored when 'Historical dates (batch)' is set.

## `dates` (type: `array`):

Fetch multiple historical dates in one run (e.g. to build a trend series), instead of a single 'Historical date'. Each entry must be YYYY-MM-DD; invalid or duplicate entries are dropped. Overrides 'Historical date' when non-empty. Up to 20 dates per run. mode=convert emits one conversion per date and target; mode=ratesTable emits each date's full table.

## `targetCurrencies` (type: `array`):

Restrict mode=ratesTable / mode=currencyInfo output to these currency codes. Empty = all currencies.

## `sortBy` (type: `string`):

How to order rows in the rates table.

## `includeCryptoCurrencies` (type: `boolean`):

Include crypto assets (BTC, ETH, ...) in mode=ratesTable / mode=currencyInfo output.

## `includeObsoleteCurrencies` (type: `boolean`):

Include retired currencies (e.g. pre-Euro DEM, FRF) in mode=ratesTable / mode=currencyInfo output. Useful for historical dates.

## `includeExtendedInfo` (type: `boolean`):

Fetch additional real-world details from xe.com's currency encyclopedia for each currency: country, symbol, central bank name/rate, inflation rate, nicknames, countries that use it, and a description. Adds one extra request per currency, so disable for faster runs if you only need the basic code/name/flags.

## `includeRateStats` (type: `boolean`):

Attach XE's rolling 7-, 30- and 90-day high/low/average/volatility statistics for each converted pair. Adds one small request per target currency, so disable for the fastest multi-currency conversions. Historical conversions (date/dates set) never include these live statistics.

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

Hard cap on emitted records. The full rate table for one date is up to ~190 rows, so raise this when batching dates or converting into many currencies.

## Actor input object example

```json
{
  "mode": "convert",
  "amount": 1,
  "fromCurrency": "USD",
  "toCurrency": "EUR",
  "toCurrencies": [],
  "dates": [],
  "targetCurrencies": [],
  "sortBy": "currencyCodeAsc",
  "includeCryptoCurrencies": true,
  "includeObsoleteCurrencies": false,
  "includeExtendedInfo": true,
  "includeRateStats": true,
  "maxItems": 50
}
```

# Actor output Schema

## `currencyData` (type: `string`):

Dataset containing all scraped conversions / rates / currency metadata.

# 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 = {
    "mode": "convert",
    "amount": 1,
    "fromCurrency": "USD",
    "toCurrency": "EUR",
    "toCurrencies": [],
    "dates": [],
    "targetCurrencies": [],
    "sortBy": "currencyCodeAsc",
    "includeCryptoCurrencies": true,
    "includeObsoleteCurrencies": false,
    "includeExtendedInfo": true,
    "includeRateStats": true,
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("vexaloom-labs/xe-com-currency-conversion-and-exchange-rate").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 = {
    "mode": "convert",
    "amount": 1,
    "fromCurrency": "USD",
    "toCurrency": "EUR",
    "toCurrencies": [],
    "dates": [],
    "targetCurrencies": [],
    "sortBy": "currencyCodeAsc",
    "includeCryptoCurrencies": True,
    "includeObsoleteCurrencies": False,
    "includeExtendedInfo": True,
    "includeRateStats": True,
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("vexaloom-labs/xe-com-currency-conversion-and-exchange-rate").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 '{
  "mode": "convert",
  "amount": 1,
  "fromCurrency": "USD",
  "toCurrency": "EUR",
  "toCurrencies": [],
  "dates": [],
  "targetCurrencies": [],
  "sortBy": "currencyCodeAsc",
  "includeCryptoCurrencies": true,
  "includeObsoleteCurrencies": false,
  "includeExtendedInfo": true,
  "includeRateStats": true,
  "maxItems": 50
}' |
apify call vexaloom-labs/xe-com-currency-conversion-and-exchange-rate --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vexaloom-labs/xe-com-currency-conversion-and-exchange-rate"
        }
    }
}
```

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/J5FLTs6Nvndu1HO4h/builds/mmnZNvc6t10DqR5Bq/openapi.json
