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

# Search within videos



## OpenAPI

````yaml post /search/
openapi: 3.1.0
info:
  title: tl;dw
  version: 0.0.1
  x-logo:
    url: https://app.trytldw.ai/static/images/sidebar_logo.svg
    backgroundColor: transparent
    altText: tl;dw Logo
  contact:
    name: tl;dw Support
    url: https://app.trytldw.ai/support
  termsOfService: https://app.trytldw.ai/terms
  x-apisguru-categories:
    - video
    - ai
servers:
  - url: https://api.trytldw.ai/v1
security: []
tags:
  - name: Collection
    description: Collection
  - name: Video
    description: Media
  - name: Account
    description: Account
paths:
  /search/:
    post:
      tags:
        - Search Video Moments
      summary: Search within videos
      operationId: search_search__post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchParams'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResult'
        '400':
          description: Up to 200 videos can be queried at a time
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: no media ids provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SearchParams:
      properties:
        collection_id:
          type: string
          title: Collection Id
          description: The collection UUID to search within
          examples:
            - c1a2b3c4-1a2b-3c4d-5e6f-7g8h9i0j1k2l
        media_ids:
          items:
            type: string
          type: array
          title: Media Ids
          description: A list of media UUIDs to filter the search
          examples:
            - m1a2b3c4-1a2b-3c4d-5e6f-7g8h9i0j1k2l
        search_term:
          type: string
          title: Search Term
          description: The text query used for searching
          examples:
            - sunset beach
        similarity_threshold:
          type: number
          title: Similarity Threshold
          description: The minimum similarity score required to presented in search results
          default: 0.28
          examples:
            - 0.28
        offset:
          type: integer
          title: Offset
          description: The pagination offset for search results
          default: 0
          examples:
            - 10
        limit:
          type: integer
          title: Limit
          description: The maximum number of search results to return
          default: 30
          examples:
            - 30
        configs:
          $ref: '#/components/schemas/SearchConfigs'
          description: >-
            Additional configuration options for the search, such as removing
            false positives
        filter:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Filter
          description: >-
            Optional filters to apply to the search results. For now, it only
            supports matching value on metadata fields
          examples:
            - user_id: '1221'
      type: object
      required:
        - collection_id
        - search_term
      title: SearchParams
    SearchResult:
      properties:
        scenes:
          items:
            $ref: '#/components/schemas/Scene'
          type: array
          title: Scenes
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
      type: object
      required:
        - scenes
        - metadata
      title: SearchResult
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: ErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SearchConfigs:
      properties:
        smart_remove_false_positive:
          type: boolean
          title: Smart Remove False Positive
          default: false
      type: object
      title: SearchConfigs
    Scene:
      properties:
        media_id:
          type: string
          title: Media Id
        external_id:
          type: string
          title: External Id
        start_ms:
          type: number
          title: Start Ms
        end_ms:
          type: number
          title: End Ms
        max_similarity:
          type: number
          title: Max Similarity
        fragments:
          items:
            $ref: '#/components/schemas/Fragment'
          type: array
          title: Fragments
      type: object
      required:
        - media_id
        - external_id
        - start_ms
        - end_ms
        - max_similarity
        - fragments
      title: Scene
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Fragment:
      properties:
        uuid:
          type: string
          title: Uuid
        start_ms:
          type: number
          title: Start Ms
        end_ms:
          type: number
          title: End Ms
        similarity:
          type: number
          title: Similarity
        description:
          type: string
          title: Description
      type: object
      required:
        - uuid
        - start_ms
        - end_ms
        - similarity
        - description
      title: Fragment
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````