Get realtime visitors
GET https://datafa.st/api/v1/analytics/realtimeReturn the count of currently active visitors — anyone with pageview activity in the last 10 minutes. Use this for live counters, status widgets, or the mobile app.
This endpoint ignores date ranges and filters. It always reflects the current realtime window.
Related: Realtime map · Mobile app
Request
Query parameters
websiteIdstring
Required with a
dft_ account token on Website API routes. Omit with a df_ website key. Example: ?websiteId=665f0b3c4d2e1a0012345678.fieldsstring
Controls which properties are included in the response. Use it to request only the metrics or metadata your integration needs. Only supported value:
visitors. Returns all fields when omitted.Response
Returns a JSON object with
status: "success" and endpoint-specific fields in data (and pagination when the endpoint is paginated).Response fields
data[].visitorsnumber
Number of visitors active in the realtime window. Use it for live counters or status widgets.
Authentication
df_website API key: The website is inferred from the key. You do not need awebsiteIdquery parameter.dft_account token: Requiresanalytics:readpermission and?websiteId=on every request. The token must be allowed to access that website.
Read authentication and scopes for token creation, permission lists, and scoped tokens.
Errors
400 — Invalid
fields value (only visitors is supported).See API errors for the standard error envelope, auth failures, validation errors, permission errors, and rate limits.