App Logo
x.com

X (Twitter) analytics unofficial API: export your post analytics

Automatically export your post analytics on x.com. An unofficial X (Twitter) analytics API: export the analytics of one of your posts (impressions, engagements, profile visits, link clicks) as data, in one call, without the X API. To export a whole account, list its posts with get_user_posts and run this on each. 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).

FAQ

An unofficial X (Twitter) analytics API: export the analytics of one of your posts (impressions, engagements, profile visits, link clicks) as data, in one call, without the X API. To export a whole account, list its posts with get_user_posts and run this on each. 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.
Ask an AI agent connected to Reduck to run reduck/x.com/get_post_analytics, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/x.com/get_post_analytics
You do not need one. "X (Twitter) analytics unofficial API: export your post analytics" drives the real x.com pages in a browser, so it works whether or not x.com offers an API for this.
Required: post.
It returns id, text, handle, metrics, postedAt, engagement.
Yes. It acts as you on x.com: on your own Chrome it reuses your session, and on a Reduck-hosted browser it loads the x.com cookies saved by the Reduck extension.
It only reads. It looks things up on x.com and changes nothing there.
Ask an AI agent connected to Reduck to run reduck/x.com/get_post_analytics, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/x.com/get_post_analytics
It is part of Reduck's official curated catalogue.

Start building not clicking