# Current Users

GET /api/v2/projects/{projectId}/analytics/current-users

Counts visitors seen in the last `minutes` minutes: the live-visitors number. Optional filters narrow the count to a segment (country, device, browser, UTM tags). Returns a single row holding the visit count.

## Request

- projectId: string, path, required — ID of the project to count visitors for.
- minutes: number, query, required — Size of the look-back window in minutes. A visitor counts as present if they were active within this many minutes of now.
- location: string, query — Only count visitors from this country name.
- device: string, query — Only count visitors on this device type, e.g. `mobile`.
- browser: string, query — Only count visitors on this browser, e.g. `Chrome`.
- referrer: string, query — Only count visitors with this exact referrer URL.
- utmSource: string, query — Only count visitors tagged with this `utm_source`.
- utmMedium: string, query — Only count visitors tagged with this `utm_medium`.
- utmCampaign: string, query — Only count visitors tagged with this `utm_campaign`.
- utmTerm: string, query — Only count visitors tagged with this `utm_term`.
- utmContent: string, query — Only count visitors tagged with this `utm_content`.
- utmAdId: string, query — Only count visitors attributed to this ad ID.

## Response

- 200: Successful response
  - data: object[], required
    - visits: number, required
  - meta: object[], required
    - name: string, required
    - type: string, required
  - rows: number, required
  - statistics: object, required
    - bytes_read: number, required
    - elapsed: number, required
    - rows_read: number, required
  - usage: object, required
    - cost: number, required
    - duration: number
    - metricCount: number
- 400: Invalid input data
- 401: Authorization not provided
- 403: Insufficient access
- 404: Not found
- 500: Internal server error
