Skip to content

List tags

GET /v1/default/banks/{bank_id}/tags

List all unique tags in a memory bank with usage counts. Supports wildcard search using '' (e.g., 'user:', '-fred', 'tag-2'). Case-insensitive. Use source=mental_models to list tags used on mental models instead of memories.

Authentication required — include an Authorization: Bearer hsk_... header. See Authentication for details.

Path Parameters

NameTypeRequiredDescription
bank_idstringYes

Query Parameters

NameTypeRequiredDescription
qstring | nullNoWildcard pattern to filter tags (e.g., 'user:' for user:alice, '-admin' for role-admin). Use '*' as wildcard. Case-insensitive.
sourceenum("memories", "mental_models")NoWhere to read tags from: 'memories' (memory_units, default) or 'mental_models'.
limitintegerNoMaximum number of tags to return
offsetintegerNoOffset for pagination

Example Request

bash
curl -X GET 'https://api.hindsight.vectorize.io/v1/default/banks/your-bank-id/tags' \
  -H 'Authorization: Bearer hsk_your_api_key'

Responses

200 — Successful Response

json
{
  "items": [
    {
      "count": 42,
      "tag": "user:alice"
    },
    {
      "count": 15,
      "tag": "user:bob"
    },
    {
      "count": 8,
      "tag": "session:abc123"
    }
  ],
  "limit": 100,
  "offset": 0,
  "total": 25
}

422 — Validation Error

json
{
  "detail": [
    {
      "loc": [
        null
      ],
      "msg": "Message",
      "type": "Error Type",
      "input": null,
      "ctx": {},
      "url": "URL"
    }
  ]
}

Source: /v1/default/banks/{bank_id}/tags