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

# Time series

> Get an ordered series of query counts for each group in an analytics breakdown.

Append `;series` to the analytics endpoint, before the query string. For example, `/analytics/status;series` returns query counts per status for each interval. All [breakdowns](https://docs.nextdns.io/api-reference/analytics/overview#choose-a-breakdown) except domains support time series. For destinations, include `type=countries` or `type=gafam`.

## Choose the time window

Pass `from` to set the start of the series. The end, `to`, defaults to `now`. The shared [analytics filters](https://docs.nextdns.io/api-reference/analytics/overview#query-parameters) apply. `limit` and `cursor` page through groups, such as devices or statuses. Each returned group covers the same time window.

| Parameter | Meaning |
| - | - |
| `interval` | Bucket width. Use positive whole seconds (e.g. `3600`) or a duration with the suffix `s`, `m`, `h`, `d`, or `w` (e.g. `1h`). By default the API chooses a width based on the requested time range. |
| `alignment` | `end` (default) aligns buckets to `to`. Use `start` to align them to `from`, or `clock` for local clock boundaries such as midnight. |
| `timezone` | IANA time zone name, such as `Europe/Paris`, for clock alignment. Defaults to `GMT`. |
| `partials` | Include partial buckets at `start`, `end`, or both (`all`). The default `none` returns complete buckets only. Partial buckets count only queries inside the requested time range. |

## Read the result

Each row’s `queries` array corresponds position by position to `meta.series.times`. Times are bucket starts in UTC. An included partial bucket can start before `from`. The `meta.series.interval` field is the requested or automatically selected width in seconds.

The API returns groups with at least one query in the included buckets, ranked by their total count. A zero means that the group had no queries in that bucket. If the window contains no eligible buckets, both `data` and `meta.series.times` are empty.

This request compares query statuses across three hourly buckets.

```bash theme={null}
curl -G "https://api.nextdns.io/profiles/$PROFILE_ID/analytics/status;series" \
  -H "X-Api-Key: $NEXTDNS_API_KEY" \
  --data-urlencode "from=2026-11-26T09:00:00Z" \
  --data-urlencode "to=2026-11-26T12:00:00Z" \
  --data-urlencode "interval=1h"
```

```json theme={null}
{
  "data": [
    { "status": "default", "queries": [75, 42, 68] },
    { "status": "blocked", "queries": [8, 0, 3] }
  ],
  "meta": {
    "series": {
      "times": [
        "2026-11-26T09:00:00.000Z",
        "2026-11-26T10:00:00.000Z",
        "2026-11-26T11:00:00.000Z"
      ],
      "interval": 3600
    },
    "pagination": { "cursor": null }
  }
}
```

Here, 75 queries had the default status from 09:00 up to 10:00 UTC. With `alignment=clock`, use the returned timestamps for chart labels. A local day can span 23 or 25 hours when daylight saving time changes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.