---
title: "/posts/{post_id}/analytics"
method: GET
path: "/projects/{project_id}/posts/{post_id}/analytics"
tags: ["Posts"]
---

# /posts/{post_id}/analytics

`GET /projects/{project_id}/posts/{post_id}/analytics`

## Request

- Base URL: `https://api.productbyte.com/v1`
- URL: `https://api.productbyte.com/v1/projects/{project_id}/posts/{post_id}/analytics`
- Auth: HTTP bearer

Returns the collected metrics for a published post.

Numbers are collected from the channel on a schedule, so a post published moments ago reports nothing yet. Read `collection_status` before concluding anything from a zero: it separates "still collecting" from "the account needs reconnecting" and from genuine silence.

A post that never published has no analytics and answers 404.

Requires the `analytics:read` scope.

## Path parameters

- `project_id` string, required: The project the post belongs to.
- `post_id` string, required: The published post to read analytics for.

## Response `200`

Metrics for the post.

- object
  - `post_id` string, required: The post these numbers belong to.
  - `metrics` object, required: Totals so far. Absent keys are metrics this channel does not report.
    - `impressions` integer: Times the post was shown.
    - `likes` integer: Likes or reactions.
    - `comments` integer: Comments or replies.
    - `reposts` integer: Shares, reposts, or retweets.
    - `saves` integer: Times the post was saved or bookmarked.
    - `engagement` integer: Provider-reported total engagement.
    - `link_clicks` integer: Clicks on links in the post.
  - `collection_status` 'active' | 'completed' | 'auth_required' | 'permission_disabled' | 'unsupported' | 'unavailable' | 'possibly_deleted' | 'deleted' | 'retrying', required: Why the numbers look the way they do. `active` is still being collected and `completed` has finished; anything else explains why collection stopped, so zeroes are not mistaken for genuine silence.
  - `last_error_at` string, date-time: When collection last failed, if it has.

## Other responses

- `401`: Missing, unknown, revoked, or expired key (`API_KEY_UNAUTHORIZED`).
- `403`: The key lacks `analytics:read`, or the project is outside its allowlist.
- `404`: No such post in this project (`API_POST_NOT_FOUND`).
- `429`: Too many requests for this key (`API_RATE_LIMITED`). Back off and retry; `Retry-After` gives the window length.

---

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