X Community Posts
X community posts are messages shared inside a topic-based community, each with an author, publication time, text and any attached media. Reading those posts together with their interaction counts helps organize the discussion material and compare the individual posts that make up a community’s public conversation.
X Community Posts API Features
- Read posts from the community you specifyThe X Community Posts API starts from a community link to collect public discussions in that community, rather than the collection of posts published on one person’s profile.
- Apply a separate cap to every communityWhen you supply several community links, results_limit applies to each one and posts are collected in creation-time order, so your input specifies the collection size for each discussion space.
- Keep the message and its supporting details togetherEach X Community Posts API record contains its text, author information, publication time, media and available interaction counts, making it possible to review the message without losing who published it or when.
X Community Posts API 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. |
results_limit | Optional | Optional maximum posts per community; defaults to 100 and accepts multiples of 20 from 20 to 2000, such as 20, 40 or 100; with two community links and a limit of 20, each community can contribute up to 20 posts. |
How to Use the X Community Posts API
Calling the X Community Posts API 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.
- Copy the links of the communities you want to read and choose a per-community limit such as 20 or 100; use a community link rather than an individual post URL.
- 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-posts 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 X Community Posts API task succeeds, read data.results.items: each item in this list describes one community post. 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-posts" \
-H "Authorization: Bearer $SOCQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{"urls":["https://x.com/i/communities/1493446837214187523"],"results_limit":20}'X Community Posts API Use Cases
- Prepare source material for a discussion digest: Organize the post text, author handles, links and times retrieved by the X Community Posts API into a reading list that someone or a separate summarization tool can use to write a digest of those posts.
- Compare a post’s interaction counts across saved snapshots: Store post IDs and the returned counters with collection times, then match the same posts in later collections to calculate changes in the available counts yourself.
- Investigate a selected post’s surrounding conversation: Choose a post from the X Community Posts API results and pass its post URL to X Thread Context to read the available earlier posts and replies around that particular message.
X Community Posts API Pro Tips
- When planning a batch, multiply the number of community links by results_limit to estimate the requested record count, then use the per-post rate rather than assuming the limit is shared by all communities.
- When repeating an X Community Posts API collection, match posts by their IDs before appending them to your saved table, because a post can appear again in a later task.
- When keeping results from several communities, save the submitted community links with the task input; the standard post record does not guarantee a community ID that can replace that input context.
Related APIs
Beyond the X Community Posts API, 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 User Tweets Scraper API — Collect recent public posts, authors, media, hashtags, mentions, and engagement by username with replies excluded.
- X Post Quotes API — Collect public quote posts for known status URLs with commentary, authors, engagement, media, timestamps, and source-post context.
- Twitter Mentions API — Collect public posts mentioning a specified account.
- X Thread Context API — Read a post with earlier messages along its reply chain, public replies and relationship IDs.
- X List Tweets API — Read a list's timeline, newest first, with reposts flagged and their original authors.
- Twitter Profile Scraper API
- Twitter Search API
- X Followers List API
- X Following List API
- X Post Replies API
- X Post Retweeters API
- X Trends API
- Twitter User Search API
- X Community API
- X Account Location API
- X Verified Followers API
- Twitter List Members API
- Twitter List Followers API
- X Community Members API
- X Community Moderators API
- X Communities Search API
- X Articles API
- X Spaces API
- Twitter Media Scraper API
- X User Replies API
- Twitter Follow Checker API
- Twitter Video Transcript API