Derive Analytics API

Aggregate view statistics for an artifact.

Operations 2

POST /v1/artifacts/{shortId}/view Record a view of an artifact (de-duped; owner self-views excluded) #
GET /v1/artifacts/{shortId}/analytics View stats for an artifact (collaborators only) #

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/derive-to:derive-to-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

derive-to-analytics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Derive Analytics API
  version: 1.0.0
  description: 'Derive''s HTTP API. Every response shape here is the single source of truth for the web client — generated from the same Zod schemas that back this reference, so the docs never drift from the running API.


    **Auth:** a session cookie (browser) or a bearer token (agents and the CLI). Most write routes are scoped to the caller''s active workspace. The `/v1` paths are the stable product surface; `/openapi.json` serves this spec and `/docs` renders it.'
tags:
- name: Analytics
  description: Aggregate view statistics for an artifact.
paths:
  /v1/artifacts/{shortId}/view:
    post:
      tags:
      - Analytics
      summary: Record a view of an artifact (de-duped; owner self-views excluded)
      parameters:
      - schema:
          type: string
        required: true
        name: shortId
        in: path
      responses:
        '204':
          description: Recorded (or skipped as a dup / self-view / disabled).
      operationId: postV1ArtifactsByShortIdView
      x-operation-id-source: derived
  /v1/artifacts/{shortId}/analytics:
    get:
      tags:
      - Analytics
      summary: View stats for an artifact (collaborators only)
      parameters:
      - schema:
          type: string
        required: true
        name: shortId
        in: path
      responses:
        '200':
          description: Totals, per-version + daily counts, and recent distinct viewers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Analytics'
      operationId: getV1ArtifactsByShortIdAnalytics
      x-operation-id-source: derived
components:
  schemas:
    Analytics:
      type: object
      properties:
        total:
          type: number
          description: Total recorded views across all versions (de-duped opens)
        last24h:
          type: number
          description: Views in the trailing 24 hours. A rolling window rather than a calendar day, so it carries no timezone assumption about the reader
        unique:
          type: number
          description: Distinct viewers; a signed-in person or anon cookie counts once
        anonViewers:
          type: number
          description: How many of the unique viewers are anonymous
        reads:
          type: number
          description: Unique viewers who stayed, not just fetched (link previews do not count)
        perVersion:
          type: array
          items:
            type: object
            properties:
              version:
                type: number
              count:
                type: number
                description: Views recorded for that version
            required:
            - version
            - count
        daily:
          type: array
          items:
            type: object
            properties:
              day:
                type: string
                description: Calendar day bucket (YYYY-MM-DD)
              count:
                type: number
                description: Views recorded on that day
            required:
            - day
            - count
        recent:
          type: array
          items:
            type: object
            properties:
              viewer:
                type: string
                description: Display name (resolved @handle for users), or the anon viewer id
              kind:
                type: string
                enum:
                - user
                - anon
                description: Whether the viewer is a signed-in user or anonymous
              at:
                type: string
                description: When they last viewed (ISO timestamp)
              avatar:
                type:
                - string
                - 'null'
                description: The user's avatar URL, or null/absent for anonymous viewers
            required:
            - viewer
            - kind
            - at
      required:
      - total
      - last24h
      - unique
      - anonViewers
      - reads
      - perVersion
      - daily
      - recent