Getting A List Of Countries
You can get all countries by issuing the following request:
curl --get --include 'https://wft-geo-db.p.mashape.com/v1/geo/countries?offset=0&limit=500' \ -H 'X-Mashape-Key: YOUR_API_KEY' \ -H 'X-Mashape-Host: wft-geo-db.p.mashape.com'
We recommend you set the offset and limit, or they will default to 0 and 5 respectively, giving you back only the first 5 countries. Set a high limit to ensure you get all the countries back in one call. NOTE: Your limit value is capped based on your current subscription plan.
Cache the country list at startup to avoid needless hits on the service.