Sand AISand AI MAGI-2MAGI-2 अब SandBase पर है: 1080p वीडियो, नेटीव ऑडियो के साथअभी आज़माएँ

Twitter User Profile

API दस्तावेज़
https://api.sandbase.ai/v1/api/twitter/user-detail

Get an X (Twitter) user profile identified by its numeric Rest ID. Use it to review a known account before monitoring its posts or conducting creator and account research.

मूल्य
$0.014286USD / कॉल
मेथड
POST
प्रतिक्रिया
JSON
पैरामीटर
1 आवश्यक · 0 वैकल्पिक

प्लेग्राउंड

इनपुट
The unique numeric identifier (Rest ID) for the X user.
आउटपुटतैयार

आपका आउटपुट यहाँ दिखाई देगा

इनपुट पूरा करें, फिर Run पर क्लिक करें।

API README

Twitter User Profile API

Returns the public profile of one X (Twitter) account, including its handle, display name, follower count, post count and verification flags. It needs the account's numeric Rest ID in restId.

Use cases

  • Check an account's handle, name and status before you start monitoring its posts.
  • Compare follower counts and post counts across creators during account research.
  • Find the pinned post of an account by reading its post ID.
  • Confirm whether an account is protected or still active before you pull data for it.

Request

curl -X POST "https://api.sandbase.ai/v1/api/twitter/user-detail" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"restId": "44196397"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
restIdstringYesThe unique numeric identifier (Rest ID) for the X user.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "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,
  "created_at": "Tue Jun 02 20:12:29 +0000 2009",
  "desc": "https://t.co/ZdBx5WABYx",
  "friends": 1421,
  "header_image": "https://pbs.twimg.com/profile_banners/44196397/1774145451",
  "id": "44196397",
  "location": "",
  "media_count": 4756,
  "name": "Elon Musk"
}

Response fields

FieldMeaning
rest_id / idThe numeric Rest ID of the account, returned as a string. Both fields hold the same value as the restId you sent.
profileThe account's handle, without the @ sign (for example elonmusk).
nameThe display name shown on the profile.
sub_countThe follower count of the account.
friendsThe number of accounts this user follows.
statuses_count / media_countTotal posts by the account, and the number of posts with media.
created_atWhen the account was created, as a text timestamp such as Tue Jun 02 20:12:29 +0000 2009.
blue_verified / verification_typeblue_verified is a displayed verification flag, not independent proof of payment or identity. verification_type is null when no other verification type is set.
protected / statusprotected shows whether the account's posts are private. status shows the account state, such as active.
pinned_tweet_ids_str[]IDs of the posts pinned to the profile.
avatar / header_imageURLs of the profile picture and the banner image.
affiliates.label.descriptionName of the business or organization label shown on the profile, such as X.

Notes

  • Pass the numeric Rest ID as a string in restId, for example 44196397. The API does not accept a handle.
  • Use the IDs in pinned_tweet_ids_str[] with Twitter Tweets by IDs to load the pinned posts.
  • Call Twitter User Published Posts to read the account's posts, or X / Twitter Followers to list its followers.
  • The desc field can hold a shortened t.co link instead of the full bio text.

Pricing

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

Read one profile by an exact Rest ID string

Send the numeric account ID as the string restId, preserving the capital I. This route does not accept screen_name and does not use the web route's integer rest_id key. Keep an exact decimal string from a trusted selected record; do not use a handle, URL, float or a rounded JavaScript Number as a substitute. Selecting this route is a separate pricing decision, not an automatic fallback.

The selected page has no saved full example. Its shortened README describes a flat profile with string rest_id and id. Treat that as a reference shape, not a new account read. Compare usable returned identity with the requested string; stop on a mismatch or conflicting returned IDs. If the result reports notfound or lacks identity, do not report a completed profile merely because the SandBase envelope completed.

The reference distinguishes profile as the handle and name as display name. Preserve sub_count, friends, statuses_count and media_count with their field names and retrieval time; null is not zero. created_at is a textual account-creation timestamp, not the observation date. The desc field can contain a shortened link rather than the complete bio; this first task does not open it automatically.

Protected and verification fields are public profile signals, not access to protected posts or independent identity proof. An organization badge is not your verified partnership assessment. The shown affiliates object and null business_account differ from the other route's example; optional fields need route-aware handling instead of a single forced nested format.

Pinned post IDs and image URLs are references, not already retrieved content. This task stops after the selected profile response. For a handle-first task, choose Web User Profile independently; do not send both request formats or switch routes automatically after an error.

Give your agent one known-account task

Choose a handle lookup or an exact-ID lookup before running. A connected agent needs that identifier, the selected endpoint and the result you want. For a new integration, share the setup Skill, Markdown quickstart and chosen task. Keep SANDBASE_API_KEY locally and use POST /v1/api/ with Bearer authentication.

Validate completed SandBase status and an object at outputs[0].data, then check the business result. The selected references describe flat profile fields, not a nested user or data.data wrapper. An explicit status notfound or missing usable identity is not a successful empty profile. Do not invent a universal code/message success flag; preserve unknown optional fields rather than coercing them into zero or false.

Pricing checked on 2026-11-08: Web User Profile lists $0.001 per call; User Detail lists $0.014286 per call. Both show eligibility for 100 daily calls shared across eligible data APIs in the organization, resetting at 00:00 UTC. Eligibility is not remaining allowance. Check current pricing and do not silently retry against the other, differently priced route. No new business request was made for this revision. The X/Twitter Python profile guide distinguishes historical illustrations, public references and offline validation.

और जानें

संबंधित APIs

सभी APIs
APIकीमतप्रतिक्रिया
Twitter$0.014286 प्रति कॉलJSON
X (Twitter)$0.00054 प्रति कॉल सेJSON
Twitter$0.0006 प्रति कॉल सेअसिंक्रोनस JSON
X (Twitter)$0.0001 प्रति कॉल सेJSON
X (Twitter)$0.0036 प्रति कॉल सेJSON
X (Twitter)$0.00045 प्रति कॉल सेJSON

गाइड्स:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared

प्रश्न

FAQ

Twitter User Profile API का उपयोग कैसे करें?

https://api.sandbase.ai/v1/api/twitter/user-detail पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।

Twitter User Profile API की लागत कितनी है?

$0.014286 प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।

Twitter User Profile API कौन-से parameters स्वीकार करती है?

आवश्यक: restId (string)। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।

Twitter User Profile API क्या लौटाती है?

एक JSON response जो उसी HTTP request में लौटाया जाता है (synchronous)। इस पेज का README एक sample response शामिल करता है।

क्या मुझे एक Twitter developer account या API key चाहिए?

नहीं। Twitter User Profile SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से Twitter API access के लिए आवेदन करने की आवश्यकता नहीं है।

User Detail के लिए ID की कौन-सी spelling और type चाहिए?

बड़े I वाले restId का उपयोग करें और decimal string value दें। यह web profile route के integer rest_id से अलग है। handle, URL या पहले से rounded number exact selected ID नहीं है। record सेव करने से पहले लौटाई गई string identity की तुलना करें।

अगर सस्ता profile route fail हो जाए, तो क्या मैं चुपचाप User Detail का उपयोग कर सकता हूँ?

स्वचालित रूप से switch न करें। 8 नवंबर को सूचीबद्ध कीमतें User Detail के लिए $0.014286 और Web User Profile के लिए $0.001 हैं, shared eligible daily quota के साथ। route और current price स्पष्ट रूप से चुनें; quota eligibility remaining allowance नहीं मापती।

क्या optional profile fields और पूरा response पहले से live verified हैं?

selected User Detail page का कोई saved full example नहीं है; shortened README एक reference shape है। optional affiliates और business_account fields web example से अलग हैं। unknowns को बनाए रखें, missing या mismatched identity को reject करें, और इन references से नया live read claim न करें।