# GET /v1/memory/search

> Ask the memory a question (q), for one user (user_id) or the company's own Bash.

In [Memory API](https://vestra.ai/developers/reference/api/memory.md): What Bash remembers about each user: read it, search it, add to it, forget it.

Send `Authorization: Bearer vk_test_...` on every call.

Ask the memory a question (q), for one user (user_id) or the company's own Bash.

Your API key, scope `runtime` or `all`. On the card: [`memory`](https://vestra.ai/developers/memory.md). Every call here is a checked sample.

## Request

Query:

- `user_id` (`string`): Whose memory, by your id for them. Absent: your company's own Bash's.
- `q` (`string`, required): What to ask the memory, in at most 500 characters.

## Answers 200

- `query` (`string`): What you asked.
- `found` (`boolean`): Whether the memory had an answer.
- `text` (`string | null`): The answer, in plain words; null when nothing was found.

## Code

**TypeScript**

```ts
const found = await vestra.user('traveller-42').memory.search('Which seat does she like?');
```

**Python**

```python
found = vestra.user("traveller-42").memory.search("Which seat does she like?")
```

**CLI**

```bash
vestra memory search "Which seat does she like?" --user traveller-42
```

**HTTP**

```bash
# Add a fact. Tell Bash something once, and it remembers it.
curl "$VESTRA_BASE_URL/v1/memory" \
  -H "Authorization: Bearer $VESTRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "user_id": "traveller-42", "text": "Prefers a window seat, and never a red-eye." }'

# Search what Bash remembers. Ask a question in plain words.
curl "$VESTRA_BASE_URL/v1/memory/search?user_id=traveller-42&q=Which%20seat%20does%20she%20like" \
  -H "Authorization: Bearer $VESTRA_API_KEY"

# List and forget memories. Read the profile and every memory, newest first. Then forget one, or everything.
curl "$VESTRA_BASE_URL/v1/memory?user_id=traveller-42" \
  -H "Authorization: Bearer $VESTRA_API_KEY"

curl -X DELETE "$VESTRA_BASE_URL/v1/memory/mem_4ka?user_id=traveller-42" \
  -H "Authorization: Bearer $VESTRA_API_KEY"

curl -X DELETE "$VESTRA_BASE_URL/v1/memory?user_id=traveller-42" \
  -H "Authorization: Bearer $VESTRA_API_KEY"
```

**MCP**

```json
{
  "method": "tools/call",
  "params": {
    "name": "memory_search",
    "arguments": { "user": "traveller-42", "q": "Which seat does she like?" }
  }
}
```
