Analytics API

X analytics API

Read X numbers through the same call you use for every other network, in one normalised shape, with an honest account of which metrics X genuinely reports.

Analytics for X

One call returns a post's numbers in the same shape as every other network, so your code reads impressions and likes without knowing which network it is looking at.

curl https://api.postlake.dev/v1/posts/post_…/analytics \
  -H "Authorization: Bearer $POSTLAKE_API_KEY"

What X actually reports

This is the part usually left vague. Networks do not report the same things, and pretending they do produces charts that are quietly wrong.

MetricOn X
ImpressionsReported
ViewsNot reported by this network
ReachNot reported by this network
Likes, comments, sharesReported where the network exposes them
Saves and clicksReported where the network exposes them

X reports impressions, so views stays at zero rather than being filled with the impression count. A zero here means "this network does not report it", not "nobody watched".

Comparing X against your other networks

GET /v1/analytics?period=30d returns every connected account together, already normalised, so an agent can decide what to post next rather than only report what happened. Because the shapes match, comparing X to the rest is arithmetic instead of a mapping exercise.

Where a network is missing a metric it is a zero with a known reason, not a gap you have to investigate. That honesty is the difference between a dashboard you trust and one you quietly stop opening.

Common questions

Is there a X analytics API?

X exposes analytics to approved applications, and PostLake wraps it so you get the same response shape as every other network. One call, one format, no per-network parsing.

Which metrics does X return?

Primarily impressions, plus engagement counts where the network exposes them.

Why is a metric zero?

Because that network does not report it. PostLake never fills a missing metric with a related one. A zero means "not reported here", which is a different and more useful fact than a number that quietly came from somewhere else.

Can an agent read these numbers?

Yes. Over MCP it is get_post_analytics for one post and get_analytics for everything, returned as a table an agent can act on rather than raw JSON it has to re-request.

Related