API Reference
/countries Endpoint
List every supported country with its code and name. Public and not metered.
Endpoint
GET https://api.currency-core.com/v1/countries
This endpoint is public — no API key required — and does not count against your quota or rate limit. Use it to discover the full set of countries CurrencyCore supports and the codes used to reference them.
Response
Returns an array of { code, name, currencies } objects, sorted by name:
[
{ "code": "AFG", "name": "Afghanistan", "currencies": ["AFN"] },
{ "code": "DEU", "name": "Germany", "currencies": ["EUR"] },
{ "code": "IND", "name": "India", "currencies": ["INR"] },
{ "code": "PAN", "name": "Panama", "currencies": ["PAB", "USD"] },
{ "code": "USA", "name": "United States", "currencies": ["USD"] }
]
| Field | Type | Description |
|---|---|---|
code | string | Country code (ISO/IMF alpha-3), e.g. USA, IND |
name | string | Human-readable country name |
currencies | string[] | The country’s official currencies (ISO 4217), e.g. ["INR"]. Most countries have one; some have several (Eurozone members are ["EUR"], Panama is ["PAB", "USD"]). When using PPP in /convert, the currency in each currency:country pair must be one of these. |
Examples
This endpoint is public — no Authorization header needed.
curl https://api.currency-core.com/v1/countriesconst countries = await fetch("https://api.currency-core.com/v1/countries").then((r) => r.json());
// [{ code: "AFG", name: "Afghanistan", currencies: ["AFN"] }, ...]import requests
countries = requests.get("https://api.currency-core.com/v1/countries").json()
print(countries[:3])res, _ := http.Get("https://api.currency-core.com/v1/countries")
defer res.Body.Close()
var countries []struct {
Code string `json:"code"`
Name string `json:"name"`
Currencies []string `json:"currencies"`
}
json.NewDecoder(res.Body).Decode(&countries)
fmt.Println(countries[0])HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.currency-core.com/v1/countries"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());<?php
$countries = json_decode(
file_get_contents("https://api.currency-core.com/v1/countries"),
true,
);
print_r(array_slice($countries, 0, 3));Notes
- The list is served from an edge cache, so it’s fast and cheap to poll.
- Treat
codeas the stable identifier; names are for display.