X Communities API (X 社群)
3 endpoints read X Communities (X 社群): community profile, posts, members. From $0.0003 to $0.0080 a call. No X login and no cookie; a failed call is free.
What you get
The first 8 rows of a response recorded 2026-10-12 18:46 UTC. X community posts API →
What this data is
Communities on X (Twitter) are groups that people join to post around one subject. These endpoints read a community's profile, a page of the posts in it and a page of its members, all by the community's ID.
The community comes back as the same Community object as a subreddit, its posts as Post and its members as Account, so the code that reads X posts and accounts elsewhere reads these too.
- Members and moderators
metrics.membersis how many have joined. In the full view,ext.moderatorscounts the moderators andext.join_policysays how people join, as the platform words it (Open, for one).- Community ID
- A string of digits: the end of the community's link. No endpoint here searches communities, so start from one you know.
- Post counts
- A post has the counts of any X post:
metrics.commentsare replies,metrics.favoritesbookmarks,metrics.repostsretweets, with quotes apart inext.quotes.
{
"code": "ok",
"request_id": "5a160ea8-e93a-4816-a859-218a5357be6d",
"data": {
"items": [
{
"id": "1829806902753096374",
"url": "https://x.com/i/status/1829806902753096374",
"type": "text",
"text": "Everything I wish I knew about weekend hiking before starting.",
"lang": "en",
"published_at": "2026-10-12T16:07:04.000Z",
"author": {
"id": "120992799803264058",
"username": "trail_and_lens",
"name": "Maya Chen",
"avatar_url": "https://pbs.twimg.com/profile_images/1848757287189742861/SYeqkCB8_normal.jpg",
"followers": 668
},
"metrics": {
"likes": 0,
"comments": 0,
"favorites": 0,
"views": 14,
"reposts": 0
},
"images": [],
"hashtags": [],
"mentions": [
{
"id": "125986387632433993",
"username": "northside_coffee",
"name": "Leo Park"
}
],
"post_id": null,
"parent_id": null
},
// … 19 more
]
},
"page": {
"next_cursor": "c1.9YeybLwHU9zkDUcKc-7kGuDGILN2DPK12RA6xoHN",
"cursor_expires_at": "2026-10-12T19:46:55.000Z",
"has_more": true,
"returned": 20
},
"warnings": [],
"meta": {
"capability": "x.communities.posts.list",
"result_status": "complete",
"fetched_at": "2026-10-12T18:46:55.000Z",
"cached": false,
"replayed": false,
"unavailable": {
"title": "platform",
"metrics.shares": "platform",
"is_pinned": "capability",
"root_id": "platform",
"author.verified": "capability"
},
"billing": {
"amount": "0.006",
"currency": "USD",
"balance_after": "9.994"
}
}
}From a response recorded 2026-10-12 18:46 UTC. Names, text and IDs are examples, and so are the links: none is the recorded one (the page shows no one's personal data); the figures are as recorded. Long lists are cut. The request ID, cursor and balance are made up.
The 3 endpoints
Each row is an endpoint: what it returns and what one call costs.
A typical use, with its bill
Follow one community for a week. Read its profile once, a page of its posts every day and a page of its members once. Posts and members are charged by the item returned, so the bill below is the most it can come to.
Use it in your AI
Connect once and your AI finds these endpoints, checks the price and calls them by itself.
Read https://dataxapi.com/agents.md and set up DataXAPI in this agent. My API key is dx_live_…; use it for every DataXAPI call.Questions about X Communities data
Short answers. The details are on each endpoint's page.
X community posts API →How much does it cost?
Per call, no subscription. From $0.0003 to $0.0080 a call; each endpoint's page shows its own price. 2 endpoints are charged by the item returned, with a least and a most a call. You are charged when data comes back; a failed call costs nothing.
What if the community ID is wrong?
The profile answers not_found, which is not charged. The posts and members lists cannot tell a community that does not exist from one with nothing in it: both come back empty and are charged as an empty result. Check the ID with the profile first.
How many posts and members come back?
Up to 20 of each a page; pass page.next_cursor back as cursor for the next. Both are charged by the item returned.
Do I need a X Communities or X account?
No. You hold one DataXAPI key: no X login, no cookie, no advertiser account.
The same kind of data elsewhere
The same key and the same response shape read these too.
More named data products
Read X Communities with one key.
No platform login, no cookie, no subscription. A failed call is free.