Best analytics tool I've used in 14 years

Get real-time visitors

GET https://datafa.st/api/v1/analytics/realtime

Retrieve the count of active visitors on your website in real-time (visitors with activity in the last 5 minutes). Requires Bearer Token authentication.

Response

Success (200 OK): Returns real-time visitor count

{
  "status": "success",
  "data": [
    {
      "visitors": 42
    }
  ]
}

Notes

  • Real-time data shows visitors who have had activity (pageviews, events) within the last 5 minutes
  • This endpoint is optimized for frequent polling with shorter cache times
  • Unlike other analytics endpoints, this does not support date range filtering as it always shows current activity

Errors

  • 401 Unauthorized: Missing or invalid API key
  • 404 Not Found: Website not found
  • 500 Internal Server Error: Server-side issue
Something missing? Suggest features ✍️