Endpoint
Authentication
All requests must include your API key in theAuthorization header:
Query Parameters
The domain of your site as configured in Plausible. Example:
example.comResponse
The endpoint returns a single integer representing the number of current active visitors.The number of visitors who have triggered an event in the last 5 minutes.
Examples
Get Current Visitors
Polling for Updates
For real-time dashboards, you can poll this endpoint at regular intervals:Implementation Details
- A visitor is counted as “active” if they triggered any event (excluding internal
engagementevents) within the last 5 minutes from the current UTC time. - The count represents unique visitors based on their
user_id, so multiple pageviews from the same visitor within the 5-minute window are counted only once. - The endpoint queries the
events_v2table in ClickHouse with a timestamp filter for the last 5 minutes. - There are no filters, date ranges, or comparison options for this endpoint - it always returns the current count.
Use Cases
- Real-time dashboards - Display current visitor count on admin dashboards
- Traffic monitoring - Monitor traffic spikes or unusual activity
- Social proof - Show potential customers how many people are currently browsing (e.g., “23 people are viewing this page”)
- Load monitoring - Track traffic levels to anticipate server load
- Marketing campaigns - Monitor immediate impact of campaigns or product launches
Rate Limiting
While this endpoint is designed for real-time updates, avoid excessive polling:- Recommended polling interval: 30-60 seconds
- The data is already aggregated over 5 minutes, so polling more frequently than every 30 seconds provides limited additional value
- Check your API plan for rate limits
Error Responses
Error message describing what went wrong