> This page is for version v4 (default).
> For other versions, use one of these documentation indexes:
> - v4 (default): https://help.getzep.com/v4/llms.txt
> - v3: https://help.getzep.com/v3/llms.txt
> - v2: https://help.getzep.com/v2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.getzep.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.getzep.com/_mcp/server.

# List episodes

POST https://api.getzep.com/api/v4/graphs/{graph_uuid}/episodes/list
Content-Type: application/json

Lists the episodes of a graph. `filters.mentioned_node_uuids` restricts
the results to episodes that mention any of the listed node UUIDs. The
list can also contain episode UUIDs: an episode UUID matches that episode,
so one request can return a known set of episodes. At most 256 entries.
`filters.metadata_filters` restricts the results to episodes whose stored
metadata matches the predicate.

Reference: https://help.getzep.com/sdk-reference/graph/episode/list

## Authentication

- `Authorization` header (required) (prefixed with ` Api-Key  `) — Type "Api-Key" followed by a space and the project API key.

## Request

### Path parameters

- `graph_uuid` (string, required) — The UUID of the graph. For a user graph, you can also use the UUID of the user.

### Query parameters

- `page_size` (integer, optional, default: 50) — The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages.
- `cursor` (string, optional) — Opaque page cursor
- `order_by` (enum, optional) — Sort field
  - Allowed values: `created_at`, `uuid`
- `order` (enum, optional) — Sort direction: asc or desc
  - Allowed values: `asc`, `desc`

### Body (application/json)

This endpoint expects a v4.EpisodeListRequest.

- `filters` (v4.EpisodeListFilters, optional) — Filters that limit the episodes in the list.

## Response

### 200

OK

- `items` (list of v4.Episode, optional) — The episodes on this page.
- `next_cursor` (string, optional) — Opaque cursor for retrieving the next page, present only when more results are available.
- `total_size` (integer, optional) — Omitted for this collection; use next_cursor to detect the end of pagination.

## Errors

### 400 Bad Request Error

Bad Request

- `error` (v4.ErrorBody, optional)

### 401 Unauthorized Error

Unauthorized

- `error` (v4.ErrorBody, optional)

### 403 Forbidden Error

Forbidden

- `error` (v4.ErrorBody, optional)

### 404 Not Found Error

Not Found

- `error` (v4.ErrorBody, optional)

## Types

### v4.EpisodeListFilters

- `content_policy_violated` (boolean, optional) — When true, include only episodes that a content policy flagged. When false, include only episodes that no content policy flagged. The project setting include_policy_violating_episodes must be on.
- `mentioned_node_uuids` (list of string, optional) — Include only episodes that mention at least one of these nodes. At most 256 node UUIDs.
- `metadata_filters` (v4.MetadataFilterGroup, optional) — Include only episodes whose metadata matches this filter group.

### v4.Episode

- `content` (string, optional) — The raw content of the episode.
- `content_policy` (v4.EpisodeContentPolicy, optional) — The content policy state of the episode, present only on a graph with a bound content policy rule.
- `created_at` (string, optional) — The time Zep received the episode.
- `document_id` (string, optional) — The developer-assigned identifier of the document this episode belongs to, present only for episodes added to a document.
- `graph_uuid` (string, optional) — The unique identifier of the graph this episode belongs to.
- `metadata` (map from string to any, optional) — Custom metadata associated with the episode.
- `processed` (boolean, optional) — Whether the episode has finished graph extraction and indexing.
- `reference_time` (string, optional) — The episode's reference time, used for temporal reasoning: the time that the developer supplied on add, or the ingestion time when the developer supplied no time.
- `relevance` (double, optional) — A cross-encoder-derived relevance score, present only when the cross-encoder reranker scored this result; like score, it is omitted from plain list results.
- `role` (enum, optional) — The role of the episode's sender, present only when the episode was added as a message.
  - Allowed values: `system`, `assistant`, `user`, `function`, `tool`
- `role_name` (string, optional) — The free-form display name of the episode's sender, present only when the episode was added as a message.
- `score` (double, optional) — The ranking score returned with every search result; omitted when the episode appears in a plain list rather than a search result.
- `source` (enum, optional) — The format of the episode's content: text, json, or message.
  - Allowed values: `text`, `json`, `message`, `fact_triple`
- `source_description` (string, optional) — A free-form description of where the episode's content came from.
- `thread_uuid` (string, optional) — The thread this episode belongs to, present only for episodes added to a thread.
- `user_uuid` (string, optional) — The unique identifier of the user that owns the graph. Present only when the graph is a user graph.
- `uuid` (string, optional) — The unique identifier of the episode.

### v4.ErrorBody

- `code` (string, optional)
- `details` (map from string to any, optional)
- `message` (string, optional)
- `param` (string, optional)
- `request_id` (string, optional)

### v4.MetadataFilterGroup

- `filters` (list of v4.MetadataFilter, optional) — The metadata predicates in this group.
- `groups` (list of v4.MetadataFilterGroup, optional) — The nested metadata groups in this group.
- `type` (enum, optional) — The logical operator for this group.
  - Allowed values: `and`, `or`

### v4.EpisodeContentPolicy

- `category_keys` (list of string, optional) — The keys of the categories with a matched rule.
- `dropped_count` (integer, optional) — The number of derived candidates that were dropped.
- `retained_count` (integer, optional) — The number of derived candidates that were published to the graph.
- `revision` (integer, optional) — The project revision number of the policy the graph bound.
- `status` (enum, optional) — The evaluation status. pending means the evaluation has not finished, complete means every candidate was evaluated and the graph batch was written, and failed means ingestion retries were exhausted.
  - Allowed values: `pending`, `complete`, `failed`
- `violated` (boolean, optional) — Whether at least one derived candidate matched a rule. Once true, it stays true.

### v4.MetadataFilter

- `operator` (enum, optional) — The lowercase comparison operator.
  - Allowed values: `eq`, `ne`, `gt`, `lt`, `gte`, `lte`, `in`, `contains`, `is_null`, `is_not_null`
- `property_name` (string, optional) — The metadata property name to compare.
- `value` (V4MetadataFilterValue, optional) — The comparison value. Use an array for in, a non-empty string for contains, and omit the field for null operators.

### V4MetadataFilterValue

The comparison value. Use an array for in, a non-empty string for contains, and omit the field for null operators.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "items": [
    {
      "content": "string",
      "content_policy": {
        "category_keys": [
          "health"
        ],
        "dropped_count": 0,
        "retained_count": 7,
        "revision": 3,
        "status": "complete",
        "violated": false
      },
      "created_at": "string",
      "document_id": "string",
      "graph_uuid": "string",
      "metadata": {},
      "processed": true,
      "reference_time": "string",
      "relevance": 1.1,
      "role": "system",
      "role_name": "string",
      "score": 1.1,
      "source": "text",
      "source_description": "string",
      "thread_uuid": "string",
      "user_uuid": "string",
      "uuid": "string"
    }
  ],
  "next_cursor": "string",
  "total_size": 1
}
```