GET
/
api
/
v1
/
users
/
event_tags
/
search
/
{user_id}
Python
# To use the Python SDK, install the package:
# pip install memobase

from memobase import MemoBaseClient

client = MemoBaseClient(project_url='PROJECT_URL', api_key='PROJECT_TOKEN')
u = client.get_user(uid)

# Search for events with specific tags
events = u.search_event_by_tags(tags=["emotion", "romance"])

# Search for events with specific tag values
events = u.search_event_by_tags(tag_values={"emotion": "happy", "topic": "work"})

# Combine both filters
events = u.search_event_by_tags(tags=["emotion"], tag_values={"topic": "work"})
{
  "data": {
    "events": [
      {
        "id": "<string>",
        "event_data": {
          "profile_delta": [
            {
              "content": "<string>",
              "attributes": {}
            }
          ],
          "event_tip": "<string>",
          "event_tags": [
            {
              "tag": "<string>",
              "value": "<string>"
            }
          ]
        },
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "similarity": 123
      }
    ]
  },
  "errno": 0,
  "errmsg": ""
}
Search events by tags.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

user_id
required

The ID of the user

Query Parameters

tags
string

Comma-separated list of tag names that events must have (e.g.'emotion,romance')

tag_values
string

Comma-separated tag=value pairs for exact matches (e.g., 'emotion=happy,topic=work')

topk
integer
default:10

Number of events to retrieve, default is 10

Response

Successful Response

The response is of type object.