---
title: "Get analytics for a short URL"
method: GET
path: "/short-url/{shortCode}/analytics"
tags: ["Analytics"]
---

# Get analytics for a short URL

`GET /short-url/{shortCode}/analytics`

## Request

- Base URL: `https://api.qrcodly.de/api/v1`
- URL: `https://api.qrcodly.de/api/v1/short-url/{shortCode}/analytics`
- Auth: HTTP bearer

Returns detailed analytics for a short URL: pageviews, unique visitors, sessions, bounce rate, time-series data, and breakdowns by browser, operating system, device type, and country. Only the owner can access analytics for their short URLs.

## Path parameters

- `shortCode` string, required

## Response `200`

Default Response

- object
  - `shortUrlStats` object, required: Aggregate statistics for the short URL
    - `pageviews` number, required: Total number of pageviews
    - `visitors` number, required: Total number of unique visitors
    - `visits` number, required: Total number of visits (sessions)
    - `bounces` number, required: Total number of bounce visits (single-page sessions)
    - `totaltime` number, required: Total time spent across all visits in seconds
  - `viewsAndSessions` object, required: Time-series data for pageviews and sessions
    - `pageviews` object[], required: Time-series of daily pageview counts
      - `date` string, required: Date label for this data point (e.g. "2025-06-15")
      - `value` number, required: Numeric value for this data point
    - `sessions` object[], required: Time-series of daily session counts
      - `date` string, required: Date label for this data point (e.g. "2025-06-15")
      - `value` number, required: Numeric value for this data point
  - `browserMetrics` object[], required: Click breakdown by browser (e.g. Chrome, Firefox, Safari)
    - `label` string, required: Metric category label (e.g. browser name, country code)
    - `count` number, required: Number of occurrences for this category
  - `osMetrics` object[], required: Click breakdown by operating system (e.g. Windows, macOS, Android)
    - `label` string, required: Metric category label (e.g. browser name, country code)
    - `count` number, required: Number of occurrences for this category
  - `deviceMetrics` object[], required: Click breakdown by device type (e.g. desktop, mobile, tablet)
    - `label` string, required: Metric category label (e.g. browser name, country code)
    - `count` number, required: Number of occurrences for this category
  - `countryMetrics` object[], required: Click breakdown by country
    - `label` string, required: Metric category label (e.g. browser name, country code)
    - `count` number, required: Number of occurrences for this category

## Other responses

- `401`: Unauthorized — missing or invalid Bearer token.
- `403`: Forbidden — you do not have permission to access this resource.
- `404`: Not Found — the requested resource does not exist.
- `429`: Too Many Requests — rate limit exceeded. Retry after the rate limit window resets.

---

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