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);}curl --request GET \ --url 'https://api.relayxapi.com/twitter/community/info?community_id=example' \ --header 'X-API-Key: <api-key>'import requests
res = requests.get( "https://api.relayxapi.com/twitter/community/info", params={"community_id": "example"}, headers={"X-API-Key": "<api-key>"},)print(res.json())Return a Community’s profile: name, purpose, rules, member count and moderators.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”community_id
required
Community Id
string
Header Parameters
Section titled “Header Parameters”x-api-key
X-Api-Key
string
Responses
Section titled “ Responses ”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>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}