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

# Search

> Recall the most relevant memories and source context

`POST /ns/{namespace}/search` recalls the most useful memories and source chunks for a query. Hybrid search combines both by default; set `searchMode` to `memories` or `chunks` when your experience needs one result type.

Every option goes in the JSON request body: `query`, `searchMode`, `limit`, `threshold`, `filter`, `include`, `rerank`, and `rewriteQuery`.

<CodeGroup>
  ```ts TypeScript theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  const { results, searchTime } = await client.search("user_1", {
    query: "What did the user decide about the launch?",
    limit: 10,
  })
  ```

  ```python Python theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  response = client.search("user_1", query="What did the user decide about the launch?", limit=10)
  ```

  ```bash curl theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  curl -X POST "https://api.supermemory.ai/ns/user_1/search" \
    -H "Authorization: Bearer $SUPERMEMORY_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"query":"What did the user decide about the launch?","limit":10}'
  ```
</CodeGroup>

Two defaults differ from the legacy API: `searchMode` defaults to `hybrid` (legacy `memories`) and `threshold` defaults to `0.3` (legacy `0.6`). Pass both explicitly if you need legacy-equivalent results.

See [search migration](/docs/migration/api-v5-recall) and [typed filter migration](/docs/migration/api-v5-filters).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.