> ## 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.

# Combined Queries

> How Pureframe AI merges visual, transcript, scene, and text signals into one ranked result set.

By default, a search runs against every available signal at once and merges the results — you don't have to decide up front whether the moment you want is visual or spoken.

## The `modes` parameter

```
modes=["video", "transcript", "scene"]
```

This is the default. Pass a subset to restrict which signals are searched:

| Mode         | Matches segment type                                    |
| ------------ | ------------------------------------------------------- |
| `video`      | `frame` — visual frame embeddings                       |
| `transcript` | `transcript` — transcribed speech                       |
| `scene`      | `scene` — auto-detected scene labels at shot boundaries |

```bash theme={null}
# Visual and transcript only, skip scene labels
curl -X POST https://api.pureframe.ai/v1/search \
  -H "Authorization: Bearer pf_..." \
  -F "query=whiteboard diagram" \
  -F "modes=video" \
  -F "modes=transcript" \
  -F "collection_id=col_abc123"

  +-
```

Text visible in frame — signage, slide text, captions — is indexed separately as `ocr` segments and can also surface in results regardless of `modes`.

## How results merge

Visual and transcript search run concurrently, not sequentially, so combining modes doesn't cost you latency — total time is bounded by the slower of the two, not their sum (see [Performance](/production/performance)). Their ranked lists are merged with Reciprocal Rank Fusion (k=60): a segment can rank highly because it matched visually, because of what was said, or both.

## Filtering by scene label

Every video is automatically segmented at shot boundaries, and each shot gets zero or more auto-detected labels (e.g. `outdoor`, `whiteboard`, `person`). Pass `labels` to restrict results to segments carrying specific labels:

```bash theme={null}
curl -X POST https://api.pureframe.ai/v1/search \
  -H "Authorization: Bearer pf_..." \
  -F "query=demo" \
  -F "labels=whiteboard" \
  -F "collection_id=col_abc123"
```

The response's `meta.facets.scene_labels` field returns the count of every label present across the matched videos, so you can build filter UI without a separate request.

## Precedence when combining image and text

If you send both an `image` and a text `query` together, the request is no longer a pure "combined query" across modes — it's image-first with text re-scoring. See [Image Search](/search/image) for that blend.
