Platforms/X (Twitter)/Community

X (Twitter) Community API

GET · 1 credit

Send a community's id or link, and get its name, description, members, topic, rules and creator.

GET /v1/twitter/communities

Example request

const url = `${process.env.API_URL}/v1/twitter/communities?community_id=1733520006279815231`;

const response = await fetch(url, {
  headers: { "x-api-key": process.env.API_KEY },
});

const { data } = await response.json();
console.log(data);

Parameters

ParameterRequiredDescription
community_idNoA community's id: the digits after /communities/ in its link. Give community_id or url.
urlNoA community's link: x.com/i/communities/<id>. Give community_id or url.

Example response

{
  "data": {
    "id": "1733520006279815231",
    "url": "https://x.com/i/communities/1733520006279815231",
    "name": "Astrophotography",
    "description": "Share your night-sky photos and the gear behind them.",
    "members": 84000,
    "topic": "Science",
    "join_policy": "Open",
    "nsfw": false,
    "rules": [
      "Post your own photos",
      "Credit other photographers",
      "Be kind"
    ],
    "creator_handle": "nightsky_lab",
    "banner": "https://pbs.twimg.com/community_banner_img/astro.jpg",
    "created_at": "2023-12-09T18:00:00Z"
  },
  "page": null,
  "meta": {
    "platform": "twitter",
    "endpoint": "community",
    "params": {
      "community_id": "1733520006279815231"
    },
    "request_id": "sp_req_1f8c2d3e4a5b6c7d",
    "api_version": "v1",
    "fetched_at": "2026-11-30T09:30:00Z",
    "cached": false
  }
}

An illustrative answer: live answers have the same shape, with the page's current data.

Every field, with its type, is in the API reference, and every error code in Errors.

Price

Each call costs 1 credit, a not-found answer too. Cached answers and other errors cost nothing, and credits never expire. New accounts start with 100 free credits. See pricing for the packs.

FAQ

What does join_policy mean?

Open: anyone can join. Closed: its admins approve each member.

Does it give the full rules?

It gives each rule's name, in rules.

How do I read its posts?

Send the same id to Community tweets.

Works with

Start free

Your first 100 credits are on us

Sign up, create a key and make your first call in a few minutes.

No credit card required