X Communities API (X 社群)

Also known astwitter communitiesx communitytwitter community推特社群

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.

Run it in the PlaygroundUse it in your AISign in to run it. Free trial, no card.
Endpoints3 endpointscommunity profile, posts, members
PriceFrom $0.0003per call. Failed calls are free
When an upstream failsRetried for youon the same route, or a backup route; never charged
UpdatesLivefetched at the moment of the call

What you get

The first 8 rows of a response recorded 2026-10-12 18:46 UTC. X community posts API →

FieldValue
typetext
langen
published_at2026-10-12 16:07 UTC
author.followers668
metrics.likes0
metrics.comments0
metrics.favorites0
metrics.views14

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.members is how many have joined. In the full view, ext.moderators counts the moderators and ext.join_policy says 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.comments are replies, metrics.favorites bookmarks, metrics.reposts retweets, with quotes apart in ext.quotes.
A recorded response
{
  "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.

X community posts API · This example as a JSON file

The 3 endpoints

Each row is an endpoint: what it returns and what one call costs.

EndpointPathReturnsPrice
X community membersGET/v1/x/communities/members/listAccount list$0.0004 / item
X community profileGET/v1/x/communities/getCommunity$0.0004
X community postsGET/v1/x/communities/posts/listPost list$0.0003 / item
Prices are the prices in force. A call that fails, or whose result is uncertain, costs nothing.See live status →

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.

CallTimesCost
X community profile1 × $0.0004$0.0004
X community posts7 × $0.0060$0.0420
X community members1 × $0.0080$0.0080
In all, 9 callsat most$0.0504

Use it in your AI

Connect once and your AI finds these endpoints, checks the price and calls them by itself.

Just say itAny connected AI
Use DataXAPI to read the latest posts of this X community and tell me what its members are talking about this week.
Not connected yet?Paste this prompt into your agent
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.
Sign in to copy it with your key
Ask with this pageSends the Markdown version

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.

All 21 X endpoints →

More named data products

Read X Communities with one key.

No platform login, no cookie, no subscription. A failed call is free.

Start free