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

# Log Search Click

> Implicit relevance signal: which result a user actually opened, at
what rank and lane. Rides the existing PostHog pipe (search_result_clicked,
unchanged) for CTR analytics, AND now also writes to search_click_logs —
the first time click events land in Postgres — so the adaptive threshold
tuning job (core/threshold_tuning.py) has a queryable source with no
external API dependency. The Postgres write is fail-open: it enriches the
click signal but must never turn a click into a failed request.



## OpenAPI

````yaml /openapi.json post /v1/search/click
openapi: 3.1.0
info:
  title: Pureframe API
  version: v1
  description: >-
    The Pureframe API lets you upload videos, index them for semantic search,
    and retrieve timestamped clips matching text queries or reference images.
    All endpoints require a Bearer API key (`Authorization: Bearer pf_...`).
  contact:
    url: https://pureframe.ai
    email: hello@pureframe.ai
  x-logo:
    url: https://pureframe.ai/logo.png
servers:
  - url: https://api.pureframe.ai
    description: Production
security: []
tags: []
paths:
  /v1/search/click:
    post:
      tags:
        - Search
      summary: Log Search Click
      description: >-
        Implicit relevance signal: which result a user actually opened, at

        what rank and lane. Rides the existing PostHog pipe
        (search_result_clicked,

        unchanged) for CTR analytics, AND now also writes to search_click_logs —

        the first time click events land in Postgres — so the adaptive threshold

        tuning job (core/threshold_tuning.py) has a queryable source with no

        external API dependency. The Postgres write is fail-open: it enriches
        the

        click signal but must never turn a click into a failed request.
      operationId: log_search_click_v1_search_click_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchClickRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_NoneType_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SearchClickRequest:
      properties:
        search_id:
          type: string
          title: Search Id
        video_id:
          type: string
          title: Video Id
        timestamp_start:
          type: number
          title: Timestamp Start
        rank:
          type: integer
          title: Rank
        result_type:
          type: string
          title: Result Type
        raw_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Raw Score
        threshold_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Threshold Key
      type: object
      required:
        - search_id
        - video_id
        - timestamp_start
        - rank
        - result_type
      title: SearchClickRequest
    ApiResponse_NoneType_:
      properties:
        data:
          type: 'null'
          title: Data
        meta:
          $ref: '#/components/schemas/Meta'
      type: object
      required:
        - data
        - meta
      title: ApiResponse[NoneType]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Meta:
      properties:
        request_id:
          type: string
          title: Request Id
        took_ms:
          type: number
          title: Took Ms
        total:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total
        page:
          anyOf:
            - type: integer
            - type: 'null'
          title: Page
        per_page:
          anyOf:
            - type: integer
            - type: 'null'
          title: Per Page
        facets:
          anyOf:
            - additionalProperties:
                additionalProperties:
                  type: integer
                type: object
              type: object
            - type: 'null'
          title: Facets
      type: object
      required:
        - request_id
        - took_ms
      title: Meta
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````