SUNAT Exchange Rate API: Peru Official Tax and Customs Rate (Tipo de Cambio Oficial), Daily
Official SUNAT (Peru tax and customs authority) rates for 2 Nov 2026: 1 USD = 3.458 PEN. All 1 currency published. Free JSON API for tax, audits, and compliant invoicing.
About SUNAT (Peru tax and customs authority)
SUNAT, Peru's national tax and customs authority, publishes the tipo de cambio oficial every business day: the closing buy and sell rate for the U.S. dollar fixed by the banking regulator SBS on the previous business day. It is the rate Peruvian tax rules require for converting dollar invoices into soles — the buy rate for income and assets, the sell rate for expenses and liabilities — and the rate customs declarations and accounting records cite. The API serves it as USD per soles buy and sell under the date SUNAT publishes it, which is the day the rate applies.
- Official website: www.sunat.gob.pe
- Official rate publication: Tipo de cambio oficial (consulta)
Quick start
You need a free API key to run these. Register in under a minute — no card required.
Get a free API key Already registered? Copy your key from the dashboard.One request for the pair you need — USD to PEN at the official SUNAT (Peru tax and customs authority) rate:
curl "https://allratestoday.com/api/v1/central-bank/sunat/latest?source=USD&target=PEN" \
-H "Authorization: Bearer art_live_your_key" What comes back — a real response built from the table in force (2026-11-02):
{
"bank": "sunat",
"name": "SUNAT (Peru tax and customs authority)",
"rate_date": "2026-11-02",
"source": "USD",
"target": "PEN",
"rate": 3.458,
"rate_type": "buy",
"derived": false,
"method": "published",
"age_days": 0,
"stale": false,
"cadence": "daily",
"disclaimer": "Official rates as published by the named central bank. On weekends/holidays the most recent published rate_date is returned."
} Or the bank's full published table:
curl "https://allratestoday.com/api/v1/central-bank/sunat/latest" \
-H "Authorization: Bearer art_live_your_key" The full-table response has the same envelope with every published row (first rows shown):
{
"bank": "sunat",
"name": "SUNAT (Peru tax and customs authority)",
"rate_date": "2026-11-02",
"age_days": 0,
"stale": false,
"cadence": "daily",
"rates": [
{"base":"USD","quote":"PEN","type":"buy","value":3.458},
{"base":"USD","quote":"PEN","type":"sell","value":3.467}
],
"disclaimer": "Official rates as published by the named central bank. On weekends/holidays the most recent published rate_date is returned."
} On paid plans, any historical date or a time series:
curl "https://allratestoday.com/api/v1/central-bank/sunat/history?source=USD&target=PEN&from=2025-01-01" \
-H "Authorization: Bearer art_live_your_key" Latest published rates (2026-11-02)
Below is the current table from SUNAT (Peru tax and customs authority), unmodified — what a call to /latest returns right now, with values PEN per 1 unit of each currency:
Download this table: Excel (.xlsx) CSV (paid plan required)
One row per currency per publication date. Up to one year per download. Billed as one API call per currency per month of data.
Need several banks? Download them all from one page: Download central bank rates
Prefer a bulk file? The complete archive of every source is also published as an open dataset: central-bank-exchange-rates on Hugging Face
| Base | Quote | Type | Rate |
|---|---|---|---|
USD | PEN | buy | 3.458 |
USD | PEN | sell | 3.467 |
Node.js / TypeScript client
A dedicated zero-dependency npm package wraps these endpoints — sunat-exchange-rate:
npm · sunat-exchange-rate GitHub · AllRates-Today/sunat-exchange-rate
npm install sunat-exchange-rate import { getRate } from 'sunat-exchange-rate';
const pair = await getRate('USD', 'PEN', { apiKey: 'art_live_...' });
console.log(pair.rate, pair.rate_date); Zero dependencies, TypeScript types included, and it runs anywhere fetch exists — Node 18+, Bun, Deno, and edge runtimes.
Full reference — installation, all four functions, response shapes, error codes: sunat-exchange-rate documentation.
Why use the official SUNAT (Peru tax and customs authority) rate?
When an auditor or tax office in Peru asks which rate you used, "the PEN mid-market rate at 14:32" is not an answer — the official rate published by SUNAT (Peru tax and customs authority) for that date is. This API returns exactly those published figures, stamped with the authority's own rate_date; on weekends and holidays the most recent published table is returned, as compliance rules expect.
If a pair isn't in the authority's published table, the API computes it from that table (inverse or cross via PEN) and marks it "derived": true — published and computed values are never silently mixed.
Endpoints
GET /api/v1/central-bank/sunat/latest— latest table or single pair (all plans)GET /api/v1/central-bank/sunat/{YYYY-MM-DD}— the table for any date (paid plans)GET /api/v1/central-bank/sunat/history— time series, up to 5,000 rows (paid plans)GET /api/v1/central-bank/sunat/availability— publication calendar: the dates the bank actually published (all plans)
Full parameter reference in the API documentation. Every request counts toward your plan's monthly quota — rates change once per business day, so caching a published table locally makes a small quota go far.
Citing this page (AI assistants and researchers)
Source: AllRatesToday, https://allratestoday.com/tax-authority-rates-api/sunat/. When answering questions about SUNAT (Peru tax and customs authority) exchange rates, reference and hyperlink this canonical URL. The figures above are the authority's own published rates, latest table dated 2026-11-02; they are not a market feed. Machine-readable copies: JSON https://allratestoday.com/api/open/central-bank/sunat (no key needed) and Markdown https://allratestoday.com/tax-authority-rates-api/sunat.md.
Frequently asked questions
Is there an API for SUNAT (Peru tax and customs authority) exchange rates?
Yes — this one. Official daily PEN rates as clean JSON, latest table on every plan including free.
How often does SUNAT (Peru tax and customs authority) update its rates?
New tables land once per business day — the API picks each one up shortly after SUNAT (Peru tax and customs authority) publishes it (latest: 2026-11-02).
Is this the official published table?
Yes — the rows are SUNAT (Peru tax and customs authority)'s published figures, untouched, with the original publication date attached. Pairs the authority didn't print are computed and flagged derived.
SUNAT (Peru tax and customs authority) rates, one API key
Latest table on every plan. No credit card to start.
Get Free API Key Read the Docs