curl --request GET \
--url https://api.twitterapi.io/twitter/user/followers_ids \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.twitterapi.io/twitter/user/followers_ids"
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/followers_ids', 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/followers_ids",
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/followers_ids"
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/followers_ids")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.twitterapi.io/twitter/user/followers_ids")
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{
"ids": [
"<string>"
],
"has_next_page": true,
"next_cursor": "<string>",
"status": "success",
"msg": "<string>",
"code": 123
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Get User Followers IDs (Bulk)
Get an X user’s follower IDs in bulk, up to 5,000 per call with cursor pagination. IDs only, no profiles. From $4.50 per million IDs.
curl --request GET \
--url https://api.twitterapi.io/twitter/user/followers_ids \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.twitterapi.io/twitter/user/followers_ids"
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/followers_ids', 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/followers_ids",
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/followers_ids"
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/followers_ids")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.twitterapi.io/twitter/user/followers_ids")
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{
"ids": [
"<string>"
],
"has_next_page": true,
"next_cursor": "<string>",
"status": "success",
"msg": "<string>",
"code": 123
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}userName or userId. Use cursor from the previous response (next_cursor) to paginate.
Tiered pricing (per ID returned)
Credits ↔ USD: 100,000 credits = 1.00(1credit≈0.00001)
| Returned IDs per call | Price | USD equivalent | Best for |
|---|---|---|---|
| 4,000 - 5,000 | 0.45 credits / ID | **0.0045/1kIDs∗∗(4.50 per million) | Bulk graph collection (recommended) |
| 200 - 3,999 | 1 credit / ID | $0.01 / 1k IDs | Medium-batch fetch |
| 50 - 199 | 2 credits / ID | $0.02 / 1k IDs | New-follower monitoring / frequent polling |
- Pull a user’s 1 million followers for $4.50
- Pull 100,000 followers for just $0.45
- Pull a celebrity’s 10 million follower graph for $45
When to use this vs /twitter/user/followers
- This endpoint: returns IDs only, dramatically cheaper, up to 5,000 per call. Use for follower-ID collection at scale.
/twitter/user/followers: returns full follower profiles (name, bio, avatar, etc.), 200 max per call, $0.01 / 1k followers at max page. Use when you need profile data.
/twitter/user/batch_info_by_ids.Authorizations
Query Parameters
Screen name of the user (e.g. elonmusk). Either userName or userId is required.
Numeric user ID. Either userName or userId is required.
Number of follower IDs to return per page. Min 50, max 5000. Default 5000 (bulk pull, recommended).
50 <= x <= 5000Pagination cursor — pass the next_cursor value from the previous response. First page: omit or pass empty string.
Response
Follower IDs
Array of follower IDs.
Numeric Twitter user ID, returned as string to preserve precision (Twitter IDs exceed JS Number safe range).
True if more pages are available (next_cursor is non-empty and not '0').
Cursor for the next page. Empty string or '0' means no more pages.
Status of the request — 'success' or 'error'.
success, error Status message.
Status code (0 = success).