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

# Get post analytics

`GET /v1/analytics`

## Request

- Base URL: `https://api.postzen.dev`
- URL: `https://api.postzen.dev/v1/analytics`
- Auth: HTTP bearer

Returns one post when `postId` is supplied. Otherwise returns a paginated analytics list with aggregate overview metrics.

## Query parameters

- `postId` string
- `platform` union
  - 'x' | 'instagram' | 'tiktok' | 'linkedin' | 'facebook' | 'youtube' | 'threads' | 'pinterest' | 'bluesky' | 'telegram'
  - 'all'
- `profileId` string
- `accountId` string
- `source` 'all' | 'postzen' | 'external'
- `fromDate` union: A `YYYY-MM-DD` calendar date or ISO 8601 datetime.
  - string, date
  - string, date-time
- `toDate` union: A `YYYY-MM-DD` calendar date or ISO 8601 datetime.
  - string, date
  - string, date-time
- `limit` integer
- `page` integer
- `sortBy` 'date' | 'engagement' | 'impressions' | 'reach' | 'likes' | 'comments' | 'shares' | 'saves' | 'clicks' | 'views'
- `order` 'asc' | 'desc'

## Response `200`

Single-post analytics or a paginated analytics list.

- union
  - AnalyticsPost
    - `postId` string, required
    - `postzenPostId` string, nullable, required
    - `status` string, required
    - `content` string, required
    - `scheduledFor` string, date-time, required
    - `publishedAt` string, date-time, required
    - `analytics` AnalyticsMetrics, required: The eight normalized metrics returned for every platform. A platform that reports a single view count returns it in both `views` and `impressions`. A metric the platform does not report is returned as `0`, so check the per-platform coverage in the API reference before reading a zero as no activity. `reach` is currently reported for Instagram only.
      - `impressions` number, required
      - `reach` number, required
      - `likes` number, required
      - `comments` number, required
      - `shares` number, required
      - `saves` number, required
      - `clicks` number, required
      - `views` number, required
      - `engagementRate` number, required: Interactions (likes + comments + shares + saves + clicks) divided by impressions, multiplied by 100 and rounded to two decimals. On platforms that report no impressions, such as Bluesky, the value is the interaction count multiplied by 100 and is not a rate.
      - `lastUpdated` string, date-time, nullable, required
    - `platformAnalytics` PlatformAnalytics[], required
      - `platform` 'x' | 'instagram' | 'tiktok' | 'linkedin' | 'facebook' | 'youtube' | 'threads' | 'pinterest' | 'bluesky' | 'telegram', required
      - `status` string, required
      - `platformPostId` string, required
      - `accountId` string, required
      - `accountUsername` string, required
      - `analytics` AnalyticsMetrics, required: The eight normalized metrics returned for every platform. A platform that reports a single view count returns it in both `views` and `impressions`. A metric the platform does not report is returned as `0`, so check the per-platform coverage in the API reference before reading a zero as no activity. `reach` is currently reported for Instagram only.
        - `impressions` number, required
        - `reach` number, required
        - `likes` number, required
        - `comments` number, required
        - `shares` number, required
        - `saves` number, required
        - `clicks` number, required
        - `views` number, required
        - `engagementRate` number, required: Interactions (likes + comments + shares + saves + clicks) divided by impressions, multiplied by 100 and rounded to two decimals. On platforms that report no impressions, such as Bluesky, the value is the interaction count multiplied by 100 and is not a rate.
        - `lastUpdated` string, date-time, nullable, required
      - `syncStatus` 'synced' | 'pending' | 'failed', required
      - `platformPostUrl` string, uri, nullable, required
      - `errorMessage` string, nullable, required
    - `platform` 'x' | 'instagram' | 'tiktok' | 'linkedin' | 'facebook' | 'youtube' | 'threads' | 'pinterest' | 'bluesky' | 'telegram', required
    - `platformPostUrl` string, uri, nullable, required
    - `isExternal` boolean, required
    - `syncStatus` 'synced' | 'pending' | 'failed', required
    - `message` string, nullable, required
    - `thumbnailUrl` string, uri, nullable, required
    - `mediaType` 'image' | 'video' | 'text' | 'carousel' | 'null', nullable, required
    - `mediaItems` AnalyticsMediaItem[], required
      - `type` string, required
      - `url` string, uri, required
      - `thumbnail` string, uri, required
  - AnalyticsListResponse
    - `posts` AnalyticsPost[], required: One entry per PostZen post, not per platform target. A post published to several platforms appears once, with one `platformAnalytics` entry per platform and `analytics` summed across them; `platform` is that post's only platform when it has one. Posts imported from a platform always appear on their own. `pagination.total` and `overview.totalPosts` count these grouped entries.
      - `postId` string, required
      - `postzenPostId` string, nullable, required
      - `status` string, required
      - `content` string, required
      - `scheduledFor` string, date-time, required
      - `publishedAt` string, date-time, required
      - `analytics` AnalyticsMetrics, required: The eight normalized metrics returned for every platform. A platform that reports a single view count returns it in both `views` and `impressions`. A metric the platform does not report is returned as `0`, so check the per-platform coverage in the API reference before reading a zero as no activity. `reach` is currently reported for Instagram only.
        - `impressions` number, required
        - `reach` number, required
        - `likes` number, required
        - `comments` number, required
        - `shares` number, required
        - `saves` number, required
        - `clicks` number, required
        - `views` number, required
        - `engagementRate` number, required: Interactions (likes + comments + shares + saves + clicks) divided by impressions, multiplied by 100 and rounded to two decimals. On platforms that report no impressions, such as Bluesky, the value is the interaction count multiplied by 100 and is not a rate.
        - `lastUpdated` string, date-time, nullable, required
      - `platformAnalytics` PlatformAnalytics[], required
        - `platform` 'x' | 'instagram' | 'tiktok' | 'linkedin' | 'facebook' | 'youtube' | 'threads' | 'pinterest' | 'bluesky' | 'telegram', required
        - `status` string, required
        - `platformPostId` string, required
        - `accountId` string, required
        - `accountUsername` string, required
        - `analytics` AnalyticsMetrics, required: The eight normalized metrics returned for every platform. A platform that reports a single view count returns it in both `views` and `impressions`. A metric the platform does not report is returned as `0`, so check the per-platform coverage in the API reference before reading a zero as no activity. `reach` is currently reported for Instagram only.
          - `impressions` number, required
          - `reach` number, required
          - `likes` number, required
          - `comments` number, required
          - `shares` number, required
          - `saves` number, required
          - `clicks` number, required
          - `views` number, required
          - `engagementRate` number, required: Interactions (likes + comments + shares + saves + clicks) divided by impressions, multiplied by 100 and rounded to two decimals. On platforms that report no impressions, such as Bluesky, the value is the interaction count multiplied by 100 and is not a rate.
          - `lastUpdated` string, date-time, nullable, required
        - `syncStatus` 'synced' | 'pending' | 'failed', required
        - `platformPostUrl` string, uri, nullable, required
        - `errorMessage` string, nullable, required
      - `platform` 'x' | 'instagram' | 'tiktok' | 'linkedin' | 'facebook' | 'youtube' | 'threads' | 'pinterest' | 'bluesky' | 'telegram', required
      - `platformPostUrl` string, uri, nullable, required
      - `isExternal` boolean, required
      - `syncStatus` 'synced' | 'pending' | 'failed', required
      - `message` string, nullable, required
      - `thumbnailUrl` string, uri, nullable, required
      - `mediaType` 'image' | 'video' | 'text' | 'carousel' | 'null', nullable, required
      - `mediaItems` AnalyticsMediaItem[], required
        - `type` string, required
        - `url` string, uri, required
        - `thumbnail` string, uri, required
    - `pagination` Pagination, required
      - `page` integer, required
      - `limit` integer, required
      - `total` integer, required
      - `totalPages` integer, required
    - `overview` AnalyticsOverview, required
      - `totalPosts` number, required
      - `totals` AnalyticsMetricTotals, required: The eight normalized metrics returned for every platform. A platform that reports a single view count returns it in both `views` and `impressions`. A metric the platform does not report is returned as `0`, so check the per-platform coverage in the API reference before reading a zero as no activity. `reach` is currently reported for Instagram only.
        - `impressions` number, required
        - `reach` number, required
        - `likes` number, required
        - `comments` number, required
        - `shares` number, required
        - `saves` number, required
        - `clicks` number, required
        - `views` number, required
      - `avgEngagementRate` number, required
    - `truncated` boolean, required: True when the requested window contained more posts than a single response can scan. `pagination.total` and `overview` then describe the most recent slice of the window rather than all of it; narrow `fromDate`/`toDate`, `accountId`, or `platform` to get exact totals.

## Other responses

- `202`: The first analytics synchronization is pending; stored post data is returned.
- `400`: Invalid request.
- `401`: Missing or invalid API key.
- `402`: Analytics entitlement required.
- `403`: The API key does not have sufficient permission or profile access.
- `404`: Resource not found.
- `424`: All platform analytics fetches failed.
- `429`: Rate limit exceeded. Retry after the interval indicated by the `Retry-After` header.
- `500`: Unexpected server error.

---

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