Getting A List Of Countries
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(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?offset=0&limit=10' \ -H 'x-rapidapi-key: YOUR_API_KEY' \ -H 'x-rapidapi-host: wft-geo-db.p.rapidapi.com'