Get an X community
Fetch one community: its name, description, member_count, created_at, join_policy, rules and creator. x/posts with community_url gives its posts.
https://api.scrapefield.com/v1/x/communityhttps://api.scrapefield.com/v1/x/community?url=https%3A%2F%2Fx.com%2Fi%2Fcommunities%2F1926186499399139650In your code
const params = new URLSearchParams({
"id": "1926186499399139650"
});
const res = await fetch(`https://api.scrapefield.com/v1/x/community?${params}`, {
headers: { Authorization: `Bearer ${process.env.SCRAPEFIELD_KEY}` },
});
const { data, meta } = await res.json();
console.log(data, meta.credits_charged);Parameters
| Parameter | What it does |
|---|---|
url | The community's URL, https://x.com/i/communities/<id>. |
id | The number in its URL. |
fresh | Skip the cache and fetch now. Charged normally. Not available on trial credits — buy any pack to unlock it. default false |
Response
Returns one x_community. This is the demo’s answer, the one the playground above returns, in full rather than abbreviated — including the fields that come back null, because a field is null when the platform does not show it and you should know which ones those are before you build on them. A call with your key returns the account you ask for.
{
"data": {
"id": "1926186499399139650",
"url": "https://x.com/i/communities/1926186499399139650",
"name": "Home Baristas",
"description": "People who roast, brew and talk about coffee.",
"member_count": 33907,
"created_at": "2026-08-02T14:10:22.000Z",
"join_policy": "Open",
"rules": [
{
"name": "Be kind",
"description": "Disagree with the idea, not the person."
},
{
"name": "No spam",
"description": null
}
],
"creator_username": "bluedoorcoffee"
},
"meta": {
"request_id": "req_7f3ac1e94b2d40f8a1c6e5d2",
"credits_charged": 3,
"credits_remaining": 74218,
"cached": false,
"fetched_at": "2026-09-20T09:12:03Z",
"next_cursor": null
}
}Fields of x_community
An X community. Named after X's API v2.
| Field | What it is |
|---|---|
id | X's id for the community. |
url | The community on X. |
name | The community's name. |
description | What it is about, in its own words. |
member_count | How many members it has. |
created_at | When the community was made. |
join_policy | As X names it: "Open" or "Closed". |
rules | Its rules, in order. |
rules[].name | The rule's title. |
rules[].description | More about the rule. null where it has none. |
creator_username | Who made it. |
What it costs
3 credits per successful call, whether we fetch it or serve it from cache — you pay for the answer, not for how we produced it. Responses are cached for 1 day and a cached one tells you when the data was actually fetched. A call we fail costs 0 and is refunded automatically.
On the smallest pack that is $2.34 per 1,000 calls; on the largest, $1.32. The full table.
Questions
How much does the X (Twitter) community API cost?
3 credits a call: $2.34 per 1,000 calls on the smallest pack and $1.32 on the largest. A call that fails costs nothing, and the refund is automatic. A cached answer costs the same as a fresh one. Credits are bought in packs and never expire; there is no subscription.
Do I need a X account, a login or cookies?
No. You need a key from us and nothing from X. We never take a customer's login, cookies or session, at any price, and no account of yours is ever at risk.
Can I try it without signing up?
Yes. Add demo=true and leave the key out, or press Send request in the playground on this page. The demo answers with a real answer about an X community on building an audience, captured once a week, in exactly the shape a live call returns, whatever you ask, and charges nothing.
How fresh is the data?
An answer is kept for up to 1 day, and a cached one says when it was fetched, in meta.fetched_at. Add fresh=true to fetch it again now, at the same price; it needs any purchase, not the trial.
What does it return?
One x_community object. Its fields are named after X's API v2. A field is null when X does not show it, never missing. Every field is described on this page.
Can an AI agent call it?
Yes: it is the MCP tool get_x_community on our MCP server, with the same parameters, answer and price. Without a key, the tool answers from the demo.