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

# Retrieve statistics



## OpenAPI

````yaml GET /statistics
openapi: 3.0.1
info:
  title: SupaQR
  description: ''
  version: 1.0.0
servers:
  - url: https://api.supaqr.com
    description: 正式环境
security:
  - bearer: []
tags: []
paths:
  /statistics:
    get:
      tags: []
      summary: Retrieve statistics
      parameters:
        - name: groupBy
          in: query
          description: The parameter to group the statistics data points by.
          required: false
          schema:
            type: string
            enum:
              - count
              - time
              - link
              - link_type
              - destination
              - country
              - region
              - city
              - os
              - browser
              - device
              - referer
              - referer_url
              - utm_source
              - utm_medium
              - utm_campaign
              - utm_term
              - utm_content
            default: count
        - name: timezone
          in: query
          description: This field becomes required when groupBy = 'time'.
          required: false
          example: America/New_York
          schema:
            type: string
        - name: startTime
          in: query
          description: >-
            The start date and time  (ISO 8601 UTC timestamp) when to retrieve
            statistics from.Takes precedence over interval.
          required: false
          example: '2025-12-31T23:59:59Z'
          schema:
            type: string
            format: date-time
        - name: endTime
          in: query
          description: >-
            The end date and time  (ISO 8601 UTC timestamp) when to retrieve
            statistics from. If not provided, defaults to the current date.
            Takes precedence over interval.
          required: false
          example: '2025-12-31T23:59:59Z'
          schema:
            type: string
            format: date-time
        - name: interval
          in: query
          description: The interval to retrieve statistics for.
          required: false
          schema:
            type: string
            enum:
              - 24h
              - 7d
              - 30d
              - 90d
              - 180d
              - 1y
              - all
            default: 24h
        - name: domain
          in: query
          description: The domain to retrieve statistics for.
          required: false
          schema:
            type: string
            maxLength: 200
        - name: link
          in: query
          description: The url to retrieve statistics for.Takes precedence over domain.
          required: false
          example: iqr.im/example
          schema:
            type: string
        - name: linkType
          in: query
          description: The linkType to retrieve statistics for.
          required: false
          example: link
          schema:
            type: string
            enum:
              - link
              - document
              - file
              - vcard
              - landing-page
              - google-form
              - menu
              - app-stores
              - image
              - audio
              - video
              - wi-fi
              - email
              - map
              - whatsapp
              - text
              - sms
              - svg
              - code
        - name: tagNames
          in: query
          description: The tag Names to retrieve statistics for.
          required: false
          example:
            - example
          schema:
            type: array
            items:
              type: string
        - name: tagIds
          in: query
          description: >-
            The tag IDs to retrieve statistics for.Takes precedence over
            tagNames.
          required: false
          example:
            - eN1HdNU
          schema:
            type: array
            items:
              type: string
            minItems: 1
            maxItems: 50
        - name: continent
          in: query
          description: The continent to retrieve statistics for.
          required: false
          example: North America
          schema:
            type: string
            enum:
              - Africa
              - "\tAsia"
              - "\tEurope"
              - "\tNorth America"
              - "\tSouth America"
              - "\tOceania"
        - name: country
          in: query
          description: The country to retrieve statistics for.
          required: false
          example: United States
          schema:
            type: string
        - name: city
          in: query
          description: The city to retrieve statistics for.
          required: false
          example: New York
          schema:
            type: string
        - name: region
          in: query
          description: The region to retrieve statistics for.
          required: false
          example: California
          schema:
            type: string
        - name: device
          in: query
          description: The device to retrieve statistics for.
          required: false
          schema:
            type: string
            enum:
              - Desktop
              - "\tMobile"
              - "\tTablet"
              - "\tEmbedded"
              - "\tSmartTv"
              - "\tWearable"
              - "\tXR"
              - "\tOthers"
        - name: browser
          in: query
          description: The browser to retrieve statistics for.
          required: false
          schema:
            type: string
            enum:
              - Chrome
              - "\tEdge"
              - "\tSafari"
              - "\tFirefox"
              - "\tOpera"
              - "\tSamsung Internet"
              - "\tAndroid Browser"
              - "\tOthers"
        - name: os
          in: query
          description: The OS to retrieve statistics for.
          required: false
          schema:
            type: string
            enum:
              - IOS
              - "\tAndroid"
              - "\tWindows"
              - "\tMacOS"
              - "\tLinux"
              - "\tHarmonyOS"
              - "\tOther"
        - name: referer
          in: query
          description: The referer to retrieve statistics for.
          required: false
          schema:
            type: string
        - name: refererUrl
          in: query
          description: The full referer URL to retrieve statistics for.
          required: false
          schema:
            type: string
        - name: destination
          in: query
          description: The destination to retrieve statistics for.
          required: false
          schema:
            type: string
            maxLength: 200
        - name: utm_source
          in: query
          description: The UTM source of the link(QR code).
          required: false
          schema:
            type: string
            maxLength: 190
        - name: utm_medium
          in: query
          description: The UTM medium of the link(QR code).
          required: false
          schema:
            type: string
            maxLength: 190
        - name: utm_campaign
          in: query
          description: The UTM campaign of the link(QR code).
          required: false
          schema:
            type: string
            maxLength: 190
        - name: utm_term
          in: query
          description: The UTM term of the link(QR code).
          required: false
          schema:
            type: string
            maxLength: 190
        - name: utm_content
          in: query
          description: The UTM content of the link(QR code).
          required: false
          schema:
            type: string
            maxLength: 190
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      clicks:
                        type: integer
                    required:
                      - clicks
                    title: count
                  - type: object
                    properties:
                      startTime:
                        type: string
                      clicks:
                        type: integer
                    required:
                      - startTime
                      - clicks
                    title: time
                  - type: object
                    properties:
                      link:
                        type: string
                        title: ''
                      clicks:
                        type: integer
                    required:
                      - link
                      - clicks
                    title: link
                  - type: object
                    properties:
                      link_type:
                        type: string
                        title: ''
                      clicks:
                        type: integer
                    required:
                      - link_type
                      - clicks
                    title: link_type
                  - type: object
                    properties:
                      destination:
                        type: string
                      clicks:
                        type: integer
                    required:
                      - destination
                      - clicks
                    title: destination
                  - type: object
                    properties:
                      country:
                        type: string
                      clicks:
                        type: integer
                    required:
                      - country
                      - clicks
                    title: country
                  - type: object
                    properties:
                      region:
                        type: string
                      clicks:
                        type: integer
                    required:
                      - region
                      - clicks
                    title: region
                  - type: object
                    properties:
                      city:
                        type: string
                      clicks:
                        type: integer
                    required:
                      - city
                      - clicks
                    title: city
                  - type: object
                    properties:
                      os:
                        type: string
                      clicks:
                        type: integer
                    required:
                      - os
                      - clicks
                    title: os
                  - type: object
                    properties:
                      browser:
                        type: string
                      clicks:
                        type: integer
                    required:
                      - browser
                      - clicks
                    title: browser
                  - type: object
                    properties:
                      device:
                        type: string
                      clicks:
                        type: integer
                    required:
                      - device
                      - clicks
                    title: device
                  - type: object
                    properties:
                      referer:
                        type: string
                      clicks:
                        type: integer
                    required:
                      - referer
                      - clicks
                    title: referer
                  - type: object
                    properties:
                      referer_url:
                        type: string
                      clicks:
                        type: integer
                    required:
                      - referer_url
                      - clicks
                    title: referer_url
                  - type: object
                    properties:
                      utm_source:
                        type: string
                      clicks:
                        type: integer
                    required:
                      - utm_source
                      - clicks
                    title: utm_source
                  - type: object
                    properties:
                      utm_medium:
                        type: string
                      clicks:
                        type: integer
                    required:
                      - utm_medium
                      - clicks
                    title: utm_medium
                  - type: object
                    properties:
                      utm_campaign:
                        type: string
                      clicks:
                        type: integer
                    required:
                      - utm_campaign
                      - clicks
                    title: utm_campaign
                  - type: object
                    properties:
                      utm_term:
                        type: string
                      clicks:
                        type: integer
                    required:
                      - utm_term
                      - clicks
                    title: utm_term
                  - type: object
                    properties:
                      utm_content:
                        type: string
                      clicks:
                        type: integer
                    required:
                      - utm_content
                      - clicks
                    title: utm_content
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - bad_request
                    default: bad_request
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - unauthorized
                    default: unauthorized
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
        '403':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - forbidden
                    default: forbidden
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
        '422':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - parameter_error
                    default: parameter_error
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
        '429':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - rate_limit_exceeded
                    default: rate_limit_exceeded
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
        '500':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - internal_server_error
                    default: internal_server_error
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
      deprecated: false
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````