X
X Community Tweets
List the posts in an X Community by relevance or recency - text, author, likes, reposts, replies, views and media - with cursor pagination, as JSON. 1 credit.
POST/api/v1/x/community/tweets
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsoncommunity_idstringrequiredA numeric community id, from Community Search.
Example: 1508567430188126209
rankingenum<string>Post order. Omit for the community's own ordering.
Example: Recency
Relevance— Top posts.Recency— Newest first.
cursorstringPagination cursor from a previous response (next_cursor).
Notes
Each post has the same shape as X Search results. About 20 posts per page.
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
results = client.x.community_tweets(community_id="1508567430188126209")
print(results)Response
"next_cursor": "DAAFCgABHUYcWdg__-oLAAIAAADoRW1QQzZ3QUFBZlEvZ0dKTjB2R3AvQUFBQUJNZFJaUEo2MXFSbUIxREJ4akhWd0d6SFVHTks1d1dZVDRkUUdPUW5OYkJreDFEYWliYVdrREpIVVZsVGVwYU1Db2RSUWN6b3Bkd0xoMURBR053MjJId0hVVGp1NFFYa09rZFEyM2I5SmFRTEIxRS9zUHdGOEdpSFVSMlFqRlhNSm9kUHRuSno1Y2d1UjFGYlVnekZpSEZIVVJNN0c4YlVFVWRSTGFubUJvd1dSMUY4bzJDbWtEOEhVVzZWdTVYZ05JZFJCWnVCRnFCUXc9PQgAAwAAAAIAAA",
"has_more": true
},
"response_time": 3242
}