Skip to content

Get Community Members - API Reference

Returns array of users who are admins, moderators or regular members of a community. Typically Twitter returns ~20 results per page. You can request additional results by sending another request to the same endpoint using cursor parameter.

GET https://api.socialdata.tools/twitter/community/{community_id}/members?cursor={cursor}

Headers

Authorization string required

Authorization Bearer header containing your SocialData API key

Example: Bearer YOUR_API_KEY

Path Parameters

community_id integer required

Target community ID

Example: 1493446837214187523

Query Parameters

cursor string optional

Cursor value obtained from next_cursor response property. Used to retrieve additional pages for the same query

Example: DAACCgACGC12FhmAJxAKAAMYLXYWGX_Y8AgABAAAAAILAAUAAADoRW1QQzZ3QUFBZlEvZ0d...

Code Examples

Terminal window
curl "https://api.socialdata.tools/twitter/community/1493446837214187523/members"
-H 'Authorization: Bearer API_KEY'
-H 'Accept: application/json

Example Responses

{
"next_cursor": "CycRAAAAAAwABAwKmwzBVQo+vQ0OGGp8lQABCm07AAABkNDNH5sADJorCj69f\/\/\/\/\/\/\/\/\/8KbTt\/\/\/\/\/\/\/\/\/\/wAIP8AAAAADAAAA",
"users": [
{
"id": 3119483308,
"id_str": "3119483308",
"screen_name": "onofregasent",
"name": "Onofre",
"protected": false,
"profile_image_url_https": "https:\/\/pbs.twimg.com\/profile_images\/1726870714131640320\/Hsxgtxw9_normal.jpg",
"community_role": "Member"
},
{
"id": 338944755,
"id_str": "338944755",
"screen_name": "bohdanbasov",
"name": "Bohdan Basov",
"protected": false,
"profile_image_url_https": "https:\/\/pbs.twimg.com\/profile_images\/1803862687895388160\/2h7gpQ5U_normal.jpg",
"community_role": "Moderator"
},
...
]
}

Response Codes

  • 200 OK - request succeeded
  • 402 Payment Required - not enough credits to perform this request
  • 404 Not Found - requested comminity does not exist
  • 422 Unprocessable Content - validation failed (e.g. one of the required parameters was not provided)
  • 500 Internal Error - API internal error, typically means that SocialData API failed to obtain the requested information and you should try again later

Useful Resources