---
title: "Link statistics"
method: GET
path: "/link/{linkId}"
tags: ["link"]
---

# Link statistics

`GET /link/{linkId}`

## Request

- Base URL: `https://statistics.short.io/statistics`
- URL: `https://statistics.short.io/statistics/link/{linkId}`
- Auth: API key in header `Authorization`

Returns detailed statistics for link in given period

## Path parameters

- `linkId` string, required

## Query parameters

- `period` 'custom' | 'today' | 'yesterday' | 'total' | 'week' | 'month' | 'lastmonth' | 'last7' | 'last30'
- `tz` string
- `startDate` string, date
- `endDate` string, date
- `skipTops` boolean
- `clicksChartInterval` 'hour' | 'day' | 'week' | 'month'

## Response `200`

link statistics

- LinkStatistics
  - `totalClicks` number, required: Total clicks number in interval
  - `humanClicks` number, required: Human clicks number in interval
  - `interval` Interval
    - `startDate` string, date-time: Start of the time interval for statistics
    - `endDate` string, date-time: End of the time interval for statistics
    - `prevStartDate` string, date-time: Start of the previous time interval for statistics
    - `prevEndDate` string, date-time: End of the previous time interval for statistics
  - `totalClicksChange` string: Difference between old number of clicks in previous and current period
  - `humanClicksChange` string: Difference between old number of human clicks in previous and current period
  - `clickStatistics` ClickStatistics
    - `datasets` Dataset[]
      - `data` DatasetItem[]
        - `y` number, required
        - `x` string, date, required
  - `referer` Referrer[]
    - `score` number, required
    - `referer` string, required
  - `social` Social[]
    - `score` number, required
    - `social` string, required
  - `browser` Browser[]
    - `score` number, required
    - `browser` string, required
  - `country` Country[]
    - `score` number, required
    - `country` string, required
    - `countryName` string, required
  - `city` City[]
    - `score` number
    - `city` string: Geoname ID of the city
    - `name` string: City name
    - `countryCode` string: Country code
  - `os` OS[]
    - `score` number
    - `os` string, required

---

[API](https://skmtc.dev/short/apis/statistics-api.md) - [All operations](https://skmtc.dev/short/apis/statistics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/short/apis/statistics-api/revisions/b87df490eedc?raw)
