---
title: "Free Official Exchange Rate Widget & Keyless API"
description: "Embed official central bank and tax authority exchange rates on any site with one line of HTML — no API key. Free forever with attribution: ECB, Bank of England, HMRC, Swiss customs and 33 more."
canonical: https://allratestoday.com/official-rates-widget/
source: AllRatesToday (https://allratestoday.com/) — Markdown mirror of the page above; index of all pages at https://allratestoday.com/llms.txt
generated: 2026-11-08T18:26:36.887Z
---

# Free Official Exchange Rate Widget & Keyless API

Embed official central bank and tax authority exchange rates on any site with one line of HTML — no API key. Free forever with attribution: ECB, Bank of England, HMRC, Swiss customs and 33 more.

By [Madhushan](https://allratestoday.com/authors/madhushan/), Founder & Lead Developer · Updated 10 Aug 2026

   **One line of HTML, no API key.** Put an official central bank or tax authority exchange rate on any page — with the publication date that makes it citable. Free forever, in exchange for a visible link back.

## Live demo

This is the widget running on this page, showing the European Central Bank's published reference rate:

## Embed it

Paste this where you want the rate to appear:

```
<div class="art-official-rate"
     data-bank="ecb"
     data-source="USD"
     data-target="EUR"></div>
<script async src="https://allratestoday.com/official-rates.js"></script>
```

Change `data-bank` to any covered source, and `data-source`/`data-target` to the pair you need. Add `data-theme="dark"` on a dark background.

## The one condition

The widget renders a **"Rates by AllRatesToday"** link and does not let you remove it. That is the whole price of the endpoint: no key, no signup, no quota — just the link. Removing or hiding it is the one thing that is not permitted.

We are explicit about this because the alternative is a signup wall, and an official exchange rate is more useful to the web without one.

## Or call it directly

The same data is available as keyless JSON, with CORS enabled, for one pair:

```
curl "https://allratestoday.com/api/open/central-bank/ecb?source=USD&target=EUR"
```

```
{
  "bank": "ecb",
  "rate_date": "2026-08-07",
  "source": "USD",
  "target": "EUR",
  "rate": 0.85704,
  "rate_type": "reference",
  "derived": false,
  "method": "published",
  "attribution": {
    "source": "Official rates published by ECB, served by AllRatesToday",
    "url": "https://allratestoday.com/central-bank-rates-api/ecb/",
    "terms": "Free to use; public pages that show the rates need a visible link to allratestoday.com"
  }
}
```

Or the source's whole published table:

```
curl "https://allratestoday.com/api/open/central-bank/hmrc"
```

Every response carries the publishing body's own `rate_date`, and anything computed rather than published is flagged `derived` with the method used — the distinction an auditor asks about.

## What needs a key

The keyless endpoint serves the **latest published table only**. Historical dates, time series and publication calendars are on the [full central bank API](https://allratestoday.com/central-bank-rates-api/), which starts free — see [pricing](https://allratestoday.com/pricing/). That split is not arbitrary: the latest table is one cached object, while history is a database query per request. The archives are deep once you have a key: history back to 2000 and earlier for major sources — the ECB series starts in 1999, the SNB monthly series in 1914.

## Frequently asked questions

### Do I need an API key?

No. This endpoint and widget are keyless and open to any site, on one condition: keep the visible "Rates by AllRatesToday" link the widget renders. That attribution is what pays for the endpoint.

### What is the catch?

There is a real limit: this serves the latest published table only. Historical dates, time series and publication calendars need a free or paid API key, because those queries hit the database rather than a cached table.

### How is this different from a normal currency widget?

Most widgets show a live market rate. This one shows the official published rate — the number a tax filing, customs declaration or audit is required to cite — and it always shows the publishing body's own publication date alongside it.

### Which sources can I embed?

Any of the [123 central banks](https://allratestoday.com/central-bank-rates-api/institutions/) or the tax authorities: ecb, boe, fed, snb, boj, pboc and the rest, plus hmrc (UK monthly customs rates), ustreasury (quarterly reporting rates) and bazg (Swiss daily customs rates). Use the source code as data-bank.

### Can I use it commercially?

Yes, on any site including commercial ones, as long as the attribution link stays visible and followable.

## Official rates, no signup

Paste the snippet and you are done. Need real-time market rates? Get a free key. Official-rate history and time series are on paid plans.

 [Get Free API Key](https://allratestoday.com/register) [See all sources](https://allratestoday.com/central-bank-rates-api/)

## Related

  [Central Bank Exchange Rate APIOfficial rates from 123 central banks](https://allratestoday.com/central-bank-rates-api/) [Tax Authority Exchange Rate APIHMRC, US Treasury and Swiss customs](https://allratestoday.com/tax-authority-rates-api/) [Which rate does compliance require?Customs, VAT and tax filings explained](https://allratestoday.com/blog/tax-authority-exchange-rates/) [API documentationEndpoints, parameters and examples](https://allratestoday.com/docs/#central-bank)
