---
title: "Read one account's analytics"
description: "PubNio API analytics.accounts.get: read one account's analytics. 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 one account's analytics

Read one account's analytics with [`GET /api/v1/workspaces/{workspaceId}/analytics/accounts/{accountId}`](https://pubnio.com/api/v1/docs#tag/analytics/GET/api/v1/workspaces/{workspaceId}/analytics/accounts/{accountId}). Requires an API key with the `read` scope or a signed-in workspace member.

## Request

Returns totals or a daily series for one provider account in the workspace. How far back a daily series can reach depends on the workspace plan; an earlier `from` returns `plan_required` with the earliest allowed date.

| Parameter     | In    | Type               | Required |
| ------------- | ----- | ------------------ | -------- |
| `workspaceId` | path  | UUID               | Yes      |
| `accountId`   | path  | UUID               | Yes      |
| `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: `AccountAnalytics` with `accountId`, `workspaceId`, `provider`, `accountKind`, `profileId`, `name`, `range`, `metrics`, `series`, `freshness`.
  - `provider`: `bluesky`, `facebook`, `instagram`, `linkedin`, `pinterest`, `reddit`, `snapchat`, `tiktok`, `threads`, `x`, `youtube`, `google_business`, `meta_ads`, `google_ads`, `reddit_ads`, `pinterest_ads`, `tiktok_ads`, `linkedin_ads`, `snapchat_ads`, `amazon_ads`, `openai_ads`
  - `accountKind`: `social_page`, `social_account`, `social_board`, `social_channel`, `ad_account`

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

## Examples

### TypeScript

```ts
const analytics = await workspace.analytics.account(accountId, {
  from: "2026-11-01",
  to: "2026-11-30",
});
```

### Python

```python
analytics = workspace.analytics.get_account(account_id)
```

### cURL

```sh
curl "https://pubnio.com/api/v1/workspaces/$WORKSPACE_ID/analytics/accounts/$ACCOUNT_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY"
```

### CLI

```sh
pnio analytics accounts get "$ACCOUNT_ID" --from 2026-11-01 --to 2026-11-30
```

### MCP execute

```js
async () => {
  const accountId = "<accountId>";
  const response = await codemode.request({
    method: "GET",
    path: `/api/v1/workspaces/${codemode.workspaceId}/analytics/accounts/${accountId}`,
  });
  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-accounts-get/index.mdx
