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 toimpressionsand toviews. - Account views and impressions are both the sum of
impression_countover 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.
GET /api/v1/workspaces/4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b/analytics/capabilities
Authorization: Bearer pn_live_***
[
{
"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
viewsstops changing then. - An account
viewstotal is the last daily read's value for its window, 30 days before the read through the day of the read, whateverfromandtothe 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: nulland 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, read 2026-12-05

