X (Twitter) Community API
Resolve a public x.com/i/communities/… URL to name, member count, rules, join policy, and creator — same Social Fetch envelope as other Twitter routes.
GET /v1/twitter/communities1 credit A not-found answer is still charged Service failures are free
About this endpoint
GET /v1/twitter/communities takes a required url query param (a public community permalink such as https://x.com/i/communities/{id}). Send x-api-key, then branch on data.lookupStatus before you write a row. On found, data.community carries id, canonical url, name, description, createdAt (Unix ms), memberCount, isNsfw, joinPolicy (open or restricted), primaryTopic, bannerImageUrl, creator (handle plus verification flags), rules, memberFacepileAvatarUrls, and trendingHashtags when X exposes them. On not_found, community is null. Bill from meta.creditsCharged — this operation is 1 credit per successful request, including not_found.
This route is the community card only. Posts inside a community are GET /v1/twitter/communities/tweets. Profile cards are GET /v1/twitter/profiles/{handle}. Keyword and hashtag discovery are separate search routes on the same Twitter hub.
Price
From $1.35 per 1,000 requests
1 credit per request, including when nothing is found. Errors are free.
- Scale pack
- $1.64 / 1,000
- Growth pack
- $2.36 / 1,000
The lowest rate is on annual plans; packs are pay as you go.
Example request
Send your API key in the x-api-key header. New accounts get 100 free credits, no card needed.
Example response
A 200 response. Live responses have the same shape with current data.
X (Twitter) Community API FAQ
How do I look up an X / Twitter community by URL?
Call GET /v1/twitter/communities with your Social Fetch API key in the x-api-key header and a required url query param (public x.com/i/communities/… permalink). Read data.lookupStatus, then data.community when found. See the API docs for parameters and examples.
How much does the Twitter community lookup cost?
Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth.
What URL should I pass for Twitter community lookup?
Pass a public community permalink such as https://x.com/i/communities/{id}. Profile, status, and hashtag URLs belong on other Twitter routes. Unresolved or inaccessible communities usually resolve as lookupStatus: not_found.
What does the community response include?
On a found lookup, data.community can include id, url, name, description, createdAt, memberCount, isNsfw, joinPolicy (open or restricted), primaryTopic, bannerImageUrl, creator (handle, verified, blueVerified), rules, memberFacepileAvatarUrls, and trendingHashtags. Exact nullability lives in the OpenAPI schema for this route.
Community card vs community tweets?
Use this route for community metadata by URL. Use GET /v1/twitter/communities/tweets to page posts from that community. They are separate marketplace operations with their own credit notes.
What does joinPolicy mean?
joinPolicy is open or restricted. Open means anyone can join under X's normal rules for that community. Restricted means join requests need moderator approval. The field describes the published policy; it does not grant you membership or private content.
Do I need an X developer app or Bearer token?
No. You authenticate to Social Fetch with an API key. The route reads public community details; it does not act on behalf of a logged-in X user or require elevated X API access.
Other X (Twitter) endpoints
- ProfileGET /v1/twitter/profiles/{handle}
- ProfilesGET /v1/twitter/profiles
- About accountGET /v1/twitter/profiles/{handle}/about
- Profile followersGET /v1/twitter/profiles/{handle}/followers
- Verified followersGET /v1/twitter/profiles/{handle}/followers/verified
- Follower idsGET /v1/twitter/profiles/{handle}/followers/ids
- Profile followingGET /v1/twitter/profiles/{handle}/following
- Following idsGET /v1/twitter/profiles/{handle}/following/ids