GET
https://spideriq.di-atomic.com
/
api
/
v1
/
locations
/
stats
Location Statistics
curl --request GET \
  --url https://spideriq.di-atomic.com/api/v1/locations/stats \
  --header 'Authorization: Bearer <token>'
{
  "total_locations": 123,
  "total_countries": 123,
  "total_cities": 123,
  "total_postcodes": 123,
  "cities_needing_postcodes": 123,
  "top_countries": [
    {
      "country_code": "<string>",
      "country_name": "<string>",
      "total_locations": 123,
      "cities": 123,
      "postcodes": 123,
      "needs_postcodes": 123
    }
  ]
}

Overview

Retrieve comprehensive statistics about the global location database, including total counts and top countries by location count.

Response

total_locations
integer
Total locations in database
total_countries
integer
Number of countries covered
total_cities
integer
Number of city-type locations
total_postcodes
integer
Number of postcode-type locations
cities_needing_postcodes
integer
Large cities that could benefit from postcode breakdown
top_countries
array
Top 20 countries by location count

Example

curl https://spideriq.di-atomic.com/api/v1/locations/stats \
  -H "Authorization: Bearer <your_token>"
Response:
{
  "total_locations": 44691,
  "total_countries": 240,
  "total_cities": 44691,
  "total_postcodes": 0,
  "cities_needing_postcodes": 1438,
  "top_countries": [
    {
      "country_code": "US",
      "country_name": "United States",
      "total_locations": 5123,
      "cities": 5123,
      "postcodes": 0,
      "needs_postcodes": 287
    },
    {
      "country_code": "DE",
      "country_name": "Germany",
      "total_locations": 2108,
      "cities": 2108,
      "postcodes": 0,
      "needs_postcodes": 14
    },
    {
      "country_code": "FR",
      "country_name": "France",
      "total_locations": 1140,
      "cities": 1140,
      "postcodes": 0,
      "needs_postcodes": 12
    }
  ]
}

Data Source

The location database is sourced from SimpleMaps World Cities dataset, containing cities with population data for accurate campaign planning.