GET https://xquik.com/api/v1/styles/{id}/performance
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 returnedxUsername 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 path names the value{id}. The route reads it as a
lowercase cache key, not a numeric database ID.
Use an analyzed X (Twitter) 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 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 tweet engagement rates
Xquik returns counts. Your application can derive rates to compare tweets. Label them as application metrics, not fields returned by Xquik. Letviews equal viewCount. Use null when views equals 0.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 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, or link clicks. It also does not return 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. ChecktweetCount 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 lists every status in the OpenAPI contract.
The route returns no partial-success or asynchronous job responses.
Path parameters
Headers
Sendx-api-key with an Xquik API key. OAuth clients can send a bearer token
through the Authorization header instead.Response
200 OK
401 Unauthenticated
{ "error": "unauthenticated", "message": "Missing or invalid API key" }
Authentication failed. Replace the missing or invalid credential.402 Insufficient credits
The balance cannot cover the request. Top up through the billing page.404 Style not found
{ "error": "style_not_found", "message": "No cached style found for this username" }
No analyzed profile exists for this username and Xquik account. Analyze it
first.429 Rate limited
{ "error": "rate_limit_exceeded", "message": "Too many requests. Try again later.", "retryAfter": 1 }
Too many requests. Wait for Retry-After, then retry once.How do I check tweet analytics through the API?
Analyze an X (Twitter) username, then call this route with its returnedxUsername.
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 X (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 returnedxUsername.Related. Get Style inspects cached Tweet IDs.
List Styles lists analyzed profiles.
Response examples
- 400
{ "error": "invalid_input", "message": "Invalid input. Check the request body." } - 401
{ "error": "unauthenticated", "message": "Authentication required. Provide a valid API key or bearer token." } - 402
{ "error": "insufficient_credits", "message": "Insufficient credits. Top up or subscribe to continue." } - 403
{ "error": "api_key_paused", "message": "This API key is paused. Resume it at dashboard.xquik.com/api-keys to use it again." } - 404
{ "error": "not_found", "message": "Resource not found." } - 422
{ "error": "invalid_input", "message": "Invalid input. Check the request body." } - 429
{ "error": "rate_limit_exceeded", "message": "Too many requests. Try again later.", "retryAfter": 60 }