cURL
curl --request GET \
--url https://api.twitterapi.io/twitter/user/followings \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.twitterapi.io/twitter/user/followings"
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/user/followings', 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/user/followings",
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/user/followings"
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/user/followings")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.twitterapi.io/twitter/user/followings")
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{
"followings": [
{
"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>",
"code": 123
}{
"error": 123,
"message": "<string>"
}User Endpoint
Get User Followings
Get the accounts an X user follows, with full profiles, most recent first, up to 200 per page with cursor pagination. From $0.01 per 1,000.
GET
/
twitter
/
user
/
followings
cURL
curl --request GET \
--url https://api.twitterapi.io/twitter/user/followings \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.twitterapi.io/twitter/user/followings"
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/user/followings', 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/user/followings",
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/user/followings"
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/user/followings")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.twitterapi.io/twitter/user/followings")
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{
"followings": [
{
"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>",
"code": 123
}{
"error": 123,
"message": "<string>"
}Get user followings (with full profile metadata). Sorted by follow date ā most recent followings appear on the first page. Use
š” At max page size, 100,000 following profiles cost just $1.00.
Minimum charge: 60 credits ($0.0006) per call (20 followings Ć 3 credits, the smallest page size).
cursor for pagination.
Tiered pricing (per following returned)
Credits ā USD: 100,000 credits = 1.00(1creditā0.00001)
| Returned followings per call | Price | USD equivalent |
|---|---|---|
| 200 (max page size) | 1 credit / following | $0.01 / 1k followings |
| 100 - 199 | 2 credits / following | $0.02 / 1k followings |
| 20 - 99 | 3 credits / following | $0.03 / 1k followings |
Authorizations
Query Parameters
screen name of the user
The cursor to paginate through the results. First page is "".
The number of followings to return per page. Default is 200.min 20,max 200
Response
User followings
Array of followings
Show child attributes
Show child attributes
Indicates if there are more results available
Cursor for fetching the next page of results
Status of the request.success or error
Available options:
success, error Message of the request (error message on failure)
0 on success