{"uid":"cap_uGOnRRVPyLc9zIbgjTJt8","slug":"x-data-gateway-user-profile-by-username-7a9493c2","name":"X Data Gateway – User Profile by Username","description":"Look up a public X/Twitter user by handle. Returns id, username, display name, bio, location, followers/following/statuses counts, verified flag, createdAt, profile image. Query: username (required, no @). e.g. GET /users/by/username?username=elonmusk","url":"https://x-data-gateway.annushka1190.workers.dev/users/by/username","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["username"],"properties":{"username":{"type":"string","description":"X handle without @"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"data":{"id":"44196397","username":"elonmusk","followersCount":200000000}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_OOhKrcsfZgFlIOofRCU9f","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches a Twitter/X user's public profile data (ID, display name, follower count, etc.) given their username handle.","exampleAgentPrompt":"Can you look up the Twitter profile for the username 'naval' and tell me their follower count and user ID?","exampleUseCases":[{"title":"Influencer follower count check","prompt":"What's the current follower count for the Twitter account @sama? I want to know if they've crossed 1 million followers yet."},{"title":"Resolve username to user ID","prompt":"I need the numeric Twitter user ID for the account 'balajis' — can you look that up for me?"},{"title":"Verify a public figure's X profile","prompt":"Can you pull up the public X profile for 'BillGates' and tell me their display name and follower count so I can confirm it's the real account?"}],"resultDescription":"Returns a JSON object with the user's numeric ID, username, display name, and followers count for the requested X handle.","failureModes":["Username not found — returns an error if the handle does not exist or has been deactivated","Rate limiting or payment failure — x402 payment may be rejected if USDC balance is insufficient","Private or suspended accounts may return no data or a restricted response","Malformed username (e.g. including @ symbol) may return an error"],"whenToPreferThis":"Use this endpoint when you need quick, pay-per-request access to Twitter/X user profile data without setting up an official Twitter API account or managing API keys. Ideal for AI agents that need occasional profile lookups in USDC microtransactions via x402 protocol.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:49:45.191Z","isFirstParty":false}