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

# Read analytics

> Account totals, your best posts and one post's numbers.

Postinger reads statistics from each platform and shows them under one set of names, whatever the platform calls them (YouTube's subscribers are `followers`). A `null` always means the platform doesn't report it, never zero.

## Account totals

```bash cURL theme={"system"}
curl "https://api.postinger.dev/v1/analytics?from=2026-10-01T00:00:00Z&to=2026-11-01T00:00:00Z" \
  -H "Authorization: Bearer $POSTINGER_API_KEY"
```

```bash CLI theme={"system"}
postinger analytics --from 2026-10-01 --to 2026-10-31
```

In the API, `from` and `to` are required instants with an offset: the period runs from `from` up to, not including, `to`, and is at most a year long. The CLI takes days on your computer's clock (`--from`, `--to`) or `--days 30`. Add `accounts` (or `--account`) to narrow it to some accounts.

Each total comes with the `previous` period's value, for comparison, and a value per account. `days` gives the day-by-day series.

| Metric | Kind |
| - | - |
| `followers`, `posts` | A count at a moment: a period shows its last value. |
| `views`, `reach`, `engagements`, `likes`, `comments`, `shares`, `saves`, `followersGained`, `followersLost`, `watchMinutes` | Added up over the period. |

Every number is what the platform reports; Postinger does not work any out from the others. A metric a platform does not give is `null`, never `0`.

## Best posts

```bash cURL theme={"system"}
curl "https://api.postinger.dev/v1/analytics/posts?from=2026-10-01T00:00:00Z&to=2026-11-01T00:00:00Z&sort=views&limit=10" \
  -H "Authorization: Bearer $POSTINGER_API_KEY"
```

```bash CLI theme={"system"}
postinger analytics posts --sort views --limit 10
```

Sort by `views`, `reach`, `likes`, `comments`, `shares`, `saves`, `engagements` or `avgWatchSeconds`; `views` when left out.

## One post

```bash cURL theme={"system"}
curl https://api.postinger.dev/v1/analytics/posts/POST_ID \
  -H "Authorization: Bearer $POSTINGER_API_KEY"
```

```bash CLI theme={"system"}
postinger analytics post POST_ID
```

The numbers are per target, since the post went out. `engagements` is the platform's own count, so only platforms that report one have it.


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