Mastodon API: Get profile
Gets 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.
Unofficial. Not affiliated with or endorsed by Mastodon.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Account, required
account Full handle, handle on mastodon.social, or profile link, for example Gargron@mastodon.social.
https://fosstodon.org/@kev
Input as JSON
{ "account": "https://fosstodon.org/@kev" }Output
{ "bio": "Used to help run Fosstodon. These days, I just hang out here.\nI work in InfoSec and live with two kids, one wife, two dogs, a blind cat, a flock of 25 chickens, 8 goats, and more fish than I can count.\nAlso into watches and motorbikes — both riding and wrenching.\nThis account isn't monitored often (…", "posts": 1371, "handle": "kev@fosstodon.org", "is_bot": false, "followers": 13017, "following": 141, "account_id": "1", "avatar_url": "https://cdn.fosstodon.org/accounts/avatars/000/000/001/original/8f82f81f058d509e.png" , "joined_date": "2017-08-01", "profile_url": "https://fosstodon.org/@kev" , "display_name": "Kev Quirk", "profile_fields": [ { "label": "Blog", "value": "https://kevquirk.com" }, { "label": "Pure Commons", "value": "https://purecommons.org" } ], "last_active_date": "2026-10-22"}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"mastodon.social/get_profile","input":{"account":"https://fosstodon.org/@kev"}}' # 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": "mastodon.social/get_profile" , "input": { "account": "https://fosstodon.org/@kev" }})# 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": "mastodon.social/get_profile" , "input": { "account": "https://fosstodon.org/@kev" } }), 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 mastodon.social/get_profile# with {"account":"https://fosstodon.org/@kev"}"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": [ "account" ], "properties": { "account": { "type": "string", "description": "Full handle, handle on mastodon.social, or profile link, for example Gargron@mastodon.social." } }}Output schema
{ "type": "object", "required": [ "handle", "profile_fields", "profile_url" ], "properties": { "bio": { "type": [ "string", "null" ] }, "posts": { "type": [ "integer", "null" ] }, "handle": { "type": "string" }, "is_bot": { "type": [ "boolean", "null" ] }, "followers": { "type": [ "integer", "null" ] }, "following": { "type": [ "integer", "null" ] }, "account_id": { "type": [ "string", "null" ] }, "avatar_url": { "type": [ "string", "null" ] }, "joined_date": { "type": [ "string", "null" ] }, "profile_url": { "type": "string" }, "display_name": { "type": [ "string", "null" ] }, "profile_fields": { "type": "array", "items": { "type": "object", "properties": { "label": { "type": "string" }, "value": { "type": "string" } } } }, "last_active_date": { "type": [ "string", "null" ] } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
mastodon.social/get_profile- Returns
- handle, display name, bio, counts, dates, profile fields, avatar, profile URL
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 mastodon.social/get_profile with the inputs above.
Ask your agent
- Look up the Mastodon profile for Gargron@mastodon.social and show me his bio and follower count
- Can you get the public profile details for the account @Gargron@mastodon.social, including profile fields and join date?
- I need the display name, avatar, and profile URL for https://mastodon.social/@Gargron
- Find the Mastodon user jaypeters@fosstodon.org and tell me how many posts and following they have
- What's the bio and creation date for the fediverse account eugen@mastodon.social?
See more
All Mastodon methodsLists a Mastodon account's latest public posts, newest first. Replies and boosts are optional. Private and unlisted posts are left out.
mastodon.social/list_recent_postsLists the latest public posts for a hashtag on a Mastodon server, newest first. Some servers require login for public timelines.
mastodon.social/list_hashtag_postsLooks 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 the public X profile for a username or profile link, including counts, verification, images and account details. Does not include posts or a timeline.
x.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 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 public Instagram account totals, engagement and grade on Social Blade by handle or profile link. Daily history and 30-day follower change need a Social Blade sign-in, so they are not returned.
socialblade.com/get_instagram_statsGets 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_profile