X (Twitter) APIunofficial
Public X (Twitter) profiles by screen name, logged out: full profile via the UserByScreenName GraphQL query, or the profile card from the server-rendered page. No tweets (the logged-out timeline query 404s).
- x.com
all live 2 operations, checked by the installs that call them.
Try it
Set up API Anything for your agents:
npx -y api-anything setupThen ask your agent, which finds this site by itself, or call it from a shell:
api-anything pull x
api-anything call x getProfile screen_name=nasaOperations
| Operation | Method | Login | Writes | Status |
|---|---|---|---|---|
getProfile(screen_name) -> title, screen_name, bio, avatar, banner, posts, joined, urlProfile card of an X account from its server-rendered page (meta tags): name, bio, avatar, banner, post count as displayed (e.g. "74.3K"), join month. No follower count. Fallback if getUser breaks. |
GET | no | no | Live0 confirmations |
getUser(screen_name) -> rest_id, core.name, core.screen_name, core.created_at_ms, profile_bio.description, location.location, relationship_counts.followers, relationship_counts.following, tweet_counts.tweets, verification.is_blue_verified, verification.verified_type, privacy.protected, avatar.image_url, banner.image_urlPublic profile of an X account by screen name: id, name, bio, location, follower/following/post counts, verification, avatar. Uses the UserByScreenName GraphQL query with the public web-app bearer; no account needed. |
GET | no | no | Live0 confirmations |
Notes
No account is needed. No tweets.
- An unknown handle returns
inputfrom both ops. getProfile'stitlelooks like "NASA (@NASA) on X".getUser'savatar.image_urlis the_normal(48 px) size. Replace_normalwith_400x400for a larger one.getUsersends X's public bearer, which X could rotate. Then X answers 400 "Bad Authentication data" (code 215), and the call re-learns the bearer from the page (a browser run, once).
About these operations
Each operation is a request learned from X (Twitter)'s own web pages: API Anything replays it over plain HTTP and falls back to a browser when it must. Read them as JSON.