App Logo
x.com

Get X post analytics

Read a single X post's owner-only analytics panel (impressions, engagements, detail expands, profile visits, link clicks, and on media posts views/unique views, plus likes, reposts and replies) by post URL or id. Requires that the post belongs to the logged-in account. Returns metrics as a label-to-value list since the set varies by post type; the UI is assumed to be English, and abbreviated large counts (e.g. 1.2K) make `value` approximate. X sometimes shows a transient Retry error, so re-run on failure.

Input

post required

A post URL (e.g. https://x.com/<handle>/status/1234567890, with or without /analytics, any handle) or a bare numeric post id. The id is extracted and the handle-independent /i/status/<id>/analytics URL is used.

Output

id required

The post id read from the input.

metrics required

One entry per metric shown in the analytics grid, in display order. The set varies by post type (media posts add Views/Unique views; posts without links omit Link clicks).

engagement required

The public likes/reposts/replies counts shown on the post card. Keys absent if not exposed.

text optional

The post body text as shown in the analytics card.

handle optional

@handle of the post author (the logged-in user, since analytics is owner-only).

postedAt optional

ISO timestamp the post was published (from the <time> element).

Start building not clicking