List Countries
GET
/api/v1/locations/countriesOverview
Retrieve a list of all 240 countries in the location database, sorted alphabetically with location counts for each.
Response
countriesarrayArray of country objects
totalintegerTotal number of countries
Example
- cURL
- Python
curl https://spideriq.ai/api/v1/locations/countries \
-H "Authorization: Bearer <your_token>"
import requests
response = requests.get(
"https://spideriq.ai/api/v1/locations/countries",
headers={"Authorization": "Bearer <your_token>"}
)
result = response.json()
print(f"Available countries: {result['total']}")
for country in result['countries'][:10]:
print(f" {country['country_code']}: {country['country_name']} ({country['location_count']} cities)")
Response:
{
"countries": [
{
"country_code": "AF",
"country_name": "Afghanistan",
"location_count": 58
},
{
"country_code": "AL",
"country_name": "Albania",
"location_count": 35
},
{
"country_code": "DZ",
"country_name": "Algeria",
"location_count": 156
},
{
"country_code": "DE",
"country_name": "Germany",
"location_count": 2108
},
{
"country_code": "FR",
"country_name": "France",
"location_count": 1140
}
],
"total": 240
}
Use Cases
- Campaign planning: See available countries before creating campaigns
- Coverage verification: Check which countries have location data
- Region selection: Find country codes for filtering