# X views in the PubNio analytics API

For X, PubNio's `views` and `impressions` are the same number: PubNio reads one counter, `impression_count`, into both keys. A post prefers the non-public value, then the organic one, then the public count. Do not add the two metrics together. Provider facts checked 2026-12-05.

## What PubNio returns

| Metric | Scope | X field | Unit | Combines by |
| --- | --- | --- | --- | --- |
| `views` | post | `impression_count` | count | sum |
| `views` | account | sum of posts' `impression_count` | count | sum |
| `impressions` | post | `impression_count` | count | sum |
| `impressions` | account | sum of posts' `impression_count` | count | sum |

`views`: Provider-defined content or video views.

`impressions`: Times content was displayed, including repeat views.

## How PubNio reads it

- X's metrics reference lists one impressions field for a post, `public_metrics.impression_count`; the adapter copies that count to `impressions` and to `views`.
- Account views and impressions are both the sum of `impression_count` over the account's posts in the range, so they match too.

## Example

The capabilities endpoint answers without calling X. Under the X provider, these are its entries for `views`.

```http
GET /api/v1/workspaces/4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b/analytics/capabilities
Authorization: Bearer pn_live_***
```

```json
[
  {
    "key": "views",
    "scope": "post",
    "granularity": "day",
    "unit": "count",
    "aggregation": "sum",
    "availability": "available",
    "supported": true,
    "renamedFrom": "impression_count"
  },
  {
    "key": "views",
    "scope": "account",
    "granularity": "day",
    "unit": "count",
    "aggregation": "sum",
    "availability": "available",
    "supported": true
  }
]
```

## Limits

- PubNio stops re-reading an X post 366 days after it is published, so a post's `views` stops changing then.
- An account `views` total is the last daily read's value for its window, 30 days before the read through the day of the read, whatever `from` and `to` the request names. Per-day values come from the daily series, which the workspace plan bounds.
- A metric X does not report comes back with `value: null` and an availability state that says why. A post with no stored values whose last read failed on permissions, a rate limit, or a transient error answers with that error instead.

## Sources

- [X API: Metrics](https://docs.x.com/x-api/fundamentals/metrics), read 2026-12-05

## Related

- [X (Twitter) analytics API: the metrics PubNio reads](https://pubnio.com/platforms/x/analytics)
- [X OAuth scopes](https://pubnio.com/docs/providers/x/scopes/)
- [API reference: analytics capabilities](https://pubnio.com/docs/reference/analytics-capabilities-get/)

