---
title: "Get click analytics"
method: GET
path: "/api/v1/workspace/{workspace_id}/clicks"
tags: ["Clicks"]
---

# Get click analytics

`GET /api/v1/workspace/{workspace_id}/clicks`

## Request

- Base URL: `https://api.linklyhq.com`
- URL: `https://api.linklyhq.com/api/v1/workspace/{workspace_id}/clicks`
- Auth: API key in query parameter `api_key`
- TypeScript: <https://skmtc.dev/linklyhq/apis/linkly-url-shortener-api/docs/api/v1/workspace/:workspace_id/clicks/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve click analytics for a workspace. Filter by link, date range, country, and more. Returns time-series data suitable for charting.

## Path parameters

- `workspace_id` string, required

## Query parameters

- `link_id` string
- `link_ids` string
- `start` string
- `end` string
- `country` string
- `browser` string
- `platform` string
- `referer` string
- `isp` string
- `bots` boolean
- `unique` boolean
- `format` 'json' | 'csv' | 'tsv'
- `pivot` 'link_id'
- `timezone` string
- `frequency` 'day' | 'hour'

## Response `200`

Click

- object: Response schema for Clicks
  - `traffic` object[]
    - `t` string: Start of the bucket. `YYYY-MM-DD` when `frequency=day`; `YYYY-MM-DDTHH:MM:SS` when `frequency=hour`.
    - `y` integer, nullable: Click count for the bucket.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Error

## Changes

- **2026-09-15** `9c5b6c116b85`: 1 breaking
  - the `traffic/items/t` response's property format changed from `date` to no format for status `200`
- **2026-08-20** `351c1f004617`: 1 info
  - added the non-success response with the status `400`

[Operation history](https://skmtc.dev/linklyhq/apis/linkly-url-shortener-api/changes/api/v1/workspace/:workspace_id/clicks/get.md)

---

[API](https://skmtc.dev/linklyhq/apis/linkly-url-shortener-api.md) - [All operations](https://skmtc.dev/linklyhq/apis/linkly-url-shortener-api/llms.txt) - [OpenAPI document](https://skmtc.dev/linklyhq/apis/linkly-url-shortener-api/revisions/968598ef7055?raw)
