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.

X (Twitter): LiveView as Markdown

What PubNio returns

MetricScopeX fieldUnitCombines by
viewspostimpression_countcountsum
viewsaccountsum of posts' impression_countcountsum
impressionspostimpression_countcountsum
impressionsaccountsum of posts' impression_countcountsum

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.

request.http
GET /api/v1/workspaces/4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b/analytics/capabilities
Authorization: Bearer pn_live_***
response-excerpt-x-metrics.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