---
title: "Highlights"
method: POST
path: "/v1/fetch/search"
tags: ["Fetch"]
---

# Highlights

`POST /v1/fetch/search`

Use Highlights to search a previous Fetch by snapshotId without starting a new browser capture.

## Request body

- object — Request parameters for searching a previously captured Fetch snapshot.
  - `snapshotId` string, required — Snapshot ID returned by a previous Fetch response.
  - `search` object, required — Options for Highlights. When present, Fetch returns search results only.
    - `query` string, required — Query to find relevant snippets from the included Highlights corpus
    - `maxResults` integer — Maximum number of search snippets to return (1-50)
    - `minScore` number — Minimum relevance score threshold (0-1). Defaults to 0.6; set 0 to disable filtering.
  - `include` object — Search corpus include config. Defaults to Markdown and State JSON.
    - `html` union
      - boolean — Set to true to include HTML
      - object — Options for customizing HTML content extraction
    - `markdown` union
      - boolean — Set to true to include markdown
      - object — Options for customizing markdown content extraction
    - `screenshot` union
      - boolean — Set to true to include a screenshot
      - object — Options for customizing screenshot capture behavior
        - `fullPage` boolean — Whether to capture the full page including content below the fold
    - `links` union
      - boolean — Set to true to include links
      - object — Options for customizing link extraction
        - `sameDomainOnly` boolean — Only include links from the same domain as the fetched URL
        - `includePatterns` string[] — Regex patterns - only include links matching at least one pattern
        - `excludePatterns` string[] — Regex patterns - exclude links matching any pattern
    - `meta` boolean — Set to true to include page metadata
    - `response` object — Configure response info options (headers inclusion)
      - `includeHeaders` boolean — Whether to include HTTP response headers
    - `json` boolean — Include pruned JSON in the response (opt-in)
    - `appendix` boolean — Set to true to include extracted links and sidebar content

## Response `200`

FetchSnapshotSearchResult

- FetchSnapshotSearchResult
  - `snapshotId` string, required — Snapshot ID searched.
  - `response` ResponseInfo, required — HTTP response information for the searched snapshot.
    - `url` string, required — The final URL after any redirects
    - `requestedUrl` string — a string to be decoded into a URL
    - `originStatusCode` number — HTTP status code returned by the origin website. Absent when the fetch is still pending or the origin response could not be determined.
    - `redirectStatusCode` number — HTTP status code of the redirect response (e.g. 301, 302). Present only when a redirect occurred.
    - `headers` object — Response headers from the fetch operation (keys are lower-cased HTTP header names)
  - `search` FetchSearchResult, required
    - `query` string, required
    - `snippets` object[], required
      - `type` 'text' — Type identifier for TextPart compatibility
      - `source` 'markdown' | 'appendix' | 'statejson', required
      - `text` string, required — Readable snippet content
      - `json` unknown
      - `score` number, required — Normalized fused relevance score (0-1)
      - `location` FetchSearchSnippetLocation
        - `evidenceId` integer — an integer
        - `markdownBlockId` string — Deprecated Source Block identity; use evidenceId
        - `nodeIds` number[] — Deprecated replay element linkage; use evidenceId for public citations
        - `stateJsonSourceId` number — Deprecated State JSON source-object index; use evidenceId for public citations
        - `jsonPath` string — JSON path for State JSON snippets
    - `meta` FetchSearchMeta
      - `durationMs` number, required — Total elapsed search time in milliseconds.
      - `sources` FetchSearchSourceMeta[], required
        - `source` 'markdown' | 'appendix' | 'statejson', required
        - `chunkCount` integer, required — Number of search chunks considered for this source.
        - `batchCount` integer, required — Number of ranking batches evaluated for this source.
        - `ranker` 'zeroentropy' | 'mixedbread' | 'local_lexical', required
        - `fallback` boolean, required
        - `fallbackReason` 'timeout' | 'error'
        - `durationMs` number, required — Elapsed search time for this source in milliseconds.
  - `durationMs` number, required — Duration of the search operation in milliseconds.
  - `playground` string, required — Public playground URL for the searched snapshot. Use its origin to build citation links for the snippets below.

## Other responses

- `400` — The request did not match the expected schema
- `401` — AuthFailed
- `403` — AccessBlocked
- `404` — FetchSnapshotSearchNotFound
- `413` — PayloadTooLarge
- `429` — TooManyRequests
- `500` — InternalError
- `503` — ServiceUnavailable

---

[API](https://skmtc.dev/expand/apis/expand-ai-api.md) · [All operations](https://skmtc.dev/expand/apis/expand-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/expand/expand-ai-api/revisions/dd6849b4a636/schema)
