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

# Search videos

> Search uploads in a collection using optional text (`q`) on the video title (`ILIKE`, so `%` and `_` in `q` are wildcards), optional `folder_id`, and optional tag **slugs** (OR semantics). Requires `collection_id` for the collection to search. Authenticates with the same API key as other v1 routes. JSON responses use **camelCase** property names (same convention as the upload endpoint).

Search processed videos inside a **collection** using optional title text, folder, and tag slugs. Use the same API key authentication as the upload endpoint.

Each video object excludes internal tenant identifiers (`authorId`, `collectionId`, `organizationId`), R2 storage keys, upload batch metadata (`uploadBatchId`, `uploadOrder`), and transcription regeneration status fields; see the OpenAPI schema for the exact response shape.


## OpenAPI

````yaml GET /videos/search
openapi: 3.0.3
info:
  title: Nivo public API
  version: 1.0.0
  description: >-
    Public API for Nivo: upload requests from URLs, and searching videos within
    a collection.
servers:
  - url: https://app.nivo.video/api/v1
    description: Production server
security: []
paths:
  /videos/search:
    get:
      summary: Search videos
      description: >-
        Search uploads in a collection using optional text (`q`) on the video
        title (`ILIKE`, so `%` and `_` in `q` are wildcards), optional
        `folder_id`, and optional tag **slugs** (OR semantics). Requires
        `collection_id` for the collection to search. Authenticates with the
        same API key as other v1 routes. JSON responses use **camelCase**
        property names (same convention as the upload endpoint).
      operationId: searchVideos
      parameters:
        - name: collection_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
          description: >-
            Collection to search within (must belong to the organization for the
            API key).
        - name: q
          in: query
          required: false
          schema:
            type: string
          description: >-
            Case-insensitive substring match on the video title. `%` and `_` act
            as SQL LIKE wildcards.
        - name: folder_id
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: >-
            Optional folder UUID. Unknown or out-of-collection folders yield an
            empty `videos` array (not 404).
        - name: tags
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
          description: >-
            Tag slug per query key; repeat the parameter for multiple slugs
            (e.g. `tags=foo&tags=bar`). Same semantics as an array in
            `URLSearchParams`. Slugs are scoped to your organization. OR
            semantics across listed tags. Empty values are ignored. Unknown
            slugs yield 400.
        - name: page_index
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
          description: Zero-based page index.
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
          description: Page size (1–100).
        - name: sort_by
          in: query
          required: false
          schema:
            type: string
            enum:
              - title
              - duration
              - size_in_bytes
          description: >-
            Optional sort field. When omitted, results are ordered by
            `created_at` descending.
        - name: sort_order
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
          description: Sort direction when `sort_by` is set. Default `asc`.
      responses:
        '200':
          description: Search results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoSearchResponse'
        '400':
          description: Validation failed or unknown tag slug(s)
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - $ref: '#/components/schemas/UnknownTagSlugsResponse'
        '401':
          description: Unauthorized - invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  summary: Missing or invalid API key
                  value:
                    message: Unauthorized.
        '404':
          description: Collection not found for this API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                collection_not_found:
                  summary: Unknown or other-tenant collection
                  value:
                    message: Collection not found.
        '500':
          description: Unexpected server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    VideoSearchResponse:
      type: object
      required:
        - videos
        - pageCount
        - amountOfUploads
      properties:
        videos:
          type: array
          items:
            $ref: '#/components/schemas/VideoSearchItem'
        pageCount:
          type: integer
          description: Total pages for the current page_size.
        amountOfUploads:
          type: integer
          description: Total number of matching videos (distinct uploads).
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Error message describing what went wrong.
          example: Validation failed
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: >-
            Detailed validation errors by field (only present for validation
            failures).
          example:
            url:
              - Invalid url
            collection_id:
              - Invalid uuid
    UnknownTagSlugsResponse:
      type: object
      required:
        - message
        - invalidSlugs
      properties:
        message:
          type: string
          example: Unknown tag slug(s).
        invalidSlugs:
          type: array
          items:
            type: string
          description: Slugs that did not match any tag for your organization.
    VideoSearchItem:
      type: object
      description: >-
        Upload (video) as returned by the search API (camelCase). Internal
        identifiers (`authorId`, `collectionId`, `organizationId`), storage
        keys, batch/order fields, and transcription-regeneration fields are not
        included.
      properties:
        id:
          type: string
          format: uuid
        duration:
          type: integer
        title:
          type: string
        description:
          type: string
          nullable: true
        folderId:
          type: string
          format: uuid
          nullable: true
        externalProviderId:
          type: string
          nullable: true
        externalStatus:
          type: string
          nullable: true
        externalStreamUrl:
          type: string
          nullable: true
        hlsPlaylistUrl:
          type: string
          nullable: true
        processedAt:
          type: string
          format: date-time
          nullable: true
        sizeInBytes:
          type: integer
        language:
          type: string
        requestedDeletionAt:
          type: string
          format: date-time
          nullable: true
        metadata:
          type: object
          additionalProperties:
            type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        author:
          $ref: '#/components/schemas/VideoSearchAuthor'
    VideoSearchAuthor:
      type: object
      properties:
        name:
          type: string
          nullable: true
        image:
          type: string
          nullable: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key for authentication. Include your company's API key in the
        Authorization header.

````