Typesense Analytics Events API

Log and retrieve user interaction events such as clicks, conversions, and visits for tracking search behavior and personalization.

GitHub OpenAPI

Operations 2

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

POST /analytics/events Log a search behavior event · Log An Analytics Event #
Ask an LLM
“How do I record a user click on a search result?”
“Can I log a conversion event with custom data?”
Tell an agent
Log a {type} event named {name} with data {data}.
Record a {type} event {name} tagged with {data}.
GET /analytics/events List search analytics events · Retrieve Analytics Events #
Ask an LLM
“Which clicks, conversions or visits have been logged?”
“Can I filter analytics events by type?”
Tell an agent
List analytics events of type {type}.
Show all logged search behavior events.

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/typesense:typesense-analytics-events-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

typesense-analytics-events-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Typesense Analytics Analytics Events API
  description: The Typesense Analytics API allows developers to track and analyze search behavior by recording click, conversion, and visit events. It provides endpoints for creating analytics rules, logging events with metadata tags, and retrieving popular queries and queries with no results. This data can be used to improve search relevance through query suggestions, curations, and understanding user search patterns.
  version: '30.1'
  contact:
    name: Typesense Support
    url: https://typesense.org/support
  license:
    name: GPL-3.0
    url: https://www.gnu.org/licenses/gpl-3.0.html
  termsOfService: https://typesense.org/terms
servers:
- url: '{protocol}://{hostname}:{port}'
  description: Typesense Server
  variables:
    protocol:
      default: http
      enum:
      - http
      - https
    hostname:
      default: localhost
    port:
      default: '8108'
security:
- api_key_header: []
tags:
- name: Analytics Events
  description: Log and retrieve user interaction events such as clicks, conversions, and visits for tracking search behavior and personalization.
paths:
  /analytics/events:
    post:
      operationId: createAnalyticsEvent
      summary: Log An Analytics Event
      description: Logs a user interaction event such as a click, conversion, or visit. Events are associated with search queries and documents to track user behavior and improve relevance.
      tags:
      - Analytics Events
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnalyticsEventCreateSchema'
      responses:
        '201':
          description: Event logged successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsEventCreateResponse'
        '400':
          description: Bad request - invalid event data
        '401':
          description: Unauthorized
    get:
      operationId: listAnalyticsEvents
      summary: Retrieve Analytics Events
      description: Retrieves logged analytics events. Supports filtering by event type and other criteria.
      tags:
      - Analytics Events
      parameters:
      - name: type
        in: query
        description: Filter events by type (click, conversion, visit).
        schema:
          type: string
          enum:
          - click
          - conversion
          - visit
      responses:
        '200':
          description: List of analytics events
          content:
            application/json:
              schema:
                type: object
                properties:
                  events:
                    type: array
                    items:
                      $ref: '#/components/schemas/AnalyticsEvent'
        '401':
          description: Unauthorized
components:
  schemas:
    AnalyticsEvent:
      type: object
      properties:
        type:
          type: string
          description: Event type.
        name:
          type: string
          description: Event name.
        data:
          type: object
          description: Event data payload.
        timestamp:
          type: integer
          format: int64
          description: Unix timestamp of the event.
    AnalyticsEventCreateResponse:
      type: object
      properties:
        ok:
          type: boolean
          description: Whether the event was logged successfully.
    AnalyticsEventCreateSchema:
      type: object
      required:
      - type
      - name
      - data
      properties:
        type:
          type: string
          description: Type of event being logged.
          enum:
          - click
          - conversion
          - visit
          - custom
        name:
          type: string
          description: Name of the event, matching an analytics rule event name.
        data:
          type: object
          description: Event data payload.
          properties:
            q:
              type: string
              description: The search query associated with this event.
            doc_id:
              type: string
              description: ID of the document the user interacted with.
            user_id:
              type: string
              description: ID of the user who triggered the event.
            position:
              type: integer
              description: Position of the document in search results.
  securitySchemes:
    api_key_header:
      type: apiKey
      in: header
      name: X-TYPESENSE-API-KEY
      description: API key for authenticating requests to the Typesense server.
externalDocs:
  description: Typesense Analytics Documentation
  url: https://typesense.org/docs/30.1/api/analytics-query-suggestions.html