Introducing the Instagram APIRead more →

X (Twitter) Community API. Send a community link or ID.

Rules, admin and exact member count. We handle the proxies, blocks and platform changes.

X (Twitter) Community API at a glance

Returns a public X (formerly Twitter) Community from its link or ID: title, description, rules, admin and exact member count. It also has the topic, banner, creation time, NSFW flag, creator, moderator count, how people join (open, by approval or by invitation) and the question X asks them, who can invite, the words it is found by, and the few members X shows on its page.

GET /v1/x/community

Read the API reference
  • 1 credit per request, $0.75–$1.97 per 1,000 requests
  • 17 typed fields null when unknown
  • url is all it needs, e.g. https://x.com/i/communities/1493446837214187523
  • 100 credits free when you sign up, no card, so you can build before you spend

Send one request. Get 17 fields back.

Copy the request in your language, or hand it to your agent. Sign up for an API key and your first 100 credits are free.

$ npm install socialtap
url = https://x.com/i/communities/1493446837214187523
GET /v1/x/communityTry in
const params = new URLSearchParams({
  url: "https://x.com/i/communities/1493446837214187523",
});
const res = await fetch(`https://socialtap.dev/v1/x/community?${params}`, {
  headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, meta } = body;
console.log(data, meta.credits_charged);
200 OK · GET https://socialtap.dev/v1/x/communityLong arrays and strings are shortened here. Real responses are complete.Docs

One schema on 3 platforms.

The response reference lists every field, its type and when it is null. See the full schema.

  • Null means unknown

    A field X doesn't show is null, never zero or an empty string, so a real zero always means zero.

  • What it accepts

    The community: its link on x.com or twitter.com (x.com/i/communities/<id>, any of its views such as /about, /media or /members included, mobile hosts and any query too) or its numeric ID.

  • Write one parser

    X, Facebook and Reddit answer in these fields, so the code that reads one reads them all.

platformstring
Platform ID (reddit, facebook, …).
idstring
Platform-native community ID (string): Reddit's subreddit ID with its t5_ prefix, Facebook's numeric group ID.
namestring
The name its links use, without a prefix (golang for r/golang; a Facebook group's vanity name); null when it has none (a Facebook group known only by its number).
titlestring
The community's title as its page shows it ("The Go Programming Language"; what Facebook calls a group's name); null when it has none.
descriptionstring
Its short description as plain text; null when it has none.
urlstring
Canonical community URL (https://www.reddit.com/r/golang/, https://www.facebook.com/groups/<id>/).
avatar_urlstring
The community's icon or picture; null when it has none. Platform CDN URLs can expire.
banner_urlstring
Header or cover image URL; null when it has none.

What teams build with the X (Twitter) Community API.

  • Vet a community's rules before posting

  • Track a community's member count over time

  • Find who runs a community

  • Enrich community links with titles and topics

Good to know before you build.

  • privacy is public when anyone can join and restricted when joining takes a request or an invitation. Anyone can read the posts of both, and platform_specific.x.join_policy says which restriction applies.
  • name and avatar_url are always null: X Communities have no vanity name (their links use the ID) and no icon, only a banner. banner_url is the community's own banner, or the stock image X gives it.
  • moderators holds only the admin, because X lists the other moderators and the members to logged-in people alone. platform_specific.x.moderator_count counts them, and sample_members is the few members X picks for the page.
  • When X's community API fails, the community comes from its page, which lacks the admin, invite policy, moderator count and search tags: those are then null or listed in unknown_fields.
  • A community that never existed and one X removed look the same on X, and both return not_found. Every community X still serves is readable logged out, so none returns private_or_unavailable.

1 credit per request. Failed requests are free.

Buy credits once and spend them on any endpoint, on any platform.

SourcePrice per successful requestPer 1,000 requests
Any source1 credit$0.75–$1.97
  • Cache hits are free.
  • Credits from packs and top-ups never expire.
  • A monthly plan's credits are spent first, and what is left of them ends at each renewal.
  • Prices exclude tax: sales tax is added at checkout where it applies.
  • Outside the US, plans and packs are sold to businesses: checkout asks for your VAT, GST or other business tax ID.

Questions about the X (Twitter) Community API.

More in the API reference.

How much does the X (Twitter) Community API cost?
A request costs 1 credit. SocialTap credits cost $0.75–$1.97 per 1,000, depending on the plan or pack.

Try it on a link you already have.

Paste it in the playground, or copy the request into your code.

100free credits
  • No credit card
  • Failed requests are free
  • Works on all 218 endpoints
Start for free Read the docs