---
title: "Get various metrics for posts within a specified time frame."
method: GET
path: "/insights/posts/metrics"
tags: ["Insights"]
---

# Get various metrics for posts within a specified time frame.

`GET /insights/posts/metrics`

## Request

- Base URL: `https://socialbu.com/api/v1`
- URL: `https://socialbu.com/api/v1/insights/posts/metrics`
- Auth: HTTP bearer

Returns post metric snapshots grouped by calendar date in the authenticated user's timezone for selected metric types. Published posts and metric samples are limited to the selected local dates; `calculate_growth` retains its existing day-over-day semantics.

## Query parameters

- `post_type` 'image' | 'video' | 'text'
- `start` string, date, required: Format should be Y-m-d
- `end` string, date, required: Format should be Y-m-d
- `metrics` union, required
  - string
  - string[]
- `calculate_growth` boolean
- `group_by_account` boolean
- `accounts` integer[]
- `team` integer

## Response `200`

successful operation

- object
  - `data` union: Response shape depends on `group_by_account`. - When `group_by_account=false` (default), this is an object keyed by metric type. - When `group_by_account=true`, this is an array of account-wise metric objects.
    - object
    - object[]
      - `account_id` integer, required: ID of the connected social media account.
      - `metrics` object, required

## Other responses

- `404`: Resource not found

---

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