rest_idsstringrequerido
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.
Su salida aparecerá aquí
Complete las entradas y luego haga clic en Ejecutar.
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.
Empiece a construir
Endpoint de la API de la plataforma con autenticación unificada y seguimiento de uso.
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"
}'Configure su clave de API de SandBase en el entorno de su servidor. Las solicitudes usan autenticación Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserve su clave en el servidor. No la exponga en código del navegador.
rest_idsstringrequeridoUser IDs, comma separated
Respuesta de ejemplo guardada para esta API; no se realiza ninguna solicitud en vivo al verla.
No se ha publicado ninguna respuesta guardada. Ejecute la API en Playground para inspeccionar su respuesta.
Explorar más
| API | Precio | Respuesta |
|---|---|---|
Twitter Profiles by rest idsEsta API X (Twitter) | $0.001 por llamada | JSON |
Twitter | $0.001 por llamada | JSON |
Twitter | $0.001 por llamada | JSON |
Twitter | $0.001 por llamada | JSON |
Twitter | $0.001 por llamada | JSON |
Twitter | $0.001 por llamada | JSON |
Guías:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared
Preguntas
Envía una solicitud POST a https://api.sandbase.ai/v1/api/twitter/web/user-profiles-by-rest-ids con tu clave API de SandBase en el encabezado Authorization (Bearer) y los parámetros como un cuerpo JSON. También puedes probarlo en el Playground de esta página sin escribir código.
$0.001 por llamada, facturado desde tu saldo de SandBase. Solo se te cobra por las llamadas que haces; no hay suscripción.
Requeridos: rest_ids (string). La tabla de Parámetros y el Playground de esta página enumeran todos los campos.
Una respuesta JSON devuelta en la misma solicitud HTTP (sincrónica). El README de esta página incluye una respuesta de ejemplo.
No. Twitter Profiles by rest ids funciona a través de SandBase, así que una sola clave API de SandBase cubre este endpoint y todas las demás APIs y modelos del catálogo. No necesitas solicitar acceso a la API de X (Twitter) por separado.