Sand AISand AI MAGI-2MAGI-2 kini tersedia di SandBase: video 1080p dengan audio nativeCoba sekarang

Twitter Profiles by rest ids

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

Harga
$0.001USD / panggilan
Metode
POST
Respons
JSON
Parameter
1 wajib · 0 opsional

Playground

Input
User IDs, comma separated
OutputSiap

Output Anda akan muncul di sini

Lengkapi input, lalu klik Run.

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.

Jelajahi lebih lanjut

API Terkait

Semua APIs
APIHargaRespons
X (Twitter)$0.001 per panggilanJSON
Twitter$0.001 per panggilanJSON
Twitter$0.001 per panggilanJSON
Twitter$0.001 per panggilanJSON
Twitter$0.001 per panggilanJSON
Twitter$0.001 per panggilanJSON

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

Pertanyaan

FAQ

Bagaimana cara menggunakan API Twitter Profiles by rest ids?

Kirim permintaan POST ke https://api.sandbase.ai/v1/api/twitter/web/user-profiles-by-rest-ids dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.

Berapa biaya API Twitter Profiles by rest ids?

$0.001 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.

Parameter apa yang diterima API Twitter Profiles by rest ids?

Wajib: rest_ids (string). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.

Apa yang dikembalikan API Twitter Profiles by rest ids?

Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.

Apakah saya memerlukan akun developer atau kunci API X (Twitter)?

Tidak. Twitter Profiles by rest ids berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API X (Twitter) secara terpisah.