# Analytics API reference

The Analytics API reference covers 10 endpoints of the SkedCast social media REST API. Reach, impressions, engagement, and rollups.

## Analytics overview

`GET /analytics/overview`

Scope: `analytics.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `from` | string (date) | query | no | Window start (YYYY-MM-DD). |
| `to` | string (date) | query | no | Window end (YYYY-MM-DD). |

Responses: 200, 400, 401, 403, 404, 422, 429

## Per-post analytics

`GET /analytics/posts`

Scope: `analytics.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `cursor` | string | query | no | Keyset cursor from a previous page. |
| `limit` | integer | query | no | Page size (1–100). |

Responses: 200, 400, 401, 403, 404, 422, 429

## Top posts

`GET /analytics/posts/top`

Scope: `analytics.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `from` | string (date) | query | no | Window start (YYYY-MM-DD). |
| `to` | string (date) | query | no | Window end (YYYY-MM-DD). |
| `by` | enum: views | engagements | likes | comments | shares | saves | … | query | no | What ranks the posts (default views). |
| `limit` | integer | query | no | How many posts, 1-50 (default 5). |
| `clientId` | string (uuid) | query | no |  |
| `platform` | enum: x | linkedin | instagram | facebook | tiktok | youtube | … | query | no |  |
| `socialAccountId` | string (uuid) | query | no | One channel (plans with deep analytics). |

Responses: 200, 400, 401, 403, 404, 422, 429

## Per-post breakdown

`GET /analytics/posts/{id}`

Scope: `analytics.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | string (uuid) | path | yes |  |

Responses: 200, 400, 401, 403, 404, 422, 429

## Every channel's analytics

`GET /analytics/accounts`

Scope: `analytics.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `from` | string (date) | query | no | Window start (YYYY-MM-DD). |
| `to` | string (date) | query | no | Window end (YYYY-MM-DD). |
| `clientId` | string (uuid) | query | no |  |
| `platform` | enum: x | linkedin | instagram | facebook | tiktok | youtube | … | query | no |  |
| `includeDisconnected` | enum: true | false | query | no |  |
| `cursor` | string | query | no | Keyset cursor from a previous page. |
| `limit` | integer | query | no | Channels per page, 1-25 (default 10). |

Responses: 200, 400, 401, 403, 404, 422, 429

## Google search keywords

`GET /analytics/accounts/{id}/search-keywords`

Scope: `analytics.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | string (uuid) | path | yes |  |
| `month` | string | query | no | YYYY-MM (default the latest stored). |

Responses: 200, 400, 401, 403, 404, 422, 429

## Pinterest top Pins

`GET /analytics/accounts/{id}/top-pins`

Scope: `analytics.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | string (uuid) | path | yes |  |
| `days` | enum: 7 | 30 | 90 | query | no | The window ending today: 7, 30 (default) or 90 days. |
| `sortBy` | enum: IMPRESSION | SAVE | PIN_CLICK | OUTBOUND_CLICK | ENGAGEMENT | query | no | Pinterest's ranking figure. |
| `limit` | integer | query | no | How many Pins (1-25). |

Responses: 200, 400, 401, 403, 404, 422, 429

## Per-account analytics

`GET /analytics/accounts/{id}`

Scope: `analytics.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | string (uuid) | path | yes |  |

Responses: 200, 400, 401, 403, 404, 422, 429

## Per-client analytics

`GET /analytics/clients/{id}`

Scope: `analytics.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | string (uuid) | path | yes |  |

Responses: 200, 400, 401, 403, 404, 422, 429

## Best-time recommendations

`GET /best-times`

Scope: `besttimes.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `clientId` | string (uuid) | query | no |  |
| `platform` | enum: x | linkedin | instagram | facebook | tiktok | youtube | … | query | no |  |

Responses: 200, 400, 401, 403, 404, 422, 429
