GraphQL API
By referring to the GraphQL Schema docs, you may execute any of the operations directly using the cURL command from a shell window, as follows:
Free
curl --request POST \ --url 'http://geodb-free-service.wirefreethought.com/graphql' \ --header 'content-type: application/json' \ --data '{"query":"QUERY"}'
Pro
curl --request POST \ --url 'http://geodb-free-service.wirefreethought.com/graphql' \ --header 'content-type: application/json' \ --header 'x-rapidapi-host: geodb-cities-graphql.p.rapidapi.com' \ --header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY' \ --data '{"query":QUERY"}'
where QUERY might be getting all California cities:
{ country(id:"US") { name region(code:"CA") { name populatedPlaces(first:10) { totalCount pageInfo { startCursor endCursor hasNextPage } edges { node { name } } } } } }
Go here for details on the full set of possible GraphQL queries.
REST API
By referring to the REST API docs, you may execute any of the operations directly using the cURL command from a shell window, as follows:
Free
curl --get --include 'http://geodb-free-service.wirefreethought.com/v1/some/geodb/endpoint?param1¶m2...'
Pro
curl --get --include 'https://wft-geo-db.p.rapidapi.com/v1/some/geodb/endpoint?param1¶m2...' \ -H 'x-rapidapi-key: YOUR_API_KEY' \ -H 'x-rapidapi-host: wft-geo-db.p.rapidapi.com'
Go here to get the details on the total set of available endpoint operations, including request/response format, and possible errors.