Endpoints
| Endpoint | Returns and price |
|---|---|
GET /v1/communities/{communityId}Community information | Community · $0.001 per request |
GET /v1/communities/{communityId}/postsCommunity posts | Page of posts · $0.10 per 1,000 records |
GET /v1/communities/{communityId}/membersCommunity members | Page of accounts · $0.01 per 1,000 accounts |
GET /v1/communities/{communityId}/moderatorsCommunity moderators | Page of accounts · $0.01 per 1,000 accounts |
All routes take Authorization: Bearer $TWITTERXAPI_KEY and level. Collections return one page; continue with the cursor.
Find the community ID
- Use the number in the community URL, for example
x.com/i/communities/1493446837214187523.
GET/v1/communities/{communityId}Community
Community information
Name, description, member and moderator counts, and rules.
| Parameter | In | Description |
|---|---|---|
communityId requirednumeric string | path | Numeric ID from a community URL such as x.com/i/communities/1493446837214187523. |
levelraw | moderate | contentful | query | Response level. Defaults to moderate. |
Returns: Community · Price: $0.001 per request
cURL
curl "https://twitterxapi.com/api/v1/communities/1493446837214187523" \
-H "Authorization: Bearer $TWITTERXAPI_KEY"GET/v1/communities/{communityId}/postsPage of posts
Community posts
One page of posts from the community.
| Parameter | In | Description |
|---|---|---|
communityId requirednumeric string | path | Numeric ID from a community URL such as x.com/i/communities/1493446837214187523. |
cursorstring | query | Value of pagination.next_cursor from the previous page. Omit for the first page. |
levelraw | moderate | contentful | query | Response level. Defaults to moderate. |
Returns: Page of posts · Price: $0.10 per 1,000 records
cURL
curl "https://twitterxapi.com/api/v1/communities/1493446837214187523/posts" \
-H "Authorization: Bearer $TWITTERXAPI_KEY"GET/v1/communities/{communityId}/membersPage of accounts
Community members
One page of community members.
| Parameter | In | Description |
|---|---|---|
communityId requirednumeric string | path | Numeric ID from a community URL such as x.com/i/communities/1493446837214187523. |
cursorstring | query | Value of pagination.next_cursor from the previous page. Omit for the first page. |
levelraw | moderate | contentful | query | Response level. Defaults to moderate. |
Returns: Page of accounts · Price: $0.01 per 1,000 accounts
cURL
curl "https://twitterxapi.com/api/v1/communities/1493446837214187523/members" \
-H "Authorization: Bearer $TWITTERXAPI_KEY"GET/v1/communities/{communityId}/moderatorsPage of accounts
Community moderators
One page of community moderators.
| Parameter | In | Description |
|---|---|---|
communityId requirednumeric string | path | Numeric ID from a community URL such as x.com/i/communities/1493446837214187523. |
cursorstring | query | Value of pagination.next_cursor from the previous page. Omit for the first page. |
levelraw | moderate | contentful | query | Response level. Defaults to moderate. |
Returns: Page of accounts · Price: $0.01 per 1,000 accounts
cURL
curl "https://twitterxapi.com/api/v1/communities/1493446837214187523/moderators" \
-H "Authorization: Bearer $TWITTERXAPI_KEY"