> ## Documentation Index
> Fetch the complete documentation index at: https://docs.h0p.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Get statistics overview

> Retrieve analytics grouped by dimension (country, device, browser, etc.). Filter by short links, domains, folders, or tags.

**Multiple dimensions available:** Geographic (city, region, country, continent), Technology (device, browser, os, lang), Traffic (referer, UTM params), Other (qrCode, destination, shortLinks)



## OpenAPI

````yaml https://api.h0p.co/doc get /stats/overview
openapi: 3.0.0
info:
  version: 0.0.3
  title: h0p API
  description: >-
    # h0p URL Shortener API


    A modern, feature-rich URL shortener API with advanced analytics, custom
    domains, QR codes, and comprehensive link management capabilities.


    ## Features


    - 🔗 **Short Link Management**: Create, update, and delete short links with
    custom slugs

    - 🌐 **Custom Domains**: Use your own domains with DNS verification and deep
    linking support

    - 📊 **Analytics**: Detailed click tracking with geolocation, device, and
    referrer data

    - 🎨 **QR Codes**: Generate customizable QR codes with branding options

    - 🏷️ **Organization**: Folders and tags for better link organization

    - 🔐 **Security**: Password protection, expiration dates, and click limits

    - 🎯 **Smart Rules**: Geographic, language, and device-based routing

    - 🪝 **Webhooks**: Real-time notifications for link events

    - 🔑 **API Keys**: Programmatic access with granular permissions

    - ⚡ **Rate Limiting**: Built-in protection against abuse


    ## Authentication


    This API supports two authentication methods:


    1. **Session Authentication**: Cookie-based authentication for web
    applications

    2. **API Key Authentication**: Header-based authentication for programmatic
    access


    See the security schemes section below for implementation details.


    ## Rate Limits


    - Free plan: 10 short links, 1 custom domain, 3 tags

    - Premium plan: unlimited short links, 100 custom domains, 100 tags, 100
    folders, advanced features


    ## Support


    For questions, feature requests, or bug reports, please contact
    support@h0p.co
  termsOfService: https://h0p.co/terms
  contact:
    name: h0p Support
    email: contact@h0p.co
servers:
  - url: https://api.h0p.co
    description: Production API server
security: []
tags:
  - name: Domain
    description: >-
      Custom domain management with DNS verification, QR templates, and deep
      linking support
  - name: Short Link
    description: >-
      Create and manage short links with advanced features like smart routing,
      password protection, and custom QR codes
  - name: Folder
    description: >-
      Organize short links into folders for better management and statistics
      tracking
  - name: Tag
    description: Categorize and filter short links using customizable tags
  - name: Files
    description: Upload images for QR codes, meta tags, and organization branding
  - name: Statistics
    description: >-
      Access detailed analytics grouped by geographic, device, and traffic
      dimensions
paths:
  /stats/overview:
    get:
      tags:
        - Statistics
      summary: Get statistics overview
      description: >-
        Retrieve analytics grouped by dimension (country, device, browser,
        etc.). Filter by short links, domains, folders, or tags.


        **Multiple dimensions available:** Geographic (city, region, country,
        continent), Technology (device, browser, os, lang), Traffic (referer,
        UTM params), Other (qrCode, destination, shortLinks)
      parameters:
        - schema:
            type: array
            example:
              - 01933eb8-541f-7000-a9f4-e4eee80ff04e
            description: Filter by specific short link UUIDs
          required: false
          description: Filter by specific short link UUIDs
          name: shortLinkIds
          in: query
        - schema:
            type: array
            example:
              - 01933eb8-541f-7000-a9f4-e4eee80ff04e
            description: Filter by domain UUIDs
          required: false
          description: Filter by domain UUIDs
          name: domainIds
          in: query
        - schema:
            type: array
            example:
              - 01933eb8-541f-7000-a9f4-e4eee80ff04e
            description: Filter by folder UUIDs
          required: false
          description: Filter by folder UUIDs
          name: folderIds
          in: query
        - schema:
            type: array
            example:
              - 01933eb8-541f-7000-a9f4-e4eee80ff04e
            description: Filter by tag UUIDs
          required: false
          description: Filter by tag UUIDs
          name: tagIds
          in: query
        - schema:
            type: string
            nullable: true
            format: date-time
            example: '2024-01-01T00:00:00Z'
            description: Start date for analytics range
          required: false
          description: Start date for analytics range
          name: startDate
          in: query
        - schema:
            type: string
            nullable: true
            format: date-time
            example: '2024-01-31T23:59:59Z'
            description: End date for analytics range
          required: false
          description: End date for analytics range
          name: endDate
          in: query
        - schema:
            type: string
            enum:
              - city
              - region
              - country
              - continent
              - lang
              - device
              - browser
              - os
              - referer
              - utmSource
              - utmMedium
              - utmCampaign
              - utmTerm
              - utmContent
              - qrCode
              - destination
              - shortLinks
              - uniqueVisitors
            description: Dimension to group results by
            example: country
          required: true
          description: Dimension to group results by
          name: groupBy
          in: query
        - schema:
            type: number
            minimum: 1
            maximum: 20
            example: 10
            description: Limit number of results
          required: false
          description: Limit number of results
          name: limit
          in: query
      responses:
        '200':
          description: Statistics overview retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        group:
                          type: string
                          nullable: true
                          example: United States
                          description: Group value for this statistic
                        count:
                          type: number
                          minimum: 0
                          example: 1247
                          description: Number of clicks for this group
                        coordinates:
                          type: object
                          properties:
                            lat:
                              type: number
                              example: 37.7749
                              description: Latitude coordinate
                            lng:
                              type: number
                              example: -122.4194
                              description: Longitude coordinate
                          required:
                            - lat
                            - lng
                          description: >-
                            Geographic coordinates (only when groupBy =
                            "country" or "city")
                        shortLink:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              example: 01933eb8-541f-7000-a9f4-e4eee80ff04e
                              description: Short link UUID
                            originUrl:
                              type: string
                              format: uri
                              example: https://links.example.com/summer-sale
                              description: Short URL
                            destination:
                              type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - link
                                    - mail
                                    - phone
                                  description: Destination type
                                value:
                                  type: string
                                  example: https://example.com/products
                                  description: Destination value
                              required:
                                - type
                                - value
                              description: Destination information
                          required:
                            - id
                            - originUrl
                            - destination
                          description: >-
                            Short link details (only when groupBy =
                            "shortLinks")
                      required:
                        - group
                        - count
                    description: Array of statistics grouped by dimension
                  totalClicks:
                    type: number
                    minimum: 0
                    example: 5234
                    description: Total clicks across all groups
                required:
                  - data
                  - totalClicks
                description: Statistics overview response
                example:
                  data:
                    - group: United States
                      count: 1247
                    - group: United Kingdom
                      count: 892
                    - group: Canada
                      count: 654
                  totalClicks: 5234
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: VALIDATION_ERROR
                    description: Machine-readable error code
                  message:
                    type: string
                    example: The provided slug is already in use
                    description: Human-readable error message
                required:
                  - code
        '403':
          description: Forbidden - Short links do not belong to user
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: VALIDATION_ERROR
                    description: Machine-readable error code
                  message:
                    type: string
                    example: The provided slug is already in use
                    description: Human-readable error message
                required:
                  - code
      security:
        - ApiKey: []
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API Key authentication for programmatic access.


        **How to use:**

        1. Create an API key from your dashboard settings

        2. Include the key in the `x-api-key` header with each request

        3. API keys have granular permissions (domains, shortLinks, files,
        stats, apiKeys)


        **Example:**

        ```

        curl -H "x-api-key: your-api-key-here"
        https://api.h0p.co/short-link/list

        ```


        **Types of API keys:**

        - **User keys**: Linked to your user account (one per organization)

        - **Bot keys**: Autonomous machine users (one per organization)


        **Security notes:**

        - Keep your API keys secure and never commit them to version control

        - API keys cannot access authentication endpoints (/auth/*)

        - Keys can be revoked at any time from the dashboard

````