> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trystratos.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytics

> Views, likes, comments — read-only, same numbers the dashboard shows.

<Note>
  Covers Instagram and YouTube today (`post_publications`). TikTok's own metrics live inside a per-workspace Durable Object, not Postgres, and aren't included in this response yet — see the `note` field on the summary response.
</Note>

## Summary

`GET /v1/analytics/summary?windowDays=30` — requires `analytics:read`.

```json theme={null}
{
  "data": {
    "windowDays": 30,
    "totals": { "views": 48213, "likes": 1902, "comments": 84, "posts": 12 },
    "byPlatform": {
      "instagram": { "views": 30112, "likes": 1400, "comments": 60, "posts": 8 },
      "youtube": { "views": 18101, "likes": 502, "comments": 24, "posts": 4 }
    },
    "note": "TikTok-native metrics aren't included yet — see file header."
  }
}
```

## Per-post

`GET /v1/analytics/content/{videoId}` — requires `analytics:read`. `videoId` here is the hook-video id from `post_publications`, not a `v1_content` id — the two aren't joined yet for the slideshow/v1 content path.
