cURL
curl --request GET \
--url https://api.twitterapi.io/twitter/community/members \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.twitterapi.io/twitter/community/members"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.twitterapi.io/twitter/community/members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.twitterapi.io/twitter/community/members",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.twitterapi.io/twitter/community/members"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.twitterapi.io/twitter/community/members")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.twitterapi.io/twitter/community/members")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"members": [
{
"id": "<string>",
"name": "<string>",
"screen_name": "<string>",
"userName": "<string>",
"username": "<string>",
"location": "<string>",
"url": "<string>",
"description": "<string>",
"email": "<string>",
"protected": true,
"verified": true,
"isBlueVerified": true,
"followers_count": 123,
"following_count": 123,
"friends_count": 123,
"favourites_count": 123,
"statuses_count": 123,
"media_tweets_count": 123,
"created_at": "<string>",
"profile_banner_url": "<string>",
"profile_image_url_https": "<string>",
"can_dm": true
}
],
"has_next_page": true,
"next_cursor": "<string>",
"status": "success",
"msg": "<string>"
}{
"error": 123,
"message": "<string>"
}Communities Endpoint
Get Community Members
Get the members of an X Community by community ID, 20 per page with cursor pagination. Each member comes with a full user profile.
GET
/
twitter
/
community
/
members
cURL
curl --request GET \
--url https://api.twitterapi.io/twitter/community/members \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.twitterapi.io/twitter/community/members"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.twitterapi.io/twitter/community/members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.twitterapi.io/twitter/community/members",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.twitterapi.io/twitter/community/members"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.twitterapi.io/twitter/community/members")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.twitterapi.io/twitter/community/members")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"members": [
{
"id": "<string>",
"name": "<string>",
"screen_name": "<string>",
"userName": "<string>",
"username": "<string>",
"location": "<string>",
"url": "<string>",
"description": "<string>",
"email": "<string>",
"protected": true,
"verified": true,
"isBlueVerified": true,
"followers_count": 123,
"following_count": 123,
"friends_count": 123,
"favourites_count": 123,
"statuses_count": 123,
"media_tweets_count": 123,
"created_at": "<string>",
"profile_banner_url": "<string>",
"profile_image_url_https": "<string>",
"can_dm": true
}
],
"has_next_page": true,
"next_cursor": "<string>",
"status": "success",
"msg": "<string>"
}{
"error": 123,
"message": "<string>"
}Get members of a community. Page size is 20.
Authorizations
Query Parameters
id of the community
cursor of the page
Response
Community members response
Members of the community
Show child attributes
Show child attributes
Whether there is a next page
Cursor of the next page
Status of the request: success or error
Available options:
success, error Message of the request, error message if status is error