---
title: "Get post samples"
method: GET
path: "/v1/analytics/samples"
tags: ["Analytics"]
---

# Get post samples

`GET /v1/analytics/samples`

## Request

- Base URL: `https://zernio.com/api`
- URL: `https://zernio.com/api/v1/analytics/samples`
- Auth: HTTP bearer

Returns the raw readings behind a post's numbers, oldest first.

Each sample is one analytics sync: the views and engagement as the platform reported them at `syncedAt`. Zernio only stores what it fetched from the platform, so nothing here was self-reported.

### Null values

- `shares` and `saves` are null on platforms that do not return that counter, which is different from a real zero.
- `watchSeconds` and `completionRate` are null when the platform gives no watch signal.

## Query parameters

- `postId` string, required
- `fromDate` string, date-time
- `toDate` string, date-time
- `limit` integer

## Response `200`

Samples for the post

- object
  - `postId` string, required: The postId that was requested
  - `samples` PostSample[], required
    - `syncedAt` string, date-time, required: When Zernio fetched this reading from the platform
    - `views` integer, required
    - `likes` integer, required
    - `comments` integer, required
    - `shares` integer, nullable, required: Null on platforms that do not return shares
    - `saves` integer, nullable, required: Null on platforms that do not return saves
    - `watchSeconds` number, nullable, required: Average watch time in seconds. Null when the platform gives none.
    - `completionRate` number, nullable, required: Share of viewers who watched to the end, 0 to 1. Null when the platform gives none.

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid API key. `code` is `missing_credentials` when no Authorization header was sent and `invalid_credentials` when the key is unknown, revoked or expired.
- `402`: Analytics access required. Legacy plans need the Analytics add-on; included by default on usage-based plans.
- `403`: API key scope violation
- `404`: Post not found

## Changes

- **2026-10-28** `8f2c44dd7550`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/zernio/apis/zernio-api/changes/v1/analytics/samples/get.md)

---

[API](https://skmtc.dev/zernio/apis/zernio-api.md) - [All operations](https://skmtc.dev/zernio/apis/zernio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zernio/apis/zernio-api/revisions/c319eb5d95b6?raw)
