Official Norges Bank NOK exchange rate for a currency and date
Zero-auth public tool endpoint. Wraps Norges Bank's open SDMX API at data.norges-bank.no/api/data/EXR so agents can fetch official NOK rates without registering anywhere. All rates are quoted as base: "NOK" with the foreign currency as quote — the rate value means 1 unit of the foreign currency equals rate NOK.
Source of truth: the gateway never fabricates or interpolates rates. If Norges Bank hasn't published a quotation, the gateway returns the most recent available one and surfaces the discrepancy (data.date is the actual publication date; data.requested_date is what the caller asked for). Norges Bank does not publish on weekends, Norwegian public holidays, or before ~16:00 Europe/Oslo on the current day — requests that fall in those windows transparently get the most recent prior business day's rate.
Caching: in-memory per Lambda, 1-hour TTL. Cache hits are signalled by data.cached: true and _meta.served_from: "cache"; cache misses are false / "live". The HTTP Cache-Control: public, max-age=3600 header also applies, so CDNs and browsers can cache identical requests.
Rate limiting: soft per-IP cap of 1000 requests per minute via the shared withPublicRateLimit wrapper. The standard X-RateLimit-* headers are present on every 200 response.
Parameter shapes: two mutually exclusive query shapes are accepted. The legacy shape takes ?currency=<ISO 4217> (the non-NOK side) and is unchanged. The MCP-parity shape takes ?base="e= — the exact input shape of the get_exchange_rate MCP tool — where exactly one side must be NOK (rates are NOK-anchored; a pair where neither or both sides are NOK is rejected with 400 UNSUPPORTED_CURRENCY_PAIR, the same rejection the MCP tool's preflight produces). There is deliberately NO precedence between the shapes: supplying currency together with base and/or quote is a contradiction rejected with 400 VALIDATION_FAILED, and supplying only one of base/quote is an incomplete pair rejected the same way (mirroring the MCP tool's required-both input schema). Both shapes return an identical response payload — always base: "NOK", quote: <non-NOK currency>; the endpoint never inverts or recomputes rates.
Request
- Base URL: https://www.apier.no
- URL: https://www.apier.no/api/v1/tools/exchange-rate
- Auth: none required
Query parameters
ISO 4217 three-letter currency code (case-insensitive, upper-cased in the response). Must be a currency Norges Bank publishes — EUR, USD, GBP, SEK, DKK, and others from the EXR dataset. Unknown currencies return 404 NO_RATE_AVAILABLE. Required in the legacy shape; omit it when using the base/quote MCP-parity shape — the two shapes are mutually exclusive, and mixing them returns 400 VALIDATION_FAILED.
Oslo calendar date in YYYY-MM-DD. Defaults to today-in-Europe/Oslo when omitted. Future dates return 400 INVALID_DATE (Norges Bank does not publish the future).
MCP-parity shape: ISO 4217 three-letter code, case-insensitive — the same base field the get_exchange_rate MCP tool takes. Must be supplied together with quote (a lone base is 400 VALIDATION_FAILED), and exactly one of base/quote must be NOK (otherwise 400 UNSUPPORTED_CURRENCY_PAIR). Mutually exclusive with currency.
MCP-parity shape: ISO 4217 three-letter code, case-insensitive — the same quote field the get_exchange_rate MCP tool takes. Must be supplied together with base (a lone quote is 400 VALIDATION_FAILED), and exactly one of base/quote must be NOK (otherwise 400 UNSUPPORTED_CURRENCY_PAIR). Mutually exclusive with currency.
Response
Rate returned. data.date equals data.requested_date when the underlying publication date matches; when the request fell on a weekend / holiday / pre-publication window, data.date is the most recent prior business day.
Example response
{
"data": {
"quote": "EUR",
"rate": 11.5234,
"date": "2026-04-10",
"requested_date": "2026-04-11"
},
"_meta": {
"rulebook_version": "v1.0.0",
"source": "apier.no",
"data_source": "Brønnøysund Enhetsregisteret + Apier Universal Rulebook",
"schema_version": "1.0.0",
"legal_basis": "NLOD — public registry reuse",
"response_timestamp": "2026-04-24T12:00:00.000Z",
"response_hash": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"source_snapshot_id": "brreg-2026-04-24T02:00:00.000Z",
"cost_nok": 0.5,
"wallet_remaining_nok": 9.5,
"spend_cap_remaining_nok": 12.5
}
}Changes
No recorded changes to this operation across all 1 revision of this API.