rest_idsstringobbligatorio
User IDs, comma separated
https://api.sandbase.ai/v1/api/twitter/web/user-profiles-by-rest-idsGet profiles by rest ids on Twitter. Returns the platform data as structured JSON.
Il tuo output apparirà qui
Completa gli input, poi fai clic su Esegui.
Returns profile data for several Twitter accounts in one call. You pass a comma separated list of numeric user IDs (rest_ids) and get one entry per account in users.
active or has protected tweets.curl -X POST "https://api.sandbase.ai/v1/api/twitter/web/user-profiles-by-rest-ids" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"rest_ids": "44196397,34743251"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
rest_ids | string | Yes | User IDs, comma separated |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"users": [
{
"affiliates": {
"label": {
"badge": {
"url": "https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_bigger.jpg"
},
"description": "X",
"url": {
"url": "https://twitter.com/X",
"urlType": "DeepLink"
},
"userLabelDisplayType": "Badge",
"userLabelType": "BusinessLabel"
}
},
"avatar": "https://pbs.twimg.com/profile_images/2103567689515954176/aR-Kjpp4_normal.jpg",
"blue_verified": true,
"business_account": null,
"can_dm": null,
"created_at": "Tue Jun 02 20:12:29 +0000 2009",
"desc": null,
"favourites": null,
"friends": null,
"header_image": null,
"id": "44196397",
"location": ""
}
]
}
| Field | Meaning |
|---|---|
users[].rest_id / users[].id | The numeric Twitter user ID as a string. Both keys hold the same value in the response. |
users[].profile | The account handle (screen name) without the @ sign, such as elonmusk. |
users[].name | The display name of the account. |
users[].created_at | The account creation time as a text date, for example Tue Jun 02 20:12:29 +0000 2009. |
users[].blue_verified | true when the account has Blue verification. |
users[].protected | true when the account's tweets are protected. |
users[].status | The account state. Both sample accounts return active. |
users[].avatar | URL of the profile image. |
users[].location | The location text from the profile. It can be an empty string. |
users[].affiliates.label.description | Name of the organization shown in the affiliation badge, such as X. For accounts with no affiliation, affiliates is an empty list. |
rest_ids separated by commas, for example 44196397,34743251.desc, friends, statuses_count and sub_count came back as null in this sample. Call Twitter (X) User Profile or Twitter User about profile for more account details.$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-profiles-by-rest-ids" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"rest_ids": "44196397,34743251"
}'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.
rest_idsstringobbligatorioUser IDs, comma separated
Risposta di esempio salvata per questa API; durante la visualizzazione non viene eseguita alcuna richiesta live.
Nessuna risposta salvata è stata pubblicata. Esegui l'API in Playground per ispezionarne la risposta.
Esplora altro
| API | Prezzo | Risposta |
|---|---|---|
Twitter Profiles by rest idsQuesta API X (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-profiles-by-rest-ids 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: rest_ids (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 Profiles by rest ids 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 X (Twitter).