---
title: "Domain statistics"
method: GET
path: "/domain/{domainId}"
tags: ["domain"]
---

# Domain statistics

`GET /domain/{domainId}`

## Request

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

Returns detailed statistics for domain in given period

## Path parameters

- `domainId` integer, required

## Query parameters

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

## Response `200`

domain statistics

- DomainStatistics
  - `clicks` number, required: Total clicks number in interval
  - `humanClicks` number, required: Human clicks number in interval
  - `links` number, required: Number of links, created in interval
  - `linksChange` string: Difference between old number of links in previous and current period
  - `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
  - `linksChangePositive` boolean: true if in current period there were more links created
  - `clicksPerLink` string: Average number of clicks per link
  - `clicksPerLinkChange` string: Change of average number of clicks per link compared to previous period
  - `humanClicksPerLink` string: Average number of clicks per link, done by humans
  - `prevClicksChange` 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
  - `humanClicksChangePositive` boolean: true if in current period there were more clicks done
  - `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)
