Menu

GeoDB City API - Find Cities For Your Criteria | Wirefree Thought

header photo

Getting Countries Supporting A Specific Currency

1. First, get a valid currency code by issuing the following request (you may have to page through the results to get all currencies):

curl --get --include 'https://wft-geo-db.p.mashape.com/v1/locales/currencies?offset=0&limit=500' \
    -H 'X-Mashape-Key: YOUR_API_KEY' \
    -H 'X-Mashape-Host: wft-geo-db.p.mashape.com'

2. Now find all countries supporting a specific currency from the retrieved list:

curl --get --include 'https://wft-geo-db.p.mashape.com/v1/geo/countries?currencyCode={currencyCode}&offset=0&limit=500' \
    -H 'X-Mashape-Key: YOUR_API_KEY' \
    -H 'X-Mashape-Host: wft-geo-db.p.mashape.com'

Where:

currencyCode The code for a currency obtained in the prior call to get the currencies list.