Community
Community Info
Get X/Twitter community details - name, description, banner, member count, rules, admins, topic - via API. $0.001 per call. GetXAPI community info endpoint.
GET
/twitter/community/infoThis endpoint costs $0.001 per API call.
Returns public details for an X community — name, description, banner image, member/moderator counts, rules, admin/creator, topic, and join policy.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
communityId | string | Yes | Numeric community ID (from the community URL x.com/i/communities/<id>) |
Response
{
"status": "success",
"msg": "success",
"data": {
"id": "1493446837214187523",
"name": "Build in Public",
"description": "Share what you're working on. Get feedback. Help each other move forward.",
"createdAt": "2022-02-15T04:47:27.551Z",
"memberCount": 264947,
"moderatorCount": 6,
"bannerUrl": "https://pbs.twimg.com/community_banner_img/.../orig",
"joinPolicy": "Open",
"invitesPolicy": "MemberInvitesAllowed",
"isNsfw": false,
"role": "NonMember",
"primaryTopic": "Entrepreneurship",
"rules": [
{ "name": "Share what you're working on", "description": "Don't be scared to share unfinished work" },
{ "name": "No self-promotion", "description": "Don't ask for upvotes or advertise your products/services." }
],
"searchTags": ["buildinpublic", "buildinginpublic"],
"question": "What are you working on?",
"admin": { "id": "641633", "name": "Marc Köhlbrugge", "userName": "marckohlbrugge" },
"creator": { "id": "641633", "name": "Marc Köhlbrugge", "userName": "marckohlbrugge" }
}
}Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Community ID |
name | string | Community name |
description | string | Community description |
createdAt | string | Creation date (ISO 8601) |
memberCount | number | Total members |
moderatorCount | number | Number of moderators |
bannerUrl | string | null | Banner image URL (custom, or default if none) |
joinPolicy | string | Open, or a restricted policy requiring approval |
invitesPolicy | string | Who can invite (e.g. MemberInvitesAllowed) |
isNsfw | boolean | Marked NSFW |
role | string | The requesting account's role (NonMember, Member, Admin, …) |
primaryTopic | string | null | Community topic/category |
rules | array | Community rules — each { name, description } |
searchTags | array | Associated hashtags/tags |
question | string | null | Join question shown to prospective members |
admin | object | null | Admin user { id, name, userName } |
creator | object | null | Creator user { id, name, userName } |
Error Responses
404 - Community not found
{
"error": "Could not find community 1111111111111111"
}Example
curl -H "Authorization: Bearer API_KEY" "https://api.getxapi.com/twitter/community/info?communityId=1493446837214187523"const response = await fetch(
"https://api.getxapi.com/twitter/community/info?communityId=1493446837214187523",
{ headers: { Authorization: "Bearer API_KEY" } }
);
const { data } = await response.json();
console.log(data.name, data.memberCount);import requests
response = requests.get(
"https://api.getxapi.com/twitter/community/info",
params={"communityId": "1493446837214187523"},
headers={"Authorization": "Bearer API_KEY"},
)
print(response.json()["data"]["name"])