---
title: "Search"
method: POST
path: "/snapshots/{snapshot_id}/search"
tags: ["search"]
---

# Search

`POST /snapshots/{snapshot_id}/search`

Search the snapshot. Semantic when embeddings are ready, keyword fallback otherwise.

Open to anonymous + all tiers: keyword/semantic search over public
repos is a core /explore discovery path. Private snapshots stay
owner-only via ``_load_snapshot_or_404``. Cost is bounded by the
60/minute slowapi cap and the embedding-store cache hit rate; the
LLM-bearing surface (``/answer``) keeps its Pro gate.

Wire shape mirrors the previous keyword-only endpoint
(`{results: [{title, page_type, target_path, snippet, score, search_type}]}`)
so the existing frontend continues to render without changes. New
semantic results carry `search_type='semantic'` so the UI can label
them distinctly.

## Path parameters

- `snapshot_id` string, required

## Request body

- object

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/repowise/apis/repowise-hosted-api.md) · [All operations](https://skmtc.dev/repowise/apis/repowise-hosted-api/llms.txt) · [OpenAPI document](https://skmtc.dev/repowise/apis/repowise-hosted-api/revisions/cce15d886f2b?raw)
