screen_namestringobbligatorio
Screen Name, for example: elonmusk, can be obtained from the user's homepage link, for example: elonmusk in https://twitter.com/elonmusk
https://api.sandbase.ai/v1/api/twitter/web/user-followingsReturns a list of accounts followed by a specified Twitter (X) user. Results provide follower counts, friend counts, media statistics, and profile details.
[
{
"data": {
"following": [
{
"created_at": "Thu Mar 06 20:15:02 +0000 2008",
"description": "The official X account for the NASA Hubble Space Telescope, managed and operated by NASA's Goddard Space Flight Center.",
"followers_count": 8900825,
"friends_count": 44,
"media_count": 3138,
"name": "Hubble",
"profile_image": "https://pbs.twimg.com/profile_images/3468011581/efb985f24af0a814a722457a768f3cc5_normal.jpeg",
"screen_name": "NASAHubble",
"statuses_count": 8467,
"user_id": "14091091",
"website": "http://www.nasa.gov/mission_pages/hubble/main/index.html"
},
{
"created_at": "Tue Apr 07 15:40:56 +0000 2009",
"description": "The Official *NASA* Webb X account. \n\nThe world's most powerful space telescope. Launched: Dec. 25, 2021. First images revealed: July 12, 2022.",
"followers_count": 3516695,
"friends_count": 63,
"media_count": 3178,
"name": "NASA Webb Telescope",
"profile_image": "https://pbs.twimg.com/profile_images/1767989888916299776/hFYvpxZM_normal.jpg",
"screen_name": "NASAWebb",
"statuses_count": 11577,
"user_id": "29472803",
"website": "https://nasa.gov/webb"
},
{
"created_at": "Thu May 23 15:25:28 +0000 2013",
"description": "NASA's page for the latest mission and science updates from the International Space Station.",
"followers_count": 8892518,
"friends_count": 156,
"media_count": 8445,
"name": "International Space Station",
"profile_image": "https://pbs.twimg.com/profile_images/1949871812176732160/ZesOirrR_normal.jpg",
"screen_name": "Space_Station",
"statuses_count": 20182,
"user_id": "1451773004",
"website": "http://www.nasa.gov/station"
},
"… 64 more items in the full response"
],
"more_users": true,
"next_cursor": "1597662469098825850|2107451161811353531",
"status": "ok"
}
}
]Seleziona un esempio per caricare i suoi input e il risultato nel playground.
Returns a page of the accounts that a Twitter (X) user follows. It needs the screen_name of that user, such as NASA. Each account comes with its profile details and activity counts.
followers_count to find the most visible ones.user_id values of followed accounts to look up their full profiles in bulk.website and description of followed accounts to sort them into groups such as missions, agencies or people.curl -X POST "https://api.sandbase.ai/v1/api/twitter/web/user-followings" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"screen_name": "NASA"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
screen_name | string | Yes | Screen Name, for example: elonmusk, can be obtained from the user's homepage link, for example: elonmusk in https://twitter.com/elonmusk |
cursor | string | No | Cursor, default is None, used for paging, obtained from the last request |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"following": [
{
"created_at": "Thu Mar 06 20:15:02 +0000 2008",
"description": "The official X account for the NASA Hubble Space Telescope, managed and operated…",
"followers_count": 8894641,
"friends_count": 44,
"media_count": 3158,
"name": "Hubble",
"profile_image": "https://pbs.twimg.com/profile_images/3468011581/efb985f24af0a814a722457a768f3cc5…",
"screen_name": "NASAHubble",
"statuses_count": 8503,
"user_id": "14091091",
"website": "http://www.nasa.gov/mission_pages/hubble/main/index.html"
}
],
"more_users": true,
"next_cursor": "1597662469098825850|2117523447289479099",
"status": "ok"
}
| Field | Meaning |
|---|---|
following[] | List of accounts that the requested user follows. Each item is one account. |
following[].screen_name / following[].name | The handle and the display name of the followed account. |
following[].user_id | Numeric ID of the followed account, returned as a string. |
following[].followers_count / following[].friends_count | Number of followers the account has and number of accounts it follows. |
following[].statuses_count / following[].media_count | Number of posts the account has made and number of media items it has posted. |
following[].description / following[].website | Bio text and website link from the account profile. Some items leave them out. |
following[].created_at | Date and time the account was created, in a format like Thu Mar 06 20:15:02 +0000 2008. |
following[].profile_image | URL of the account's profile picture. |
more_users | true when more followed accounts are available on a next page. |
next_cursor | Cursor value to send as cursor in the next request to get the next page. |
screen_name from the profile link. In https://twitter.com/elonmusk the value is elonmusk.next_cursor value from the last response as cursor. Keep going while more_users is true.description key, so check for it before you read it.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Inizia a costruire
Endpoint API della piattaforma con autenticazione unificata e tracciamento dell'utilizzo.
curl -X POST "https://api.sandbase.ai/v1/api/twitter/web/user-followings" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"screen_name": "NASA"
}'Imposta la tua SandBase API key nell'ambiente del server. Le richieste usano l'autenticazione Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserva la tua key sul server. Non esporla nel codice del browser.
screen_namestringobbligatorioScreen Name, for example: elonmusk, can be obtained from the user's homepage link, for example: elonmusk in https://twitter.com/elonmusk
cursorstringCursor, default is None, used for paging, obtained from the last request
Risposta di esempio salvata per questa API; durante la visualizzazione non viene eseguita alcuna richiesta live.
[
{
"data": {
"following": [
{
"created_at": "Thu Mar 06 20:15:02 +0000 2008",
"description": "The official X account for the NASA Hubble Space Telescope, managed and operated by NASA's Goddard Space Flight Center.",
"followers_count": 8900825,
"friends_count": 44,
"media_count": 3138,
"name": "Hubble",
"profile_image": "https://pbs.twimg.com/profile_images/3468011581/efb985f24af0a814a722457a768f3cc5_normal.jpeg",
"screen_name": "NASAHubble",
"statuses_count": 8467,
"user_id": "14091091",
"website": "http://www.nasa.gov/mission_pages/hubble/main/index.html"
},
{
"created_at": "Tue Apr 07 15:40:56 +0000 2009",
"description": "The Official *NASA* Webb X account. \n\nThe world's most powerful space telescope. Launched: Dec. 25, 2021. First images revealed: July 12, 2022.",
"followers_count": 3516695,
"friends_count": 63,
"media_count": 3178,
"name": "NASA Webb Telescope",
"profile_image": "https://pbs.twimg.com/profile_images/1767989888916299776/hFYvpxZM_normal.jpg",
"screen_name": "NASAWebb",
"statuses_count": 11577,
"user_id": "29472803",
"website": "https://nasa.gov/webb"
},
{
"created_at": "Thu May 23 15:25:28 +0000 2013",
"description": "NASA's page for the latest mission and science updates from the International Space Station.",
"followers_count": 8892518,
"friends_count": 156,
"media_count": 8445,
"name": "International Space Station",
"profile_image": "https://pbs.twimg.com/profile_images/1949871812176732160/ZesOirrR_normal.jpg",
"screen_name": "Space_Station",
"statuses_count": 20182,
"user_id": "1451773004",
"website": "http://www.nasa.gov/station"
},
"… 64 more items in the full response"
],
"more_users": true,
"next_cursor": "1597662469098825850|2107451161811353531",
"status": "ok"
}
}
]Esplora altro
| API | Prezzo | Risposta |
|---|---|---|
Twitter (X) User FollowingsQuesta API Twitter | $0.001 per chiamata | JSON |
Twitter | $0.001 per chiamata | JSON |
Twitter | $0.001 per chiamata | JSON |
Twitter | $0.001 per chiamata | JSON |
Twitter | $0.001 per chiamata | JSON |
Twitter | $0.001 per chiamata | JSON |
Guide:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared
Domande
Invia una richiesta POST a https://api.sandbase.ai/v1/api/twitter/web/user-followings con la tua chiave API di SandBase nell'header Authorization (Bearer) e i parametri nel body JSON. Puoi anche provarla nel Playground di questa pagina senza scrivere codice.
$0.001 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.
Richiesti: screen_name (string). Facoltativi: cursor (string). La tabella dei parametri e il Playground di questa pagina elencano tutti i campi.
Una risposta JSON restituita nella stessa richiesta HTTP (sincrona). Il README di questa pagina include una risposta di esempio.
No. Twitter (X) User Followings funziona tramite SandBase, quindi una sola chiave API SandBase copre questo endpoint e tutte le altre API e modelli del catalogo. Non è necessario richiedere separatamente l'accesso alle API Twitter.