Sand AISand AI MAGI-2MAGI-2 ya está en SandBase: video en 1080p con audio nativoPruébalo ahora

Twitter Profiles by rest ids

Documentación de la API
https://api.sandbase.ai/v1/api/twitter/web/user-profiles-by-rest-ids

Get profiles by rest ids on Twitter. Returns the platform data as structured JSON.

Precio
$0.001USD / llamada
Método
POST
Respuesta
JSON
Parámetros
1 obligatorios · 0 opcionales

Entorno de pruebas

Entrada
User IDs, comma separated
SalidaListo

Su salida aparecerá aquí

Complete las entradas y luego haga clic en Ejecutar.

README de la API

Twitter Profiles by rest ids API

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.

Use cases

  • Resolve a list of stored Twitter user IDs into current handles and display names.
  • Check whether a batch of accounts is still active or has protected tweets.
  • Look up the account creation date and Blue verification status for a set of accounts.
  • Collect avatar URLs and affiliation badges for accounts shown in a dashboard.

Request

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.

Parameters

NameTypeRequiredDescription
rest_idsstringYesUser IDs, comma separated

Example response

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": ""
    }
  ]
}

Response fields

FieldMeaning
users[].rest_id / users[].idThe numeric Twitter user ID as a string. Both keys hold the same value in the response.
users[].profileThe account handle (screen name) without the @ sign, such as elonmusk.
users[].nameThe display name of the account.
users[].created_atThe account creation time as a text date, for example Tue Jun 02 20:12:29 +0000 2009.
users[].blue_verifiedtrue when the account has Blue verification.
users[].protectedtrue when the account's tweets are protected.
users[].statusThe account state. Both sample accounts return active.
users[].avatarURL of the profile image.
users[].locationThe location text from the profile. It can be an empty string.
users[].affiliates.label.descriptionName of the organization shown in the affiliation badge, such as X. For accounts with no affiliation, affiliates is an empty list.

Notes

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Explorar más

APIs relacionadas

Todas las APIs
APIPrecioRespuesta
X (Twitter)$0.001 por llamadaJSON
Twitter$0.001 por llamadaJSON
Twitter$0.001 por llamadaJSON
Twitter$0.001 por llamadaJSON
Twitter$0.001 por llamadaJSON
Twitter$0.001 por llamadaJSON

Guías:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared

Preguntas

FAQ

¿Cómo uso la API de Twitter Profiles by rest ids?

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.

¿Cuánto cuesta la API de Twitter Profiles by rest ids?

$0.001 por llamada, facturado desde tu saldo de SandBase. Solo se te cobra por las llamadas que haces; no hay suscripción.

¿Qué parámetros acepta la API de Twitter Profiles by rest ids?

Requeridos: rest_ids (string). La tabla de Parámetros y el Playground de esta página enumeran todos los campos.

¿Qué devuelve la API de Twitter Profiles by rest ids?

Una respuesta JSON devuelta en la misma solicitud HTTP (sincrónica). El README de esta página incluye una respuesta de ejemplo.

¿Necesito una cuenta de desarrollador o una clave API de X (Twitter)?

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.