Communities
Search tweets within an X Community by keyword
Returns tweets, not community records. Requires a Community ID.
get/x/communities/search
Query parameters
communityIdstring required
Numeric ID of the community whose posts to search
qstring required
Search query
queryType'Latest' | 'Top'
Sort order (Latest or Top)
cursorstring
Pagination cursor for community search
pageSizeinteger
Maximum page items (1-100, default 20). Source, filters, or credits can reduce results. Continue while has_next_page is true. Deprecated limit and count aliases remain accepted.
Response
Tweet search results from the selected X Community
Example response
{
"tweets": [
{
"id": "1234567890",
"text": "Just launched our new feature!",
"retweetCount": 5,
"replyCount": 3,
"likeCount": 42,
"quoteCount": 1,
"viewCount": 1500,
"bookmarkCount": 2
}
],
"has_next_page": true,
"next_cursor": "DAACCgACGRElMJcAAA"
}