> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squasher.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Events API

> Search raw event records and inspect ingestion latency by source.

Use the Events API when an agent needs event-level evidence that does not fit a higher-level logs, errors, traces, or replay query.

## Operations

| Operation        | Method and path                                | Purpose                                                                  |
| ---------------- | ---------------------------------------------- | ------------------------------------------------------------------------ |
| `events.search`  | `GET /v1/projects/{project_id}/events/search`  | Full-text search events with query syntax, time windows, and pagination. |
| `events.latency` | `GET /v1/projects/{project_id}/events/latency` | Inspect event delivery latency grouped by source.                        |

Start with [Query Guide](/api-reference/query-guide) when you are not sure whether raw events, logs, traces, replays, or errors are the best fit.

## CLI and MCP

Use `squasher events search --project <project_id> ...` for terminal workflows. In MCP Code Mode, call `search("events")` first; if the operation is not exposed in the host, use the REST API or CLI instead.

## Agent handoff

```text theme={null}
Search Squasher events for project <project_id> from <from> to <to>. Prefer a narrow q, source, level, service, environment, or id filter before increasing limit. Return event ids, timestamps, and the reason each event is relevant.
```

Ask before using raw event output in external messages; event payloads can contain customer data.
