---
title: "Read daily post analytics series"
description: "PubNio API analytics.posts.series: read daily post analytics series. Request fields, examples in five clients, errors, and idempotency."
---

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

# Read daily post analytics series

Read daily post analytics series with [`GET /api/v1/analytics/posts/{postId}/series`](https://pubnio.com/api/v1/docs#tag/analytics/GET/api/v1/analytics/posts/{postId}/series). Requires an API key with the `read` scope or a signed-in workspace member.

## Request

Daily points use UTC dates. Cumulative metrics set value to the day's increase and total to the cumulative value; a missing date means no data. How far back `from` can reach depends on the workspace plan; an earlier date returns `plan_required` with the earliest allowed date.

| Parameter     | In    | Type               | Required |
| ------------- | ----- | ------------------ | -------- |
| `postId`      | path  | UUID               | Yes      |
| `workspaceId` | query | UUID               | Yes      |
| `targetId`    | query | UUID               | No       |
| `from`        | query | string             | No       |
| `to`          | query | string             | No       |
| `timezone`    | query | string             | No       |
| `granularity` | query | `"day"`, `"total"` | No       |
| `metrics`     | query | array of string    | No       |

## Response

- HTTP 200: `PostAnalytics` with `postId`, `workspaceId`, `range`, `targets`, `freshness`.

The [OpenAPI document](https://pubnio.com/api/v1/openapi) has each field's type.

## Examples

### TypeScript

```ts
const series = await workspace.analytics.series(postId, {
  metrics: ["views", "likes"],
});
```

### Python

```python
series = workspace.analytics.get_post_series(post_id)
```

### cURL

```sh
curl "https://pubnio.com/api/v1/analytics/posts/$POST_ID/series?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY"
```

### CLI

```sh
pnio analytics posts series "$POST_ID" --metrics views,likes
```

### MCP execute

```js
async () => {
  const postId = "<postId>";
  const response = await codemode.request({
    method: "GET",
    path: `/api/v1/analytics/posts/${postId}/series`,
    query: { workspaceId: codemode.workspaceId },
  });
  return response.data;
};
```

## Errors

- [`plan-required`](https://pubnio.com/docs/problems/plan-required/): HTTP 402, Plan upgrade required

It also declares the problems [every Analytics operation](https://pubnio.com/docs/reference/#analytics) and [most operations](https://pubnio.com/docs/reference/#shared-problems) declare.

## Idempotency

None needed: a read is safe to retry.

## Limits

- Field lengths and ranges are in the [OpenAPI document](https://pubnio.com/api/v1/openapi).

## Related

- [Analytics operations](https://pubnio.com/docs/reference/#analytics)

Source: https://pubnio.com/docs/reference/analytics-posts-series/index.mdx
