# Historical Currency Converter for Invoices & Accounting (`turboextract/invoice-currency-converter`) Actor

Convert thousands of invoice, expense and transaction amounts at the official European Central Bank rate for each date. Upload a CSV or JSON, get audit-ready converted amounts. Built for accountants, bookkeepers, finance ops and e-commerce sellers.

- **URL**: https://apify.com/turboextract/invoice-currency-converter.md
- **Developed by:** [Moses Ndambuki](https://apify.com/turboextract) (community)
- **Categories:** Business, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 amount converted or rate delivereds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Historical Currency Converter for Invoices & Accounting

**Convert thousands of invoice, expense and transaction amounts at the official European Central Bank (ECB) reference rate for each date.** Paste a JSON list or point to a CSV, and get back audit-ready converted amounts with the exact rate and rate date used.

Built for accountants, bookkeepers, finance ops, VAT filers, marketplace sellers and anyone reconciling multi-currency books.

***

### Who this is for

- **Accountants and bookkeepers** converting foreign-currency invoices at the rate on the invoice date
- **Finance and RevOps teams** reconciling Stripe, PayPal or bank exports into one reporting currency
- **E-commerce and marketplace sellers** turning Amazon, Etsy or Shopify payouts into home currency
- **Freelancers and agencies** billing clients abroad and filing taxes at home
- **Analysts** who need a clean daily FX table for a date range

***

### What you get

#### Convert mode, one row per amount

```json
{
  "id": "INV-1001",
  "requestedDate": "2026-03-15",
  "fromCurrency": "EUR",
  "toCurrency": "USD",
  "amount": 1250.5,
  "rateDate": "2026-03-13",
  "rate": 1.1476,
  "convertedAmount": 1435.07,
  "usedPreviousBusinessDay": true,
  "source": "European Central Bank reference rate"
}
```

Weekend and holiday dates automatically use the last published ECB rate, and the row says so (`usedPreviousBusinessDay`). Rows that cannot be converted come back with an `error` and are **not charged**.

#### Rate-table mode, one row per date and currency

```json
{ "date": "2026-11-03", "baseCurrency": "USD", "quoteCurrency": "EUR", "rate": 0.89453, "inverseRate": 1.117905, "source": "European Central Bank reference rate" }
```

***

### How it works

```mermaid
flowchart LR
    A[JSON list or CSV URL] --> B[Parse amounts: 1,234.56 / 1.234,56 / 12,50]
    B --> C[Group by date]
    C --> D[ECB reference rates for each date]
    D --> E[Weekend or holiday? use last business day]
    E --> F[Cross rate to target currency]
    F --> G[Converted amount + rate + rate date]
```

Rates are the official ECB euro foreign exchange reference rates (published every TARGET business day since 1999), served through the open Frankfurter API. Cross rates like JPY to USD are computed from the ECB euro rates.

***

### Quick start

1. Click **Try for free**.
2. Keep **Convert a list of amounts**, paste your transactions or a CSV link.
3. Set **Convert to currency**, e.g. `USD`.
4. Click **Start**, then export to Excel or CSV for your books.

#### CSV format

```csv
id,date,amount,currency
INV-1001,2026-03-16,1250.50,EUR
INV-1002,30/06/2026,"89.900,00",JPY
```

Column names like `invoice`, `reference`, `total`, `ccy`, `invoice_date` are recognized too. Dates can be `YYYY-MM-DD` or `DD/MM/YYYY`.

#### API

```bash
curl -X POST "https://api.apify.com/v2/acts/Turboextract~invoice-currency-converter/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "targetCurrency": "GBP",
    "transactions": [
      { "id": "A1", "amount": 99.99, "currency": "USD", "date": "2026-02-14" },
      { "id": "A2", "amount": 2400, "currency": "SEK", "date": "2026-07-01" }
    ]
  }'
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("Turboextract/invoice-currency-converter").call(run_input={
    "csvUrl": "https://docs.google.com/spreadsheets/d/e/YOUR_SHEET/pub?output=csv",
    "targetCurrency": "EUR",
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["id"], row.get("convertedAmount"), row.get("error", ""))
```

***

### Input

| Field | Default | What it does |
|---|---|---|
| `mode` | convert | `convert` a list, or `rateTable` for daily rates |
| `transactions` | – | `[{ "amount", "currency", "date", "id" }]` |
| `csvUrl` | – | Public CSV with `amount` and `currency` columns |
| `targetCurrency` | USD | Currency to convert into |
| `decimals` | 2 | Rounding of converted amounts |
| `baseCurrency`, `quoteCurrencies`, `dateFrom`, `dateTo` | – | Rate-table mode |

**Supported currencies (30):** AUD, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, ISK, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, SEK, SGD, THB, TRY, USD, ZAR.

***

### Pricing

**$0.003 per converted amount. Failed rows are free.** 1,000 invoices cost $3.

| Option | 1,000 historical conversions |
|---|---|
| **Historical Currency Converter** | **$3**, pay only when you use it |
| Commercial FX APIs | Monthly plans, historical rates often on paid tiers only |
| Spreadsheet lookups by hand | Hours of copying rates per date |

***

### Pairs well with

- [B2B Lead Enrichment Pipeline](https://apify.com/Turboextract/b2b-lead-enrichment-pipeline): enrich the companies behind your invoices
- [Global Sanctions Screening](https://apify.com/Turboextract/global-sanctions-screening): screen foreign customers and suppliers before you pay or ship
- [Newly Funded Startup Leads](https://apify.com/Turboextract/startup-funding-leads): find companies that just raised money

***

### FAQ

**Which rate is used?** The ECB euro reference rate for the transaction date, or the last business day before it.

**Is the ECB rate accepted for tax?** Many tax authorities accept ECB reference rates (EU VAT returns use them). Check your local rules.

**Why is my currency missing?** ECB publishes 30 major currencies. Others are returned with an `error` and not charged.

**How are ambiguous dates read?** `03/04/2026` is read as 3 April 2026 (day first). Use `YYYY-MM-DD` to avoid doubt.

***

### Support

- Docs and examples: https://github.com/andersonjames38phd-cpu/invoice-currency-converter
- Community Discord: https://discord.gg/8SrXSCpvgj

Built and maintained by [Turboextract](https://apify.com/Turboextract) on the Apify platform.

# Actor input Schema

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

Convert a list of amounts, or get a daily rate table for a date range.

## `transactions` (type: `array`):

List of {"amount", "currency", "date", "id"}. Dates as YYYY-MM-DD or DD/MM/YYYY.

## `csvUrl` (type: `string`):

Optional public CSV link (e.g. Google Sheets > File > Share > Publish as CSV). Needs columns amount and currency; date and id are optional.

## `targetCurrency` (type: `string`):

ISO code, e.g. USD, EUR, GBP, CAD, AUD, JPY, INR.

## `decimals` (type: `integer`):

Rounding applied to converted amounts.

## `baseCurrency` (type: `string`):

Currency the daily rates are quoted against (rate-table mode).

## `quoteCurrencies` (type: `array`):

Currencies to get daily rates for (rate-table mode).

## `dateFrom` (type: `string`):

YYYY-MM-DD

## `dateTo` (type: `string`):

YYYY-MM-DD, empty = today

## Actor input object example

```json
{
  "mode": "convert",
  "transactions": [
    {
      "id": "INV-1001",
      "amount": 1250.5,
      "currency": "EUR",
      "date": "2026-03-16"
    },
    {
      "id": "INV-1002",
      "amount": "89.900,00",
      "currency": "JPY",
      "date": "2026-06-30"
    },
    {
      "id": "INV-1003",
      "amount": 430,
      "currency": "GBP",
      "date": "2026-10-04"
    }
  ],
  "targetCurrency": "USD",
  "decimals": 2,
  "baseCurrency": "USD",
  "quoteCurrencies": [
    "EUR",
    "GBP"
  ]
}
```

# Actor output Schema

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

One row per converted amount (or per date and currency in rate-table mode).

# 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 = {
    "transactions": [
        {
            "id": "INV-1001",
            "amount": 1250.5,
            "currency": "EUR",
            "date": "2026-03-16"
        },
        {
            "id": "INV-1002",
            "amount": "89.900,00",
            "currency": "JPY",
            "date": "2026-06-30"
        },
        {
            "id": "INV-1003",
            "amount": 430,
            "currency": "GBP",
            "date": "2026-10-04"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("turboextract/invoice-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 = { "transactions": [
        {
            "id": "INV-1001",
            "amount": 1250.5,
            "currency": "EUR",
            "date": "2026-03-16",
        },
        {
            "id": "INV-1002",
            "amount": "89.900,00",
            "currency": "JPY",
            "date": "2026-06-30",
        },
        {
            "id": "INV-1003",
            "amount": 430,
            "currency": "GBP",
            "date": "2026-10-04",
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("turboextract/invoice-currency-converter").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 '{
  "transactions": [
    {
      "id": "INV-1001",
      "amount": 1250.5,
      "currency": "EUR",
      "date": "2026-03-16"
    },
    {
      "id": "INV-1002",
      "amount": "89.900,00",
      "currency": "JPY",
      "date": "2026-06-30"
    },
    {
      "id": "INV-1003",
      "amount": 430,
      "currency": "GBP",
      "date": "2026-10-04"
    }
  ]
}' |
apify call turboextract/invoice-currency-converter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,turboextract/invoice-currency-converter"
        }
    }
}
```

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/4YPRtmvLsoVrxMn3z/builds/UDnnfd5IbhQKd2qFo/openapi.json
