GetXAPI
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/info

This 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

ParameterTypeRequiredDescription
communityIdstringYesNumeric 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

FieldTypeDescription
idstringCommunity ID
namestringCommunity name
descriptionstringCommunity description
createdAtstringCreation date (ISO 8601)
memberCountnumberTotal members
moderatorCountnumberNumber of moderators
bannerUrlstring | nullBanner image URL (custom, or default if none)
joinPolicystringOpen, or a restricted policy requiring approval
invitesPolicystringWho can invite (e.g. MemberInvitesAllowed)
isNsfwbooleanMarked NSFW
rolestringThe requesting account's role (NonMember, Member, Admin, …)
primaryTopicstring | nullCommunity topic/category
rulesarrayCommunity rules — each { name, description }
searchTagsarrayAssociated hashtags/tags
questionstring | nullJoin question shown to prospective members
adminobject | nullAdmin user { id, name, userName }
creatorobject | nullCreator 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"])

On this page