No output yet. Submit the form to generate content.
Transparent pricing with no hidden fees. Pay as you go.
| Rule & Modality | Channel | Credits | Price (USD) | Official / Reference Price | Daily Savings |
|---|---|---|---|---|---|
user-by-rest-id otherTwitter | Starter | 0.01per post | $0.00005 | - | - |
Competitor pricing costs $45.450 more
ApiPass is 90.90% lower, estimated at multiple calls returning 10,000 returned posts total
user-by-rest-id
ApiPass Price
$0.0005
0.1 credits per post
Competitor Prices
Complete guide to using twitter-api-graphql
Retrieve complete Twitter user profile data instantly using a numeric user ID through ApiPass's unified GraphQL endpoint.

The Twitter Graphql User By Rest ID API on ApiPass is a powerful endpoint that lets developers fetch comprehensive Twitter user information by submitting a numeric userId (also known as the rest_id). Unlike screen-name-based lookups, this endpoint queries Twitter's GraphQL backend directly using a stable numeric identifier, which never changes even if a user updates their handle. Through a simple POST request to /api/v1/jobs/createTask with the model twitter/graphql/user-by-rest-id, you receive a task ID, then retrieve full profile details — including display name, screen name, avatar, banner, follower/following counts, verification status, professional account info, highlighted labels, and more — via the /api/v1/jobs/recordInfo endpoint. ApiPass handles authentication, routing, and provider selection automatically, so you can focus on building rather than wrangling Twitter's complex internal APIs.
Query users by their permanent rest_id (e.g., 44196397 for Elon Musk) instead of mutable screen names, ensuring your integrations never break when users rebrand their handles.
A single Bearer YOUR_API_KEY header replaces Twitter's complex OAuth 2.0 flow, dramatically reducing onboarding friction for new projects.
The default auto channel intelligently allocates requests across starter, regular, and official providers based on real-time pricing and stability metrics, balancing cost and reliability without manual configuration.
The create-task and query-task pattern with optional callBackUrl lets you build scalable, non-blocking pipelines that won't time out under heavy load.
Get over 40 user fields in a single call, including is_blue_verified, professional data, highlights_info, affiliates_highlighted_label, relationship_perspectives, and more — no extra endpoints required.
Pay-as-you-go pricing with the official channel matched to Twitter's own rates, and lower-cost tiers available for high-volume, less-critical workloads.
Returns the full GraphQL user.result structure including core (name, screen_name, created_at), avatar, legacy (followers, friends, statuses, listed counts), verification, professional, dm_permissions, highlights_info, and tipjar_settings.
Toggle the withHighlightedLabel boolean to include or exclude the affiliates_highlighted_label block, useful for surfacing brand affiliations and verified business badges.
Every task progresses through clear lifecycle states (waiting, queuing, generating, success, fail) with createTime, completeTime, and costTime metrics included in every response.
Continuously monitor follower growth, engagement signals, and verification status for thousands of creators tracked by their stable rest_id.
Augment customer records with verified Twitter profile data — display name, bio links, professional category, and business labels — to power B2B outreach workflows.
Validate account age (created_at), follower-to-following ratios, and blue verification status to detect bots, scams, or impersonation attempts.
Build competitor-tracking products that snapshot rival accounts' metrics over time, comparing growth trajectories and content performance signals.
While Twitter's official API provides direct access to user lookup endpoints, integrating it at scale comes with significant overhead — from OAuth complexity and tier-gated pricing to limited field exposure. ApiPass wraps the same underlying GraphQL infrastructure into a developer-friendly interface with smarter routing, richer payloads, and flexible cost tiers.
Twitter's official API v2 GET /2/users/:id endpoint requires OAuth 2.0 Bearer tokens, app registration, project setup, and tiered access approval. ApiPass replaces all of this with a single API key — sign up, generate a key, and start calling within minutes. No developer portal review, no app-level rate-limit negotiation.
Twitter's official endpoint exposes a limited set of fields per access tier, with higher-volume tiers gated behind expensive monthly subscriptions. ApiPass surfaces the richer GraphQL response (including highlights_info, affiliates_highlighted_label, professional, and relationship_perspectives) and lets you choose between starter, regular, and official channels — paying official rates only when stability is mission-critical, and saving up to 90% on bulk lookups via the lower tiers.
Confirm wallet-linked Twitter accounts by rest_id before granting airdrop eligibility or NFT whitelist access, avoiding spoofed screen-name swaps.
Reporters and OSINT analysts can resolve archived numeric IDs to current account states, tracking how public figures' profiles, bios, and verification status evolve over time.
Resolve user IDs collected from ad clicks or referral links into full profile snapshots, attributing campaign performance to specific audience segments by follower tier or professional category.
When a user contacts support with their Twitter ID, instantly pull their profile to confirm identity, check is_blue_verified status, and tailor responses to high-value accounts.
Sign up at ApiPass, navigate to the dashboard, and generate a Bearer API key. There's no app review process, no OAuth setup, and no waiting period — you can start making calls within minutes of registration.
Send a POST request to the createTask endpoint with the model set to twitter/graphql/user-by-rest-id and your target numeric user ID inside the input.variables object. You can optionally toggle the withHighlightedLabel flag to include affiliate badge data, and provide a callBackUrl if you want ApiPass to push the result to your server automatically once the task completes. The response will return a unique taskId that you'll use to fetch the result.
Send a GET request to the recordInfo endpoint with your taskId as a query parameter. Poll the endpoint (or wait for the callback) until the state field returns success. At that point, the complete Twitter user profile — including core identity, avatar, follower metrics, verification status, professional account details, and highlighted labels — will be available in the nested resultJson object, ready to be parsed and integrated into your application.
All APIs require authentication via Bearer Token.
Authorization: Bearer
Get user information by userId
The API accepts a JSON payload with the following structure:
1{
2 "model": "string",
3 "callBackUrl": "string (optional)",
4 "channel": "auto",
5 "input": {
6 "variables": {
7 "userId": "string",
8 "withHighlightedLabel": "boolean",
9 }
10 }
11}modelRequiredstringThe model name to use for generation
"twitter/graphql/user-by-rest-id"
callBackUrlOptionalstringCallback URL for task completion notifications. If omitted, no callback will be sent.
"https://your-domain.com/api/callback"
channelOptionalstringYou may specify the corresponding provider within APIPASS via the channel parameter; these providers handle the actual image and video generation tasks. APIPASS currently offers three provider options:
The default value for the channel parameter is auto. When enabled, APIPASS automatically allocates tasks across available providers based on real-time pricing and stability metrics to balance minimal cost and reliable performance. Retain the default auto value unless you have custom routing requirements.
Available options:
auto
The input object contains the following parameters:
input.variables.userIdRequiredstring44196397
input.variables.withHighlightedLabelOptionalbooleanfalse
1curl -X POST "https://api.apipass.dev/api/v1/jobs/createTask" \
2 -H "Content-Type: application/json" \
3 -H "Authorization: Bearer YOUR_API_KEY" \
4 -d '{
5 "model": "twitter/graphql/user-by-screen-name",
6 "callBackUrl": "https://your-domain.com/api/callback",
7 "input": {
8 "variables": {
9 "userId": "44196397",
10 "withHighlightedLabel": false,
11 }
12 }
13 }'1{
2 "code": 200,
3 "message": "success",
4 "data": {
5 "taskId": "task_12345678"
6 }
7}codeStatus code, 200 for success, others for failure
messageResponse message, error description when failed
data.taskIdTask ID for querying task status and results