Scalar Analytics API

The analytics API from Scalar — 4 operation(s) for analytics.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /analytics/projects/{projectUid}/overview Get a docs project's analytics overview · Getanalytics projects project uid overview #
Ask an LLM
“What are the KPI totals and timeseries for my docs project?”
“Which consumer types are visiting my docs site, and how much traffic do they account for?”
Tell an agent
Show the analytics overview for docs project {projectUid} over {range}.
Summarize docs project {projectUid} for {range} at {granularity} granularity.
GET /analytics/projects/{projectUid}/pages List a docs project's most viewed pages · Getanalytics projects project uid pages #
Ask an LLM
“Which pages on my docs site get the most views?”
“Can I limit the top pages report to a certain number of entries?”
Tell an agent
List the top {limit} pages for docs project {projectUid} over {range}.
Show {limit} most-viewed pages of {projectUid} in {range}.
GET /analytics/projects/{projectUid}/referrers List a docs project's top referrers · Getanalytics projects project uid referrers #
Ask an LLM
“Where are visitors to my docs site coming from?”
“Can I cap the top referrers list to a number of sources?”
Tell an agent
List the top {limit} referrers for docs project {projectUid} over {range}.
Show {limit} sources sending traffic to {projectUid} in {range}.
GET /analytics/projects/{projectUid}/consumers Break down a docs project's visitors by type · Getanalytics projects project uid consumers #
Ask an LLM
“What share of my docs traffic comes from bots versus llms?”
“Can I see the consumer breakdown for a docs project over time?”
Tell an agent
Show the consumer breakdown for docs project {projectUid} over {range}.
Break down {projectUid} visitors by human, bot, llm and mcp for {range} at {granularity}.

Specifications

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/scalar:scalar-analytics-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

scalar-analytics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Scalar Analytics API
  contact:
    name: Marc from Scalar
    url: https://scalar.com
    email: support@scalar.com
  version: '1.0'
  description: 'Operations tagged analytics across 3 of this provider''s published API definitions: scalar-core.json, scalar-openapi.json, scalar-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.scalar.com/core
security:
- BearerAuth: []
tags:
- name: Analytics
paths:
  /analytics/projects/{projectUid}/overview:
    get:
      tags:
      - Analytics
      description: KPI totals + timeseries + consumer breakdown for a docs project
      operationId: getanalyticsProjectsProjectUidOverview
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  totals:
                    type: object
                    properties:
                      views:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      unique:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      human:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      bot:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      llm:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      mcp:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                    required:
                    - views
                    - unique
                    - human
                    - bot
                    - llm
                    - mcp
                    additionalProperties: false
                  timeseries:
                    type: array
                    items:
                      type: object
                      properties:
                        bucket:
                          type: string
                        human:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        bot:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        llm:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        mcp:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        unique:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                      required:
                      - bucket
                      - human
                      - bot
                      - llm
                      - mcp
                      - unique
                      additionalProperties: false
                required:
                - totals
                - timeseries
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400'
        '401':
          description: No auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404'
        '422':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422'
        '500':
          description: Uncaught error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
      parameters:
      - schema:
          $ref: '#/components/schemas/nanoid'
        in: path
        name: projectUid
        required: true
      - schema:
          default: 7d
          type: string
          enum:
          - 24h
          - 7d
          - 30d
          - 90d
        in: query
        name: range
        required: true
      - schema:
          type: string
          enum:
          - hour
          - day
        in: query
        name: granularity
        required: false
      summary: Getanalytics projects project uid overview
      x-summary-source: derived
  /analytics/projects/{projectUid}/pages:
    get:
      tags:
      - Analytics
      description: Top pages by views for a docs project
      operationId: getanalyticsProjectsProjectUidPages
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  pages:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        views:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        unique:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                      required:
                      - path
                      - views
                      - unique
                      additionalProperties: false
                required:
                - pages
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400'
        '401':
          description: No auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404'
        '422':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422'
        '500':
          description: Uncaught error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
      parameters:
      - schema:
          $ref: '#/components/schemas/nanoid'
        in: path
        name: projectUid
        required: true
      - schema:
          default: 7d
          type: string
          enum:
          - 24h
          - 7d
          - 30d
          - 90d
        in: query
        name: range
        required: true
      - schema:
          default: 20
          type: integer
          minimum: 1
          maximum: 100
        in: query
        name: limit
        required: true
      summary: Getanalytics projects project uid pages
      x-summary-source: derived
  /analytics/projects/{projectUid}/referrers:
    get:
      tags:
      - Analytics
      description: Top referrers for a docs project
      operationId: getanalyticsProjectsProjectUidReferrers
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  referrers:
                    type: array
                    items:
                      type: object
                      properties:
                        referrer:
                          type: string
                        views:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                      required:
                      - referrer
                      - views
                      additionalProperties: false
                required:
                - referrers
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400'
        '401':
          description: No auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404'
        '422':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422'
        '500':
          description: Uncaught error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
      parameters:
      - schema:
          $ref: '#/components/schemas/nanoid'
        in: path
        name: projectUid
        required: true
      - schema:
          default: 7d
          type: string
          enum:
          - 24h
          - 7d
          - 30d
          - 90d
        in: query
        name: range
        required: true
      - schema:
          default: 20
          type: integer
          minimum: 1
          maximum: 100
        in: query
        name: limit
        required: true
      summary: Getanalytics projects project uid referrers
      x-summary-source: derived
  /analytics/projects/{projectUid}/consumers:
    get:
      tags:
      - Analytics
      description: Consumer breakdown (human/bot/llm/mcp) for a docs project
      operationId: getanalyticsProjectsProjectUidConsumers
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  totals:
                    type: object
                    properties:
                      human:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      bot:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      llm:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      mcp:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                    required:
                    - human
                    - bot
                    - llm
                    - mcp
                    additionalProperties: false
                  timeseries:
                    type: array
                    items:
                      type: object
                      properties:
                        bucket:
                          type: string
                        human:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        bot:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        llm:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        mcp:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        unique:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                      required:
                      - bucket
                      - human
                      - bot
                      - llm
                      - mcp
                      - unique
                      additionalProperties: false
                required:
                - totals
                - timeseries
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400'
        '401':
          description: No auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404'
        '422':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422'
        '500':
          description: Uncaught error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
      parameters:
      - schema:
          $ref: '#/components/schemas/nanoid'
        in: path
        name: projectUid
        required: true
      - schema:
          default: 7d
          type: string
          enum:
          - 24h
          - 7d
          - 30d
          - 90d
        in: query
        name: range
        required: true
      - schema:
          type: string
          enum:
          - hour
          - day
        in: query
        name: granularity
        required: false
      summary: Getanalytics projects project uid consumers
      x-summary-source: derived
components:
  schemas:
    '401':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
    '404':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
    '422':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
    '403':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
    '500':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
    nanoid:
      type: string
      minLength: 5
    '400':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
    '401_2':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: Invalid authentication token.
        code: unauthorized
    '404_2':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: Resource not found.
        code: not-found
    '422_2':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: The request body contains invalid values.
        code: invalid-payload
    '403_2':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: You do not have permission to access this resource.
        code: forbidden
    '500_2':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: An unexpected error occurred.
        code: unknown
    nanoid_2:
      type: string
      minLength: 5
      examples:
      - UakgbKJ5m9gl0JDMbcJqL
    '400_2':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: Invalid request parameters.
        code: bad-request
    '401_3':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: Invalid authentication token.
        code: unauthorized
    '404_3':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: Resource not found.
        code: not-found
    '422_3':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: The request body contains invalid values.
        code: invalid-payload
    '403_3':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: You do not have permission to access this resource.
        code: forbidden
    '500_3':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: An unexpected error occurred.
        code: unknown
    nanoid_3:
      type: string
      minLength: 5
      examples:
      - UakgbKJ5m9gl0JDMbcJqL
    '400_3':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: Invalid request parameters.
        code: bad-request
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
x-refined-from:
- scalar-core.json
- scalar-openapi.json
- scalar-openapi.json