Tuqo Stats API

Server-side analytics of site traffic.

GitHub OpenAPI

Operations 2

GET /api/v1/sites/{id}/stats Get site analytics: daily series and totals #
GET /api/v1/sites/{id}/stats/tops Get top lists for a period #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/tuqo-ru:tuqo-ru-stats-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

tuqo-ru-stats-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Tuqo Ru Stats API
  version: '2026-11-14'
  contact:
    name: Tuqo Support
    url: https://tuqo.ru/support/
  license:
    name: Tuqo Public Offer
    url: https://tuqo.ru/legal/offer/
  termsOfService: https://tuqo.ru/legal/
  description: 'Operations tagged stats across 2 of this provider''s published API definitions: openapi.json, tuqo-ru-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.tuqo.ru
  description: Production
security:
- apiKey: []
tags:
- name: Stats
  description: Server-side analytics of site traffic.
paths:
  /api/v1/sites/{id}/stats:
    get:
      tags:
      - Stats
      operationId: get_site_stats
      summary: 'Get site analytics: daily series and totals'
      description: Server-side analytics (no cookies, no scripts). `human_*` — after bot filters; without the prefix — all requests (plan traffic is counted by these). Plus form submissions and deploys per day and ready-made `totals`.
      x-scope: readonly
      x-permission: 'stats: view'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Site id (UUID). The site must belong to the key's project, otherwise 404.
      - name: days
        in: query
        required: false
        schema:
          type: integer
          default: 7
          minimum: 1
          maximum: 365
        description: Period in days from today (Moscow time). Values outside 1–365 are silently clamped. Ignored if from or to is set.
      - name: from
        in: query
        required: false
        schema:
          type: string
          format: date
        description: Start of the period, Moscow date inclusive (YYYY-MM-DD). Clamped to [today−364, today].
      - name: to
        in: query
        required: false
        schema:
          type: string
          format: date
        description: End of the period, inclusive. Swapped bounds are reordered.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
    servers:
    - url: https://api.tuqo.ru
      description: Production
  /api/v1/sites/{id}/stats/tops:
    get:
      tags:
      - Stats
      operationId: get_site_stats_tops
      summary: Get top lists for a period
      description: Pages, referrers, downloads, 404s, devices (top 20 per kind; rows with fewer than 5 hits are hidden to protect visitors of small sites) and bot filter reasons (`filtered`, no threshold).
      x-scope: readonly
      x-permission: 'stats: view'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Site id (UUID). The site must belong to the key's project, otherwise 404.
      - name: days
        in: query
        required: false
        schema:
          type: integer
          default: 7
          minimum: 1
          maximum: 365
        description: Period in days from today (Moscow time). Values outside 1–365 are silently clamped. Ignored if from or to is set.
      - name: from
        in: query
        required: false
        schema:
          type: string
          format: date
        description: Start of the period, Moscow date inclusive (YYYY-MM-DD). Clamped to [today−364, today].
      - name: to
        in: query
        required: false
        schema:
          type: string
          format: date
        description: End of the period, inclusive. Swapped bounds are reordered.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
    servers:
    - url: https://api.tuqo.ru
      description: Production
components:
  schemas:
    StatsTotals:
      type: object
      properties:
        requests:
          type: integer
        page_views:
          type: integer
        human_page_views:
          type: integer
        bytes:
          type: integer
        human_bytes:
          type: integer
        visitors_daily_sum:
          type: integer
          description: Sum of daily uniques (cross-day uniqueness is impossible by construction).
        human_visitors_daily_sum:
          type: integer
        status_4xx:
          type: integer
        status_5xx:
          type: integer
      required:
      - requests
      - page_views
      - human_page_views
      - bytes
      - human_bytes
      - visitors_daily_sum
      - human_visitors_daily_sum
      - status_4xx
      - status_5xx
    DayCount:
      type: object
      properties:
        day:
          type: string
          format: date
        count:
          type: integer
      required:
      - day
      - count
    StatsResponse:
      type: object
      properties:
        from:
          type: string
          format: date
        to:
          type: string
          format: date
        totals:
          $ref: '#/components/schemas/StatsTotals'
        forms_total:
          type: integer
          description: Submissions for the period (excluding spam).
        series:
          type: array
          items:
            $ref: '#/components/schemas/DayRow'
        forms:
          type: array
          items:
            $ref: '#/components/schemas/DayCount'
          description: Submissions per day.
        deploys:
          type: array
          items:
            $ref: '#/components/schemas/DayCount'
          description: Deploys per day.
        note:
          type: string
      required:
      - from
      - to
      - totals
      - forms_total
      - series
      - forms
      - deploys
      - note
    TopsResponse:
      type: object
      properties:
        from:
          type: string
          format: date
        to:
          type: string
          format: date
        tops:
          type: array
          items:
            $ref: '#/components/schemas/TopRow'
          description: 'Top 20 per kind: page, referrer, download, missing (404), device; rows with fewer than min_hits are hidden.'
        filtered:
          type: array
          items:
            $ref: '#/components/schemas/TopRow'
          description: Bot filter reasons (kind=filtered), no threshold.
        min_hits:
          type: integer
          description: Small-number suppression threshold (5).
        note:
          type: string
      required:
      - from
      - to
      - tops
      - filtered
      - min_hits
      - note
    DayRow:
      type: object
      properties:
        day:
          type: string
          format: date
        requests:
          type: integer
        page_views:
          type: integer
        bytes:
          type: integer
        uniques:
          type: integer
        human_page_views:
          type: integer
        human_bytes:
          type: integer
        human_uniques:
          type: integer
        status_4xx:
          type: integer
        status_5xx:
          type: integer
      required:
      - day
      - requests
      - page_views
      - bytes
      - uniques
      - human_page_views
      - human_bytes
      - human_uniques
      - status_4xx
      - status_5xx
      description: Daily row (Moscow day). Days without traffic are zeros.
    Error:
      type: object
      properties:
        message:
          type: string
          description: 'Human-readable error message in the language of the `Accept-Language` header: English for `en`, otherwise Russian.'
      required:
      - message
      description: 'Common REST API error format: `{"message": "..."}`. Codes: 400 — invalid data (validation), 401 — key missing/invalid/revoked/expired, 402 — the feature or limit requires a paid plan/option, 403 — the key lacks the permission named in the message, or the site is outside the key''s list, 404 — resource not found or belongs to another project (resources of other projects are indistinguishable from missing ones), 409 — state conflict (subdomain taken, storage quota, deploy cannot be activated, etc.), 429 — rate limit exceeded (deploys per day, the 60-deploys-per-hour-per-site guard against runaway scripts, build minutes, DNS checks), 500 — internal error, 503 — service/storage unavailable.'
      example:
        message: not found
    TopRow:
      type: object
      properties:
        kind:
          type: string
          enum:
          - page
          - referrer
          - download
          - missing
          - device
          - filtered
        key:
          type: string
        hits:
          type: integer
      required:
      - kind
      - key
      - hits
  responses:
    Forbidden:
      description: 'Not allowed. For a key with section permissions the message names the missing permission (for example “Form submissions: read”) or the site outside the key''s list; the project owner or an administrator changes permissions in Tuqo → project → AI & API without reissuing the key. Older keys get the previous text (“insufficient permissions”). Also returned for a blocked account or site.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: insufficient permissions
    Unauthorized:
      description: 'Missing/invalid `Authorization: Bearer tqk_...` header, key revoked or expired. After 30 failed attempts from one IP within 60 s — 401 without checking the key.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: 'Authorization: Bearer tqk_... header is required'
    InternalError:
      description: Internal error (database, Redis, S3).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: internal error
    NotFound:
      description: 'Resource not found or belongs to another project (tenant isolation: resources of other projects are indistinguishable from missing ones).'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: not found
    BadRequest:
      description: 'Invalid data: body/parameter validation failed (JSON error `{message}`). axum also returns 400 as text/plain for syntactically invalid JSON, an invalid UUID in the path or invalid query parameters.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: site name is required
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: tqk_<prefix>_<secret>
      description: 'Project API key in the `tqk_<prefix>_<secret>` format — issued in the panel app.tuqo.ru on the project''s “AI & API” tab (shown once). Passed in the `Authorization: Bearer tqk_...` header. Permissions are set per key by section — create_sites, delete_sites (true/false), code, content, leads, visitors, domains (none/view/edit), stats (none/view) — and by site (all project sites or selected ones); presets: full, developer, content, crm, readonly. The permission each operation needs is in the `x-permission` extension; `GET /api/v1/whoami` returns the key''s own (`access`). Older keys (`access.legacy = true`) are checked by their scope: `full` ⊃ `editor` ⊃ `readonly`, the level is in `x-scope`. A key is bound to ONE project; projects, keys, members and billing are managed only in the panel.'
x-refined-from:
- openapi.json
- tuqo-ru-openapi.json