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

# Reports API: Query Event Counts, Users, and Funnels

> GET /v1/reports to retrieve aggregated analytics data. Filter by event, time range, and user segment to build custom reporting integrations.

The reports endpoint lets you query aggregated analytics data programmatically, making it easy to embed Saytics data in your own applications, dashboards, or BI tools.

<Tip>
  Cache report results in your application — the API enforces rate limits and report data updates every 5 minutes.
</Tip>

## GET /v1/reports/events

Retrieve event counts grouped over a time range. Use this endpoint to build trend charts or track the frequency of specific actions.

<ParamField query="event" type="string" required>
  The event name to query, for example `"Order Completed"`.
</ParamField>

<ParamField query="from" type="string" required>
  ISO 8601 start date for the report range.
</ParamField>

<ParamField query="to" type="string" required>
  ISO 8601 end date for the report range.
</ParamField>

<ParamField query="interval" type="string" default="day">
  How to group the results. Accepted values: `hour`, `day`, `week`, `month`.
</ParamField>

<ParamField query="filter" type="string">
  A property filter to narrow results, for example `plan=pro`.
</ParamField>

```bash theme={null}
curl "https://api.saytics.com/v1/reports/events?event=Order+Completed&from=2024-01-01&to=2024-01-31&interval=day" \
  -H "Authorization: Bearer sk_live_YOUR_KEY"
```

```json theme={null}
{
  "event": "Order Completed",
  "interval": "day",
  "data": [
    { "date": "2024-01-01", "count": 42 },
    { "date": "2024-01-02", "count": 38 },
    { "date": "2024-01-03", "count": 55 }
  ],
  "total": 135
}
```

## GET /v1/reports/users

Retrieve active user counts over a time range. Use the `metric` parameter to switch between daily, weekly, and monthly active user calculations.

<ParamField query="from" type="string" required>
  ISO 8601 start date for the report range.
</ParamField>

<ParamField query="to" type="string" required>
  ISO 8601 end date for the report range.
</ParamField>

<ParamField query="interval" type="string" default="day">
  How to group the results. Accepted values: `hour`, `day`, `week`, `month`.
</ParamField>

<ParamField query="metric" type="string" default="dau">
  The active user metric to compute. Accepted values: `dau` (daily), `wau` (weekly), `mau` (monthly).
</ParamField>

```bash theme={null}
curl "https://api.saytics.com/v1/reports/users?metric=dau&from=2024-01-01&to=2024-01-31" \
  -H "Authorization: Bearer sk_live_YOUR_KEY"
```

## GET /v1/reports/funnel

Calculate conversion rates across an ordered sequence of events. Use this endpoint to measure how users progress through onboarding flows, checkout steps, or any multi-step process.

<ParamField query="steps" type="string[]" required>
  An ordered array of event names that form the funnel. Users must complete each step in sequence to be counted at the next step.
</ParamField>

<ParamField query="from" type="string" required>
  ISO 8601 start date for the report range.
</ParamField>

<ParamField query="to" type="string" required>
  ISO 8601 end date for the report range.
</ParamField>

```bash theme={null}
curl "https://api.saytics.com/v1/reports/funnel?steps[]=User+Signed+Up&steps[]=Profile+Completed&steps[]=Subscription+Started&from=2024-01-01&to=2024-01-31" \
  -H "Authorization: Bearer sk_live_YOUR_KEY"
```
