---
title: "An account's posts by what they gained in a period"
method: GET
path: "/accounts/{id}/metrics/posts"
---

# An account's posts by what they gained in a period

`GET /accounts/{id}/metrics/posts`

## Request

- Base URL: `https://govir.app/api/v1`
- URL: `https://govir.app/api/v1/accounts/{id}/metrics/posts`
- Auth: HTTP bearer

Scope: `read`.

## Path parameters

- `id` string, uuid, required

## Query parameters

- `from` string, date: YYYY-MM-DD
- `to` string, date: YYYY-MM-DD
- `sort` 'views' | 'likes' | 'replies' | 'reposts' | 'engagement_rate' | 'published_at'
- `limit` integer

## Response `200`

OK

- object
  - `range` object
    - `from` string, date: YYYY-MM-DD
    - `to` string, date: YYYY-MM-DD
  - `total` integer
  - `data` PostStats[]
    - `id` string, uuid
    - `account_id` string, uuid
    - `published_at` string, date-time
    - `preview` string
    - `permalink` string, nullable
    - `period` object
    - `lifetime` Counts
      - `views` integer
      - `likes` integer
      - `replies` integer
      - `reposts` integer
      - `quotes` integer

## Other responses

- `400`: The request isn't valid
- `401`: No key, a wrong key, or a revoked one
- `404`: Not found in your workspace
- `429`: Too many requests; see Retry-After

---

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