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

# List Logs

> Query and paginate log entries for a project.

<Note>Base URL: `https://api.streamlogia.com`</Note>

**`GET /v1/projects/{projectId}/logs`**

**`Authorization: Bearer YOUR_API_KEY`**

***

## Path parameters

<ParamField path="projectId" type="string" required>UUID of the project.</ParamField>

## Query parameters

<ParamField query="level" type="string">Filter to a single level: `DEBUG`, `INFO`, `WARN`, or `ERROR`.</ParamField>
<ParamField query="search" type="string">Full-text search across `message`, `source`, and `tags`.</ParamField>
<ParamField query="from" type="string">Start of time range (ISO 8601, inclusive) — e.g. `2026-04-07T00:00:00Z`</ParamField>
<ParamField query="to" type="string">End of time range (ISO 8601, exclusive) — e.g. `2026-04-07T23:59:59Z`</ParamField>
<ParamField query="limit" type="integer">Entries per page. Default `100`, max `1000`.</ParamField>
<ParamField query="cursor" type="string">Pagination cursor from `nextCursor` in the previous response. Omit for the first page.</ParamField>

***

## Response

<ResponseField name="logs" type="LogEntry[]">Array of log entries, newest first.</ResponseField>
<ResponseField name="nextCursor" type="string | null">`null` on the last page. Pass to `cursor` for the next page.</ResponseField>
<ResponseField name="total" type="integer">Total matching entries across all pages.</ResponseField>

```json theme={null}
{
  "logs": [
    {
      "id": "log_7f3a1b9c-e4d2-4f8a-b3c1-9d0e2f6a5b78",
      "projectId": "YOUR_PROJECT_ID",
      "level": "ERROR",
      "message": "Unhandled exception in /v1/orders",
      "source": "api.handler",
      "ts": "2026-04-07T09:41:03Z",
      "tags": ["prod"],
      "meta": { "orderId": 9921 }
    }
  ],
  "nextCursor": "eyJpZCI6ImxvZ18…",
  "total": 1423
}
```

***

## Pagination

```javascript theme={null}
let cursor;
const logs = [];

do {
  const params = new URLSearchParams({ limit: "500" });
  if (cursor) params.set("cursor", cursor);

  const res = await fetch(
    `https://api.streamlogia.com/v1/projects/YOUR_PROJECT_ID/logs?${params}`,
    { headers: { Authorization: "Bearer YOUR_API_KEY" } }
  );
  const data = await res.json();
  logs.push(...data.logs);
  cursor = data.nextCursor;
} while (cursor);
```
