Sand AISand AI MAGI-2MAGI-2 è ora su SandBase: video in 1080p con audio nativoProvalo ora

Twitter Profiles by rest ids

Documentazione 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.

Prezzo
$0.001USD / chiamata
Metodo
POST
Risposta
JSON
Parametri
1 obbligatori · 0 opzionali

Playground

Input
User IDs, comma separated
OutputPronto

Il tuo output apparirà qui

Completa gli input, poi fai clic su Esegui.

README 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.

Esplora altro

API correlate

Tutte le API
APIPrezzoRisposta
X (Twitter)$0.001 per chiamataJSON
Twitter$0.001 per chiamataJSON
Twitter$0.001 per chiamataJSON
Twitter$0.001 per chiamataJSON
Twitter$0.001 per chiamataJSON
Twitter$0.001 per chiamataJSON

Guide:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared

Domande

FAQ

Come uso l'API Twitter Profiles by rest ids?

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.

Quanto costa l'API Twitter Profiles by rest ids?

$0.001 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.

Quali parametri accetta l'API Twitter Profiles by rest ids?

Richiesti: rest_ids (string). La tabella dei parametri e il Playground di questa pagina elencano tutti i campi.

Cosa restituisce l'API Twitter Profiles by rest ids?

Una risposta JSON restituita nella stessa richiesta HTTP (sincrona). Il README di questa pagina include una risposta di esempio.

Mi serve un account sviluppatore o una chiave API X (Twitter)?

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).