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.
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 policiesReceive 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.
Parameters
| Parameters | Required | Description |
|---|---|---|
urls | Required | Required 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 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.
- Open the public community page and copy its /i/communities/ link; prepare one link for each community you want to look up.
- 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.
- 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.
- 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.
- 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"]}'Best Use Cases
- Create a directory of communities to explore: Put community names, descriptions, links and member counts 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.
Pro Tips
- If you start from a post rather than a community page, find the public community link first because this lookup 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.
Related APIs
Use these APIs when you need a different type of public X data.
- Twitter Tweet Scraper API — Retrieve public post text, authors, engagement, media, hashtags, mentions, and conversation relationships from x.com or twitter.com status URLs.
- Twitter Profile Scraper API — Retrieve public account identity, biographies, avatars, cover images, account status, and visible audience statistics by username.
- Twitter User Tweets Scraper API — Collect recent public posts, authors, media, hashtags, mentions, and engagement by username with replies excluded.
- Twitter Search API — Find public posts by search expression with latest or top ordering and a configurable result limit.
- 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 Post Quotes API — Collect public quote posts for known status URLs with commentary, authors, engagement, media, timestamps, and source-post context.
- X Post Replies API — Collect public replies from X post URLs with selectable ordering, reply text, authors, visible engagement, media, and parent-post context.
- X Post Retweeters API — Collect a task-level unique set of normalized public profiles for accounts that reposted known X or Twitter status URLs.
- X Trends API — Collect current public X trend snapshots for known numeric WOEIDs with source rank, query, description, and location context.
- Twitter Mentions API — Collect public posts mentioning a specified account.
- Twitter User Search API — Find public X accounts by keyword.
- X Community Posts API — Read the public posts shared in a community, with their text, authors and interaction counts.
- X Thread Context API — Read a post with earlier messages along its reply chain, public replies and relationship IDs.