Docs/API REFERENCE/Locations

Locations

GET

Locations

The locations endpoint returns a paginated list of top visitor locations. Cursors are opaque and totals are not returned by default.

Endpoint

GET https://trackfox.app/api/v1/locations/top

Query Parameters

Parameter Type Required Description
websiteId string Yes The unique identifier of your website
period string No Defaults to last30d
startDate string Only for period=custom Custom period start date
endDate string Only for period=custom Custom period end date
timezone string No Defaults to UTC
limit number No Defaults to 50, maximum 100
cursor string No Opaque cursor from the previous response

Response

{
  "data": [
    {
      "country": "United States",
      "region": "Michigan",
      "city": "Detroit",
      "visitors": 30
    }
  ],
  "pagination": {
    "limit": 50,
    "hasMore": false,
    "nextCursor": null
  }
}

Examples

curl "https://trackfox.app/api/v1/locations/top?websiteId=site_123&period=last30d&limit=25" \
  -H "Authorization: Bearer tf_your_api_token_here"
curl "https://trackfox.app/api/v1/locations/top?websiteId=site_123&period=last30d&limit=25&cursor=NEXT_CURSOR" \
  -H "Authorization: Bearer tf_your_api_token_here"

Need help? Contact us for assistance.

Suggest features? We'd love your feedback