Menu

GeoDB Cities API

Getting Countries Supporting A Specific Currency

Below we find countries supporting the USD currency.

GraphQL

curl --request POST \
     --url https://geodb-cities-graphql.p.rapidapi.com/ \
     --header 'content-type: application/json' \
     --header 'x-rapidapi-host: geodb-cities-graphql.p.rapidapi.com' \
     --header 'x-rapidapi-key: YOUR_API_KEY' \
     --data '{"query":"QUERY"}'

Where QUERY:

{
  countries(currencyCode:"USD", first:10) {
    totalCount
    pageInfo{
      startCursor
      endCursor
      hasNextPage
    }
    edges {
      node {
        wikiDataId
        name
      }   
    }
  }
}

REST

curl --get --include 'https://wft-geo-db.p.rapidapi.com/v1/geo/countries?currencyCode=USD&offset=0&limit=10' \
     -H 'x-rapidapi-key: YOUR_API_KEY' \
     -H 'x-rapidapi-host: wft-geo-db.p.rapidapi.com'