Showing a price in the right currency, or labeling a checkout by region, usually starts with a country code. Here's the lookup.
Country → currency
curl https://countries.dev/alpha/JPThe currencies array carries the code, name, and symbol:
{ "name": "Japan", "currencies": [{ "code": "JPY", "name": "Japanese yen", "symbol": "¥" }] }In code, take the first entry:
const country = await fetch("https://countries.dev/alpha/JP").then((r) => r.json());
const { code, symbol } = country.currencies[0]; // "JPY", "¥"A handful of countries list more than one currency — currencies is an array for a reason, so don't treat index 0 as the only one.
Currency → countries
The reverse works too. Every country on the euro:
curl https://countries.dev/currency/EURHandy for "which markets share this currency" without scanning the whole dataset yourself.
Written by
Dov Azencot
At
Tue Jun 23 2026