Skip to content

Get community info

GET
/twitter/community/info
const url = 'https://api.relayxapi.com/twitter/community/info?community_id=example';
const options = {
method: 'GET',
headers: { 'X-API-Key': '<api-key>' },
};
try {
const res = await fetch(url, options);
const data = await res.json();
console.log(data);
} catch (err) {
console.error(err);
}

Return a Community’s profile: name, purpose, rules, member count and moderators.

community_id
required
Community Id
string
x-api-key
X-Api-Key
string

Successful Response

Media typeapplication/json
Example
{
"status": "success",
"msg": "",
"data": {
"data": {
"community_results_by_rest_id": {
"rest_id": "1900000000000000001",
"result": {
"__typename": "Community",
"actions": {
"join_action_result": {
"__typename": "CommunityJoinActionUnavailable",
"message": "Example message.",
"reason": "ViewerRequestRequired"
},
"leave_action_result": {
"__typename": "CommunityLeaveActionUnavailable",
"message": "Example message.",
"reason": "ViewerNotMember"
}
},
"created_at": 1755963690706,
"creator_results": {
"result": {
"__typename": "UserUnavailable"
}
},
"custom_banner_media_results": {
"result": {
"__typename": "ApiMedia",
"id": "ExampleId123",
"media_info": {
"__typename": "ApiImage",
"original_img_height": 339,
"original_img_url": "https://pbs.twimg.com/example.jpg",
"original_img_width": 848,
"salient_rect": {
"height": 1,
"left": 425,
"top": 170,
"width": 1
}
}
}
},
"default_banner_media_results": {
"result": {
"__typename": "ApiMedia",
"id": "ExampleId123",
"media_info": {
"__typename": "ApiImage",
"original_img_height": 480,
"original_img_url": "https://pbs.twimg.com/example.jpg",
"original_img_width": 1200
}
}
},
"description": "Example description.",
"is_pinned": false,
"member_count": 306,
"moderator_count": 3,
"name": "Example name",
"rest_id": "1900000000000000001",
"role": "NonMember",
"rules": [
{
"name": "Example name",
"rest_id": "1900000000000000001"
},
{
"name": "Example name",
"rest_id": "1900000000000000001"
}
]
}
}
}
}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}