Rupiah Exchange Rate API: Check Exchange Rates and Convert Currency to IDR
By Tim APIPedia, Tim Engineering APIPedia · Published · Updated · 7 min read
APIPedia's exchange rate API provides daily ECB reference rates for 30 currencies, including the rupiah, plus a nominal conversion endpoint between currencies.

The exchange rate API is an HTTP service that returns exchange rates between currencies, so applications can display prices in rupiah or convert nominal amounts without manually updating the exchange table. In APIPedia there are three endpoints: a list of currencies, the latest exchange rate against a base currency, and nominal conversion.
Exchange rate data comes from the European Central Bank (ECB) daily reference rate via the Frankfurter service. This article discusses how to call the three endpoints, the meaning of each field, an example of displaying prices in rupiah, and the limitations you need to understand before using the reference rate for transactions.
What are the exchange rate API endpoints in APIPedia?
All three use method GET, base URL https://api.apipedia.id/v1, and header Authorization: Bearer apk_xxx. Currency codes use the three-letter ISO 4217 standard, for example USD, IDR, or SGD.
| Endpoints | Function | Parameter |
|---|---|---|
/kurs/currencies | List of supported currency codes and names | - |
/kurs/latest | The latest exchange rate against a base currency | base (default USD), symbols (optional) |
/kurs/convert | Nominal conversion from one currency to another currency | from, to, amount (required) |
What currencies are supported?
/kurs/currencies returns 30 currencies, including the rupiah ( IDR) and the currencies of Indonesia's main trading partners in Asia: SGD, MYR, THB, PHP, CNY, JPY, KRW, HKD, and INR. Other major currencies such as USD, EUR, GBP, AUD, and CHF are also available.
curl https://api.apipedia.id/v1/kurs/currencies \
-H "Authorization: Bearer apk_xxx"{
"jumlah": 30,
"currencies": {
"AUD": "Australian Dollar",
"IDR": "Indonesian Rupiah",
"SGD": "Singapore Dollar",
"USD": "United States Dollar"
},
"source": "ECB via Frankfurter",
"cached": false
}This list almost never changes. Take it once to populate the currency selection dropdown, then save it in your app.
How do I get the latest rupiah exchange rate?
Call /kurs/latest with base being the base currency and symbols containing the destination currency separated by commas. Clear symbols to take all.
curl "https://api.apipedia.id/v1/kurs/latest?base=USD&symbols=IDR,SGD,EUR" \
-H "Authorization: Bearer apk_xxx"{
"is_success": true,
"message": "Kurs referensi ECB berhasil diambil",
"data": {
"base": "USD",
"date": "2026-10-23",
"rates": {
"EUR": 0.89342,
"IDR": 18108,
"SGD": 1.2785
},
"source": "ECB via Frankfurter",
"cached": false
}
}| Fields | Information |
|---|---|
base | Base currency. All values in rates mean "1 base = so many destination currencies" |
date | Date of reference rate used |
rates | The object contains the destination currency code and its value |
source | Data sources, "ECB via Frankfurter" |
cached | true when the answer is retrieved from the cache |
The example above means 1 USD is equivalent to IDR 18,108 according to the ECB reference exchange rate dated 23 October 2026. Pay attention to field date: this example was taken on Monday 26 October, but the exchange rate was the previous Friday. The explanation is in the following section.
Why isn't the exchange date always today?
The ECB publishes reference rates once a day on weekdays, around 16:00 Central European time, and does not publish them at weekends or TARGET holidays. So in the morning WIB, today's exchange rate has not yet been published, and on Saturday-Sunday you will receive Friday's exchange rate. Always display date in the interface so users know what date the rate is valid for.
How to convert USD to rupiah via API?
/kurs/convert accepts from, to, and amount (greater than zero), then returns the exchange rate and the conversion result.
curl "https://api.apipedia.id/v1/kurs/convert?from=USD&to=IDR&amount=100" \
-H "Authorization: Bearer apk_xxx"{
"from": "USD",
"to": "IDR",
"amount": 100,
"rate": 18108,
"result": 1810800,
"date": "2026-10-23",
"source": "ECB via Frankfurter",
"cached": false
}result is amount times rate. This endpoint is practical for one-time conversions, for example in calculators or bots. To convert many prices at once, it is more economical to take /kurs/latest once and then multiply it yourself.
Example: displays product prices in rupiah
Let's say your store imports goods with a USD base price, or you sell SaaS services priced in dollars and want to display a dollar estimate. Fetch the exchange rate once, store it in the backend cache for a few hours, then calculate all the prices from there.
const BASE = "https://api.apipedia.id/v1";
let kurs = null; // { rates, date, diambil }
async function ambilKurs() {
const enamJam = 6 * 60 * 60 * 1000;
if (kurs && Date.now() - kurs.diambil < enamJam) return kurs;
const res = await fetch(`${BASE}/kurs/latest?base=USD&symbols=IDR`, {
headers: { Authorization: `Bearer ${process.env.APIPEDIA_KEY}` }, // apk_xxx
});
const body = await res.json();
if (!body.is_success) {
if (kurs) return kurs; // pakai kurs terakhir bila API gagal
throw new Error(body.message);
}
kurs = { rates: body.data.rates, date: body.data.date, diambil: Date.now() };
return kurs;
}
const rupiah = new Intl.NumberFormat("id-ID", {
style: "currency", currency: "IDR", maximumFractionDigits: 0,
});
export async function hargaRupiah(hargaUsd) {
const { rates, date } = await ambilKurs();
return {
teks: `≈ ${rupiah.format(hargaUsd * rates.IDR)}`,
keterangan: `Kurs referensi ECB ${date}`,
};
}
// hargaRupiah(29) -> { teks: "≈ Rp 525.132", keterangan: "Kurs referensi ECB 2026-10-23" }With a six hour cache, one server only needs around four requests per day, far below the Free package quota of 500 requests per day. The "≈" sign and date information are important so that buyers do not assume the figure is the final price.
What are the limits of the ECB reference rate?
This section needs to be read before using the API for real money matters.
- Not the transaction rate. The reference rate is the middle value for information. Banks, money changers and payment providers use their own buying and selling rates which can differ quite a lot.
- Not JISDOR Bank Indonesia. For purposes that require the official Indonesian exchange rate, such as certain reporting or contracts that mention JISDOR, use Bank Indonesia sources. For tax rates, refer to the Minister of Finance Exchange Rate (KMK) which is set weekly.
- Updated daily. The data doesn't move throughout the day, so it's not suitable for trading or real-time pricing.
- Limited to 30 currencies. Currencies not in
/kurs/currencies, for example VND or SAR, are not yet supported.
For displaying price estimates, internal reports, trip calculators, or dashboards, these reference rates are sufficient. For billing in foreign currency, add a foreign exchange margin and match it to your payment provider's rate.
Other usage ideas
- Travel calculator: convert your rupiah budget to SGD, THB or JPY before your holiday.
- Financial dashboard: consolidate multi-currency income to rupiah at the exchange rate as of date.
- Internal bot: answer "what is the dollar rate today?" on the finance team's Slack or WhatsApp.
- Jastip and imports: estimate the selling price in rupiah from the price of goods abroad. Add estimated domestic shipping costs to the price reaching the buyer.
Frequently asked questions
Is this exchange rate API free?
Yes. The three endpoints are available in the Free package which is free forever, with a quota of 500 requests per day and a rate limit of 10 requests per second.
How often are the rates updated?
Following the ECB, i.e. once a day on European business days. Field date shows the date of the exchange rate currently in use.
Can I use the rupiah as a base currency?
Can. Send base=IDR to get the value of 1 rupiah in another currency. The value will be very small, so it is usually easier to use a foreign currency as a basis and then display the results in rupiah.
Is this the Bank Indonesia rate?
No. The data comes from the ECB reference rate via Frankfurter, not BI's JISDOR and not the KMK tax rate.
Can it be asked via AI assistant?
Can. With the APIPedia MCP server, Claude can answer "How much is 100 dollars?" using tool kurs_convert.
Start using the exchange rate API
Create a free account at console.apipedia.id, grab the key in the API Token menu, then run the curl /kurs/convert example above. The dollar price in your application can immediately appear in rupiah, complete with the exchange rate date.
Topics: #api kurs #kurs rupiah #konversi mata uang #exchange rate #tutorial api
${c.about}
Tim APIPedia — Tim Engineering APIPedia
Tim engineering di balik APIPedia yang membangun dan memelihara API data Indonesia - ongkir, OCR KTP, data wilayah, BMKG, hingga server MCP - dan menulis panduan integrasinya dari pengalaman langsung.