Get Following by Page
curl --request POST \
--url https://api.twexapi.io/twitter/following/page \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"screen_name": "<string>",
"next_cursor": "1234567890"
}
'import requests
url = "https://api.twexapi.io/twitter/following/page"
payload = {
"screen_name": "<string>",
"next_cursor": "1234567890"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({screen_name: '<string>', next_cursor: '1234567890'})
};
fetch('https://api.twexapi.io/twitter/following/page', 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.twexapi.io/twitter/following/page",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'screen_name' => '<string>',
'next_cursor' => '1234567890'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.twexapi.io/twitter/following/page"
payload := strings.NewReader("{\n \"screen_name\": \"<string>\",\n \"next_cursor\": \"1234567890\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.twexapi.io/twitter/following/page")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"screen_name\": \"<string>\",\n \"next_cursor\": \"1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.twexapi.io/twitter/following/page")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"screen_name\": \"<string>\",\n \"next_cursor\": \"1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"userId": "<string>",
"isBlueVerified": true,
"createdAt": "<string>",
"defaultProfile": true,
"defaultProfileImage": true,
"description": "<string>",
"location": "<string>",
"fastFollowersCount": 123,
"favouritesCount": 123,
"followersCount": 123,
"followingCount": 123,
"hasCustomTimelines": true,
"isTranslator": true,
"listedCount": 123,
"mediaCount": 123,
"name": "<string>",
"normalFollowersCount": 123,
"possiblySensitive": true,
"profileImageUrlHttps": "<string>",
"username": "<string>",
"statusesCount": 123,
"verified": true,
"protected": true,
"createdAtDatetime": "<string>",
"pinnedTweetIdsStr": [
"<unknown>"
],
"translatorType": "<string>",
"verified_type": "blue",
"withheldInCountries": [
"<unknown>"
],
"url": "<string>",
"descriptionUrls": [
"<unknown>"
],
"urls": [
"<unknown>"
],
"pinnedTweetIds": [
"<unknown>"
]
}
],
"has_next_page": true,
"code": 200,
"msg": "success",
"next_cursor": "1234567890"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Followers & Following Endpoints
Get Following by Page
Retrieve a paginated list of following users using cursor-based pagination. Each page returns up to 200 users. Pass next_cursor from the previous response to continue. Pricing: $0.14 per 1,000 following users.
POST
/
twitter
/
following
/
page
Get Following by Page
curl --request POST \
--url https://api.twexapi.io/twitter/following/page \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"screen_name": "<string>",
"next_cursor": "1234567890"
}
'import requests
url = "https://api.twexapi.io/twitter/following/page"
payload = {
"screen_name": "<string>",
"next_cursor": "1234567890"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({screen_name: '<string>', next_cursor: '1234567890'})
};
fetch('https://api.twexapi.io/twitter/following/page', 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.twexapi.io/twitter/following/page",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'screen_name' => '<string>',
'next_cursor' => '1234567890'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.twexapi.io/twitter/following/page"
payload := strings.NewReader("{\n \"screen_name\": \"<string>\",\n \"next_cursor\": \"1234567890\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.twexapi.io/twitter/following/page")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"screen_name\": \"<string>\",\n \"next_cursor\": \"1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.twexapi.io/twitter/following/page")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"screen_name\": \"<string>\",\n \"next_cursor\": \"1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"userId": "<string>",
"isBlueVerified": true,
"createdAt": "<string>",
"defaultProfile": true,
"defaultProfileImage": true,
"description": "<string>",
"location": "<string>",
"fastFollowersCount": 123,
"favouritesCount": 123,
"followersCount": 123,
"followingCount": 123,
"hasCustomTimelines": true,
"isTranslator": true,
"listedCount": 123,
"mediaCount": 123,
"name": "<string>",
"normalFollowersCount": 123,
"possiblySensitive": true,
"profileImageUrlHttps": "<string>",
"username": "<string>",
"statusesCount": 123,
"verified": true,
"protected": true,
"createdAtDatetime": "<string>",
"pinnedTweetIdsStr": [
"<unknown>"
],
"translatorType": "<string>",
"verified_type": "blue",
"withheldInCountries": [
"<unknown>"
],
"url": "<string>",
"descriptionUrls": [
"<unknown>"
],
"urls": [
"<unknown>"
],
"pinnedTweetIds": [
"<unknown>"
]
}
],
"has_next_page": true,
"code": 200,
"msg": "success",
"next_cursor": "1234567890"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Current page data (up to 200 following users) and pagination metadata (has_next_page, next_cursor).
Current page following items.
User information structure
Show child attributes
Show child attributes
Whether another page is available.
HTTP status code
Response message
Use this cursor to fetch the next page when has_next_page is true.
Example:
"1234567890"
⌘I