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

# Search Moments

> Search collection content (semantic / keyword / image)

<Info>
  **Product**: Video Datalake
  **Host**: `https://api.memories.ai/datalake/v1`
  **Auth**: `Authorization: sk-mai-...`
</Info>

Search indexed content in a collection and get back a list of **moments** (video slices). Supports `semantic` (vector), `keyword` (BM25), and `hybrid` (RRF) modes, plus text-to-frame and image-to-frame. Each result's `ref` can be fed straight into [Get Moment](/datalake/moments/get-moment).

<Note>
  **Pricing:** \$0.008 / call · See [Pricing](/datalake/pricing) for the full model.
</Note>

## Response Fields

<ResponseField name="results" type="array">Moment hits with `ref`, `score`, `snippet`, `thumbnail_url`.</ResponseField>
<ResponseField name="results[].ref" type="string">Feed into Get Moment to expand.</ResponseField>
<ResponseField name="results[].score" type="number">**Scale differs by path** (cosine / ts\_rank / RRF / sigmoid). Do not compare across requests.</ResponseField>
<ResponseField name="next_cursor" type="string">Next page (hybrid mode does not paginate — raise top\_k).</ResponseField>
<ResponseField name="hint" type="string">Human-readable suggestion when results are empty. Pass it back to the model.</ResponseField>

## Notes

Rate limit: 5 QPS/user.


## OpenAPI

````yaml POST /datalake/v1/search
openapi: 3.1.0
info:
  title: Memories.ai DataLake API 2.0
  version: 2026-08
  description: OpenAPI mapping used by Mintlify Try it for the DataLake API 2.0 docs.
servers:
  - url: https://api.memories.ai
security:
  - ApiKeyAuth: []
paths:
  /datalake/v1/search:
    post:
      tags:
        - Search
      summary: Search collection content (semantic / keyword / image)
      description: >-
        Search indexed content in a collection and get back a list of
        **moments** (video slices). Supports `semantic` (vector), `keyword`
        (BM25), and `hybrid` (RRF) modes, plus text-to-frame and image-to-frame.
        Each result's `ref` can be fed straight into [Get
        Moment](/datalake/moments/get-moment).
      operationId: search
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                collection_id:
                  type: string
                  description: Target collection (fixes vector model + data scope).
                query:
                  type: string
                  description: >-
                    Natural-language query (non-English is auto-translated). One
                    of query / query_images required.
                query_images:
                  type: array
                  items:
                    type: string
                  description: >-
                    1–10 http(s) image URLs; averaged with `query` when both
                    given.
                query_embedding:
                  type: array
                  items:
                    type: number
                  description: >-
                    Advanced: bring-your-own vector; must be 3072-dim
                    (OmniRetriever).
                mode:
                  type: string
                  description: '`semantic` (default) | `keyword` | `hybrid`.'
                  enum:
                    - semantic
                    - keyword
                    - hybrid
                targets:
                  type: array
                  items:
                    type: string
                    enum:
                      - caption
                      - transcription
                      - summary
                      - title
                      - frame_embedding
                      - event
                  description: Non-empty search targets.
                top_k:
                  type: integer
                  description: Page size, default 20, max 200.
                cursor:
                  type: string
                  description: >-
                    Next-page cursor; all other fields must match the first page
                    exactly.
                filter:
                  type: object
                  description: >-
                    Filter DSL (and/or/not + leaves: video_ids, tags, time,
                    captured_at, location, speaker_id, event_type).
                rerank:
                  type: boolean
                  description: >-
                    Cross-encoder rerank of the current page (text query only).
                    Billed ×3 when actually run.
                group_by:
                  type: string
                  description: '`moment` (default) | `video`.'
                  enum:
                    - moment
                    - video
              required:
                - collection_id
                - targets
              example:
                collection_id: col_xxx
                query: a woman talking to the camera
                mode: semantic
                targets:
                  - caption
                top_k: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                results:
                  - ref: vid_xxx@25.0-32.0
                    video_id: vid_xxx
                    target: caption
                    score: 0.61
                    start: 25
                    end: 32
                    snippet: The young woman, wearing headphones
                    thumbnail_url: https://storage.googleapis.com/…(15-min signed)
                next_cursor: PMRHC5...
                index_version: idx_2026_06
                embedding:
                  model: OmniRetriever
                  dimensions: 3072
                hint: null
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Send `Authorization: sk-mai-...`'

````