---
title: "Search memory"
method: GET
path: "/v3/organizations/{orgId}/memory/search"
tags: ["Memory"]
---

# Search memory

`GET /v3/organizations/{orgId}/memory/search`

## Request

- Base URL: `https://api.reasonmachines.com`
- URL: `https://api.reasonmachines.com/v3/organizations/{orgId}/memory/search`
- Auth: HTTP bearer

Finds lines containing the query in every file of one scope, the way a Reason's memory search does: a plain, case-insensitive substring match, with `|` separating alternatives. It is not a regular expression and not semantic search. Matches come file by file, `MEMORY.md` first.

<sub>Scope: `memory:read`</sub>

## Query parameters

- `scope` 'personal' | 'team', required
- `q` string, required
- `max_results` integer

## Response `200`

Matching lines.

- MemorySearchResult
  - `scope` 'personal' | 'team': `personal`: the memory of the person the API key or OAuth grant belongs to, private to them. `team`: the Workspace's shared team memory, which every member's Sessions read.
  - `matches` object[]: Matching lines, file by file in `listMemoryFiles` order.
    - `path` string
    - `line` integer: 1-based line number within the file.
    - `text` string: The matching line, cut to 400 characters.
  - `truncated` boolean: More lines matched than `max_results`; narrow `q` to see them.

## Other responses

- `400`: Invalid request.
- `401`: Missing, invalid, or expired key.
- `403`: The key lacks the required scope or role.
- `429`: Too many requests. Retry after the number of seconds in the `Retry-After` response header.

## Changes

- **2026-10-26** `c250866428e0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ara/apis/reason-api/changes/v3/organizations/:orgId/memory/search/get.md)

---

[API](https://skmtc.dev/ara/apis/reason-api.md) - [All operations](https://skmtc.dev/ara/apis/reason-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ara/apis/reason-api/revisions/e97c8704807c?raw)
