rest_idsstringerforderlich
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.
Ihre Ausgabe wird hier angezeigt
Vervollständigen Sie die Eingaben und klicken Sie dann auf Ausführen.
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.
Jetzt loslegen
Plattform-API-Endpunkt mit einheitlicher Authentifizierung und Nutzungsnachverfolgung.
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"
}'Legen Sie Ihren SandBase API-Schlüssel in Ihrer Serverumgebung fest. Anfragen verwenden Bearer-Authentifizierung.
export SANDBASE_API_KEY="YOUR_API_KEY"Bewahren Sie Ihren Schlüssel auf dem Server auf. Geben Sie ihn nicht in Browser-Code preis.
rest_idsstringerforderlichUser IDs, comma separated
Gespeicherte Beispielantwort für diese API; beim Anzeigen wird keine Live-Anfrage gesendet.
Es wurde keine gespeicherte Antwort veröffentlicht. Führen Sie die API in Playground aus, um die Antwort zu prüfen.
Mehr entdecken
| API | Preis | Antwort |
|---|---|---|
Twitter Profiles by rest idsDiese API X (Twitter) | $0.001 pro Aufruf | JSON |
Twitter | $0.001 pro Aufruf | JSON |
Twitter | $0.001 pro Aufruf | JSON |
Twitter | $0.001 pro Aufruf | JSON |
Twitter | $0.001 pro Aufruf | JSON |
Twitter | $0.001 pro Aufruf | JSON |
Anleitungen:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared
Fragen
Senden Sie eine POST-Anfrage an https://api.sandbase.ai/v1/api/twitter/web/user-profiles-by-rest-ids mit Ihrem SandBase API-Schlüssel im Authorization-Header (Bearer) und den Parametern als JSON-Body. Sie können das auch ohne Code direkt auf dieser Seite im Playground testen.
$0.001 pro Aufruf, abgerechnet von Ihrem SandBase-Guthaben. Es werden nur die von Ihnen getätigten Aufrufe berechnet; es gibt kein Abo.
Erforderlich: rest_ids (string). Die Parametertabelle und der Playground auf dieser Seite listen jedes Feld auf.
Eine JSON-Antwort, die in derselben HTTP-Anfrage zurückgegeben wird (synchron). Die README auf dieser Seite enthält eine Beispielantwort.
Nein. Twitter Profiles by rest ids läuft über SandBase, daher deckt ein SandBase API-Schlüssel diesen Endpunkt und jede andere API sowie jedes Modell im Katalog ab. Sie müssen keinen separaten Zugang für X (Twitter) API beantragen.