Skip to main content
GET
Tweet Analytics API for Likes, Replies & Reposts
1 credit per tweet returned · All plans from $0.00012/credit

Refresh Tweet Engagement for a Cached Style

Call this endpoint to refresh public engagement counts for cached tweets. Xquik looks up each stored Tweet ID and returns current cumulative metrics. Start with Analyze & Cache Style. Then pass its returned xUsername as {id}. The lookup stays inside the authenticated Xquik account. This route contacts X on every request. It does not return saved analytics, historical deltas, or a precomputed engagement rate.

Use an Analyzed X Username

The {id} name comes from a shared style path. This handler uses it as a lowercase cache key, not a numeric database ID. Use an analyzed X username whose samples contain live Tweet IDs. A custom style saved from supplied text contains local sample IDs. Those IDs cannot produce X tweet analytics. The route processes at most 100 cached Tweet records. Use Get Style to inspect the stored sample count first.

Read Every Tweet Analytics Field

The response returns one row per refreshed Tweet. Each count is cumulative at request time. Reposts and quote posts are separate counts. Do not add quotes into retweetCount twice. viewCount is not a unique-audience field. Repeat exposure can increase the count. See the X public metric definitions.

Store Reproducible Tweet Analytics Snapshots

The response does not provide a measurement timestamp or historical baseline. Record the client request time beside every successful response. Keep each Tweet ID, metric row, and measurement time together. Use this snapshot key: Do not overwrite an earlier snapshot. Store each request separately. Calculate deltas only between snapshots for the same Tweet ID.

Calculate Useful Tweet Engagement Rates

Xquik returns counts. Your application can derive rates for consistent comparisons. Label them as application metrics, not fields returned by Xquik. Let views equal viewCount. Use null when views equals zero. Do not include viewCount in the interaction numerator. A view is the denominator for these derived rates. Use medians when comparing several tweets. One viral post can distort an average. Keep raw counts beside every derived rate.

Compare Current and Earlier Tweet Metrics

For 2 snapshots, subtract earlier counts from later counts. Reject negative deltas until you confirm both snapshots used the same Tweet and field meaning. Counts can change after publication. Avoid comparing posts measured at different ages without labeling that difference.

Separate Tweet Analytics from Account Analytics

This route measures only the cached tweets in one style profile. It does not return follower growth, following changes, profile visits, link clicks, audience demographics, or an account-wide Twitter analytics report. You can analyze another public X account after caching its username. The result covers cached public Tweets only. It does not expose private analytics. Use Compare Styles for 2 writing sample sets. That route does not fetch live engagement metrics.

Budget a Tweet Analytics Refresh

Each returned Tweet costs 1 credit. Check tweetCount through Get Style before requesting a refresh. The route can process up to 100 cached Tweets. Store the returned tweetCount with billing reconciliation. It counts metric rows returned by this request, not the profile’s lifetime Tweet total.

Handle Unavailable Cached Tweets

Every cached ID must still resolve as a live X Tweet. Deleted, protected, or otherwise unavailable Tweets cannot produce a metric row. Re-analyze the username when the cache contains stale Tweet IDs. Never replace an unavailable Tweet ID with another post during snapshot reconciliation.

Handle Tweet Analytics Errors

The response widget includes every status in the canonical OpenAPI contract. Do not invent partial-success or asynchronous job responses.

Path Parameters

string
required
Analyzed X username whose cache contains live Tweet IDs. Xquik lowercases the value before an account-scoped lookup. It is not a numeric database ID.

Headers

Send x-api-key with an Xquik API key. OAuth clients can send a bearer token through the Authorization header instead.
string
required
Your Xquik API key. Generate one from the dashboard.

Response

200 OK

string
Lowercase analyzed X username.
number
Number of Tweet metric rows returned.
object[]
Current Tweet text and public engagement counts.

401 Unauthenticated

Authentication failed. Replace the missing or invalid credential.

402 Insufficient Credits

The balance cannot fund the request. Top up through the billing page.

404 Style Not Found

No analyzed profile exists for this username and Xquik account. Analyze it first.

429 Rate Limited

Too many requests. Wait for Retry-After, then retry once.

How Do I Check Tweet Analytics Through the API?

Analyze an X username, then call this route with its returned xUsername. Store each response with your own UTC measurement timestamp.

Does This Return Live Twitter Analytics?

Yes. Each request refreshes current public counts for cached Tweet IDs. It does not return private metrics or historical deltas.

Can I Check Twitter Analytics for Another Account?

Yes, for public Tweets cached by your Xquik account. The response excludes private account analytics, follower growth, profile visits, and link clicks.

Is viewCount a Unique Viewer Count?

No. Treat it as exposure, not unique people. Repeat views can increase the count.

Why Does Tweet Analytics Return 404?

The Xquik account has no analyzed profile for that lowercase username. Call Analyze Style, then retry with the returned xUsername.
Related: Get Style inspects cached Tweet IDs. List Styles inventories analyzed profiles.