Communities
X community analytics API for activity & growth
Get an X community’s likes, new members, posts, replies & unique posters. Each covers its latest period & shows its change from 1 day earlier. Costs 1 credit.
- 200
- 400
- 401
- 402
- 404
- 424
- 429
- 502
- 503
GET
X community analytics API for activity & growth
Use the X community analytics API to see how active a community is. One call returns 5 activity counts for the latest period. Each has its change in percent from 1 day earlier.
Each metric object has these fields.
The ID is not a numeric Community ID. Send the number from the community’s link. The call costs nothing.
Missing or invalid API key.
No community has this ID. Check the ID. The call costs nothing.
You exceeded your tier rate limit. Wait for the
The read failed. Retry shortly. The call costs nothing.
What each call returns
likescounts likes on the community’s posts.newMemberscounts the accounts that joined.postscounts the posts in the community.repliescounts the replies to those posts.uniquePosterscounts the distinct accounts that posted.
count and a changePercent. A negative changePercent means the count fell. periodEndsAt gives the end of the period in UTC.
Track community growth over time
Call the endpoint once a day for each community you follow. StoreperiodEndsAt with the 5 counts. A new periodEndsAt means a new period, so you can chart each metric over time.
Compare communities with the same 5 metrics. uniquePosters against posts shows whether a few accounts write most posts.
Each successful call costs 1 credit. A refused ID, a missing community or a failed read costs
nothing.
Path parameters
string
required
Numeric X Community ID, such as
1493446837214187523. Copy it from the community’s
x.com/i/communities link. Any other value gets a free 400.Query parameters
string
Fields to keep in each row, comma-separated, such as
id,text,author.username. Use dots for nested fields. Case & underscores do not matter. A row that lacks a field leaves it out. Cursors, counts & diagnostics always stay. An unknown name returns 400 unknown_field with the valid names, before any read. The price stays the same.string
Fields to drop from each row, comma-separated, such as
entities,media. It takes the same names as fields. With fields, it drops from the kept fields.Headers
string
Your API key. Send this header or
Authorization.string
Bearer followed by your API key or OAuth token.Response
200 OK
string
The community ID from your request.
string
ISO 8601 end of the latest period, in UTC.
object
The period’s activity. Each metric holds
count & changePercent.integer
The total for the period. It is never negative.
number
The change in percent from the same figure 1 day earlier, unrounded. A fall is negative.
400 Invalid community ID
401 Unauthenticated
402 Payment required
Account keys get account options. Guest keys get guest top-up only. Anonymous calls get a direct MPPWWW-Authenticate: Payment challenge.
They also get a guest wallet creation action.
No checkout starts automatically. Confirm any payment action.
404 Community not found
429 Rate limit exceeded
Retry-After header before retrying.
503 Read unavailable
Next steps. Community Info for the community’s name & rules, or Community Tweets to read its posts.