X API: Get profile
Gets the public X profile for a username or profile link, including counts, verification, images and account details. Does not include posts or a timeline.
Unofficial. Not affiliated with or endorsed by X.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Username, required
username X handle with or without @, or an X profile link, for example NASA or https://x.com/NASA.
NASA
Input as JSON
{ "username": "NASA"}Output
{ "bio": "Making the seemingly impossible, possible. ✨", "posts": 74449, "location": "Pale Blue Dot", "username": "NASA", "followers": 92310285, "following": 115, "x_user_id": "11348282", "joined_date": "2007-12-19", "display_name": "NASA", "profile_link": "https://x.com/NASA" , "website_link": null, "banner_image_link": "https://pbs.twimg.com/profile_banners/11348282/1788992290" , "verification_type": "none", "profile_picture_link": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg" }Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"x.com/get_profile","input":{"username":"NASA"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "x.com/get_profile" , "input": { "username": "NASA" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "x.com/get_profile" , "input": { "username": "NASA" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run x.com/get_profile# with {"username":"NASA"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "username" ], "properties": { "username": { "type": "string", "minLength": 1, "description": "X handle with or without @, or an X profile link, for example NASA or https://x.com/NASA." } }}Output schema
{ "type": "object", "required": [ "username", "display_name", "bio", "followers", "following", "posts", "joined_date", "verification_type", "location", "website_link", "profile_picture_link", "banner_image_link", "profile_link", "x_user_id" ], "properties": { "bio": { "type": [ "string", "null" ] }, "posts": { "type": [ "integer", "null" ] }, "location": { "type": [ "string", "null" ] }, "username": { "type": "string" }, "followers": { "type": [ "integer", "null" ] }, "following": { "type": [ "integer", "null" ] }, "x_user_id": { "type": "string" }, "joined_date": { "type": [ "string", "null" ] }, "display_name": { "type": "string" }, "profile_link": { "type": "string" }, "website_link": { "type": [ "string", "null" ] }, "banner_image_link": { "type": [ "string", "null" ] }, "verification_type": { "type": "string" }, "profile_picture_link": { "type": [ "string", "null" ] } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
x.com/get_profile- Returns
- username, display name, bio, follower/following/post counts, joined date, verification, location, website, images, profile link, user ID
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method x.com/get_profile with the inputs above.
Ask your agent
- Can you pull up the public profile for @elonmusk and tell me his follower count and when the account was created?
- I need the bio, location, and website listed on the X account at https://x.com/NASA.
- What's the verification status and user ID for the handle openai on X?
- Look up the X profile for jack and show me how many accounts he follows and his total post count.
- Get the profile details for the X account linked at x.com/BBCNews, including the profile image and banner.
See more
All X methodsGets a public X (Twitter) post from its link: author, full text, posting time, likes, reposts, replies, quotes, views, language, media and the quoted post. Deleted, protected and unavailable posts cannot be returned.
x.com/get_postGets an Instagram account's public profile from its username, @name or profile link: name, bio, exact follower, following and post counts, verified and private flags, first bio link, profile picture and account ID.
instagram.com/get_profileLooks up a public Bluesky profile by handle or profile link, including bio, audience counts and join date. A bare name first checks its .bsky.social handle, then the top relevant people-search result.
bsky.app/get_profileGets a public Threads profile by username or profile link, with bio, followers, verification, picture and bio links. Private profiles are not returned.
threads.com/get_profileGets a TikTok creator's public profile and totals (followers, following, likes, videos) from a username, @handle or profile link. Profiles not visible to public visitors cannot be returned.
tiktok.com/get_profileGets a public Mastodon profile by handle or profile link, with its bio, counts, dates and profile fields. Major servers are read directly. Other servers are looked up through mastodon.social, and their home-server account ID is not available.
mastodon.social/get_profileGets a Chess.com player's public profile, ratings and game records, best puzzle rating and Puzzle Rush best score from a username or member profile link.
chess.com/get_player_statsGets a public Pinterest profile and its visible boards in profile order. Monthly views are null when Pinterest does not show them.
pinterest.com/get_profile