x/
community

The X Community API reads public community details from community links, including descriptions, member counts and rules, with support for looking up several communities at once.

X Community API

Community details
Member and moderator counts
Rules and joining policies
0.5 credits / result
Ready
Ready

Enter parameters and send a request. The task status and normalized results will appear here.

README

X Community

An X community is a topic-based discussion space with a name, description, membership counts and rules for participation. Those details help readers understand the subject of the community, compare its size with others and check its participation policies before exploring the discussions.

X Community API Features

  • Understand what a community is aboutGet the community name, public description, link, cover image and creator information together, so you can identify the space and read its stated topic before looking for posts.
  • See its membership size and participation policiesThe X Community API returns member and moderator counts together with join_policy and invites_policy, which describe how joining and member invitations are handled.
  • Read the community’s own rulesThe rules list includes rule names and descriptions, allowing you to keep the participation requirements alongside the community’s basic information.

X Community API Parameters

ParametersRequiredDescription
urlsRequiredRequired list of public X community links with a numeric community ID, such as https://x.com/i/communities/1493446837214187523; put one link on each line in the Playground, or use a JSON urls array in code, rather than a profile, search or individual post link.

How to Use the X Community API

Each X Community API request starts a background collection task, so its first response gives you a task ID rather than the finished data; use that ID to check progress and retrieve the results.

  1. Open the public community page and copy its /i/communities/ link; prepare one link for each community you want to look up with the X Community API.
  2. Before running the example, replace $SOCQ_API_KEY with your own API key or set that environment variable. Send the JSON input to POST /v1/x/community with the Authorization header shown below, then save the task_id from the response.
  3. Use GET /v1/tasks/{task_id} with the saved ID to check progress. queued means waiting, running means collection is in progress, and retrying means another attempt is underway. Wait for succeeded before reading the results; if the task is failed, read error_message for the reason.
  4. When the task succeeds, read data.results.items: each item in this list describes one community’s details. An empty list means the task completed without returning any records.
  5. If data.results.has_more is true, the next_cursor value is the marker for another page of saved results. Copy it unchanged into the cursor parameter of GET /v1/tasks/{task_id}?cursor=... and continue until has_more is false.
curl -X POST "https://api.socq.ai/v1/x/community" \
  -H "Authorization: Bearer $SOCQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://x.com/i/communities/1493446837214187523"]}'

X Community API Use Cases

  • Create a directory of communities to explore: Put the community names, descriptions, links and member counts from the X Community API into a table so someone can compare the supplied communities by topic and size before deciding which discussions to read.
  • Keep participation rules with a discussion review: Save the rules and membership policies under the community ID, then use X Community Posts separately to attach the posts you want to review to that community background.

X Community API Pro Tips

  • If you start from a post rather than a community page, find the public community link first because the X Community API does not determine a post’s community from the post URL.
  • When the same community appears under x.com and twitter.com links, use the numeric ID after /i/communities/ as the matching key so you do not create duplicate directory entries.
  • When comparing communities, use member counts as a size measurement rather than evidence of how actively members are posting; this result contains no activity history or list of individual members.

Beyond the X Community API, use these APIs when you need a different type of public X data.

  • Twitter Profile Scraper API — Retrieve public account identity, biographies, avatars, cover images, account status, and visible audience statistics by username.
  • X Followers List API — Collect public follower account identities and visible profile metrics for one or more X usernames.
  • X Following List API — Collect profiles followed by public X accounts, including identity, biographies, account signals, visible counters, and source usernames.
  • X Community Posts API — Read the public posts shared in a community, with their text, authors and interaction counts.
  • X Community Members API — Export a community's members as full profiles with bios and follower counts.
  • X Community Moderators API — Get the admins and moderators who run a community, as full profiles.

Explore other platforms

Combine X data with public data from other supported social platforms.

X Community API — FAQ

X Community API is a programmatic interface for retrieving public X community information from a list of community links. It returns community names, descriptions, member and moderator counts, rules and joining policies so you can understand each community before exploring its posts.

A community link contains /i/communities/ followed by a numeric ID. A profile link points to an account, and a /status/ link points to a post, so neither is the input for this lookup.

No. A count tells you how many members the community has, not who those members are; the response does not contain a member directory.

No. This lookup returns the community’s description, rules and other metadata. Use the same community link with X Community Posts when you need the discussions themselves.

No. X communities are spaces organized around shared discussion topics. Community Notes are annotations on posts, and those annotations are not the object returned here.

The X Community API charges 0.5 credits for each returned community record, with no base charge. For example, four submitted community links estimate 2 credits, and four returned community records cost 2 credits.

By SocQ · Updated

From the official X API documentation:

“The X API uses pay-per-usage pricing. No subscriptions—pay only for what you use.”
X Developer Platform: X API introduction · accessed November 2026