---
title: "Search User Event Gists"
method: GET
path: "/api/v1/users/event_gist/search/{user_id}"
tags: ["event_gist"]
---

# Search User Event Gists

`GET /api/v1/users/event_gist/search/{user_id}`

## Request

- Base URL: `https://api.memobase.dev`
- URL: `https://api.memobase.dev/api/v1/users/event_gist/search/{user_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/memodb-io/apis/memobase-api/docs/api/v1/users/event_gist/search/:user_id/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `user_id` union, required: The ID of the user
  - string, uuid4
  - string, uuid5

## Query parameters

- `query` string, required: The query to search for
- `topk` integer: Number of events to retrieve, default is 10
- `similarity_threshold` number: Similarity threshold, default is 0.2
- `time_range_in_days` integer: Only allow events within the past few days, default is 180

## Response `200`

Successful Response

- UserEventGistsDataResponse
  - `data` UserEventGistsData
    - `gists` UserEventGistData[], required: List of user event gists
      - `id` union, required: The event gist's unique identifier
        - string, uuid4
        - string, uuid5
      - `gist_data` EventGistData
        - `content` string, required: The event gist content
      - `created_at` string, date-time: Timestamp when the event gist was created
      - `updated_at` string, date-time: Timestamp when the event gist was last updated
      - `similarity` number, nullable: Similarity score
    - `events` UserEventData[]: List of user events
      - `id` union, required: The event's unique identifier
        - string, uuid4
        - string, uuid5
      - `event_data` EventData
        - `profile_delta` ProfileDelta[], nullable: List of profile data
          - `content` string, required: The profile content
          - `attributes` object, nullable, required: User profile attributes in JSON, containing 'topic', 'sub_topic'
        - `event_tip` string, nullable: Event tip
        - `event_tags` EventTag[], nullable: List of event tags
          - `tag` string, required: The event tag
          - `value` string, required: The event tag value
      - `created_at` string, date-time: Timestamp when the event was created
      - `updated_at` string, date-time: Timestamp when the event was last updated
      - `similarity` number, nullable: Similarity score
  - `errno` 0 | 400 | 401 | 403 | 404 | 405 | 409 | 422 | 500 | 501 | 502 | 503 | 504 | 520
  - `errmsg` string: Error message, empty when success

## Other responses

- `422`: Validation Error

## Changes

- **2026-07-17** `4543f130c8e0`: 1 info
  - added the optional property `data/anyOf[subschema #1: UserEventGistsData]/events` to the response with the `200` status
- **2025-09-01** `c5d39efe16d8`: 1 info
  - for the `path` request parameter `user_id`, the type was generalized from `string` to no type
- **2025-07-12** `0f9b630d3b07`: 1 info
  - endpoint added
- **2025-01-15** `a9bfbdf3d53b`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/memodb-io/apis/memobase-api/changes/api/v1/users/event_gist/search/:user_id/get.md)

---

[API](https://skmtc.dev/memodb-io/apis/memobase-api.md) - [All operations](https://skmtc.dev/memodb-io/apis/memobase-api/llms.txt) - [OpenAPI document](https://skmtc.dev/memodb-io/apis/memobase-api/revisions/4543f130c8e0?raw)
