---
title: "Sampled clicks of a heatmap"
method: GET
path: "/v1/projects/{projectId}/heatmaps/{key}/clicks"
tags: ["Heatmaps"]
---

# Sampled clicks of a heatmap

`GET /v1/projects/{projectId}/heatmaps/{key}/clicks`

## Request

- Base URL: `https://hootlens-api-368877148687.us-east1.run.app`
- URL: `https://hootlens-api-368877148687.us-east1.run.app/v1/projects/{projectId}/heatmaps/{key}/clicks`
- Auth: HTTP bearer

A uniform random sample of the cohort's clicks, at most 2000. Recording IDs are included only for callers with the replay scope.

Required token scopes are listed in x-hootlens-scopes. A signed-in person needs the matching permission on the site instead (the viewer and editor roles are presets of the permissions).

## Path parameters

- `projectId` string, required: An identifier: 1 to 80 letters, digits, underscores or hyphens.
- `key` string, required

## Query parameters

- `limit` integer

## Response `200`

The sampled clicks.

- HeatmapClickSamples
  - `key` string, required
  - `total` integer, required: Every click in the cohort, including any recorded before sampling began.
  - `capacity` integer, required
  - `clicks` object[], required
    - `pageX` number, required
    - `pageY` number, required
    - `kind` 'click' | 'rage-click' | 'dead-click' | 'error-click', required
    - `timestamp` integer, required: Epoch milliseconds.
    - `label` string
    - `selector` string
    - `referrer` string
    - `utmSource` string
    - `locale` string
    - `variant` string
    - `deviceClass` 'desktop' | 'tablet' | 'mobile', required
    - `browser` string
    - `isNewVisitor` boolean
    - `recordingId` string: Present only with the replay scope.

## Other responses

- `400`: The request fields are invalid.
- `401`: The credential is missing, expired or revoked.
- `403`: The credential or the person's permissions on the site do not permit this action.
- `404`: The site, or the record inside it, does not exist or the caller is not a member (a non-member cannot tell the two apart).
- `429`: A rate limit or a per-site limit was reached.

---

[API](https://skmtc.dev/hootlens/apis/hoot-lens-api.md) · [All operations](https://skmtc.dev/hootlens/apis/hoot-lens-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hootlens/apis/hoot-lens-api/revisions/f64f8dc7b84e?raw)
