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 per successful request.
About this endpoint
X Communities are topic rooms with their own membership, rules, and discovery surface. Monitoring and enrichment jobs often already have a community link from a tweet, CRM note, or research list. They need the community card (name, member count, join policy, rules), not a handle timeline and not a keyword search page. Scraping `x.com/i/communities/…` yourself means opaque GraphQL payloads and empty responses that look like "missing" when the client actually failed.
`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.
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. Full parameters and examples are in the API docs linked from this page.
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}
- Profile tweetsGET /v1/twitter/profiles/{handle}/tweets
- TweetGET /v1/twitter/tweets
- Tweet repliesGET /v1/twitter/tweets/replies
- TranscriptGET /v1/twitter/tweets/transcript
- SearchGET /v1/twitter/search
- Hashtag searchGET /v1/twitter/hashtags
- Community tweetsGET /v1/twitter/communities/tweets