All platforms24 Mastodon endpoints

Mastodon API. Any server, as JSON.

Profiles, posts, replies, hashtag timelines, trends and server details from Mastodon-compatible servers. Name the server and get one JSON shape back.

No credit card requiredRead the API docs
  • Any compatible server
  • 24 routes
  • 1 credit per request, 2 for emoji lists
  • Failed requests aren't charged
99.8% uptime#3 Product of the Day3,200+ developers

Teams running monitoring, research, and enrichment pipelines

Mastodon data as JSON. You build the product.

Live Mastodon data in one response shape, with platform changes handled for you.

Mastodon, plus every other platform

One key and one response envelope for Mastodon and 56 more platforms.

Pricing you can reason about

One request, one credit. Know how far your balance will go before you run your next batch.

Live data on every request

Fetch public data when you ask for it.

Nothing to maintain

We handle platform changes and breakages.

Built for production jobs

Run concurrent workloads with explicit statuses and request IDs.

Regular jobs. Better rates.

Running lookups every month? Get lower per-credit rates with a monthly plan. For occasional projects, choose pay as you go.

Never expires

What Mastodon data can you get?

24 endpoints, one API key. Every response comes back as live JSON in the same envelope.

Browse all 24 Mastodon endpoints

Profiles

Posts

Timelines

Discovery

Servers

Use cases

What teams build with Mastodon data

Monitoring, enrichment, research and content workflows on Mastodon data, on the same API as every other platform.

What you can build

Monitor hashtags and trends

Poll hashtag timelines and trending posts on the servers you choose.

Follow servers

Read public timelines, the directory and server details.

Look up accounts

Check followers, posts and profile fields on any compatible server.

How it works

Your first request in three steps.

Use TypeScript or your automation tool of choice.

Sources

+ 51 more platforms

One request

Social Fetch API

GET/v1/tiktok/profiles/charlidamelio

x-api-key: sk_live_••••••••

1 request · 1 credit

Same JSON shape

response.json200 OK
{
  "data": {
    "lookupStatus": "found",
    "profile": {
      "platform": "tiktok",
      "handle": "charlidamelio",
      "displayName": "charli d’amelio",
      "verified": true
    },
    "metrics": {
      "followers": 160263648
    }
  }
}
  1. Step 1

    Create your free account

    Get an API key with 100 requests included.

  2. Step 2

    Choose an endpoint

    Pass a username, URL, keyword, or post ID.

  3. Step 3

    Get clean JSON

    Use the response immediately or send it into your pipeline.

Works with your stack

Code, automate, or connect your AI.

Explore integrations

Pricing

Social data, priced simply.

Start with 100 free credits. Monthly plans give you predictable volume and lower per-request rates.

Starter

$29.00

18,000credits

  • Top up from $1.61 / 1k if you run out
  • Up to 25 monitors
Most popular

Growth

$79.00

50,000credits

  • Top up from $1.58 / 1k if you run out
  • 5 team seats
  • Up to 100 monitors

Scale

$225.00

150,000credits

  • Top up from $1.50 / 1k if you run out
  • 25 team seats
  • Up to 250 monitors
  • Cancel anytime
  • 30-day money-back guarantee
  • Price locked while you stay

Need 1M+ credits, invoicing, or volume rates? Talk to us

Trust signals

DevHunt

Product Hunt

Uneed

Customers

Teams building on Social Fetch.

“Our TikTok and Instagram scrapers broke constantly. Social Fetch took us off that rotation — we ship product again.”

Daniel Reeve · Founder, Social Crow
  • “Transcripts at volume from one endpoint. No broken scrapers for our small team to maintain.”

    Marcus Lin · Founder, Voice Gecko
  • “Live profile data on every request. We never flag accounts from a stale cache.”

    Hannah Webb · Founder, Scam Finder
  • “Heavy concurrent load, no rate limits to negotiate. The rare API I haven't wrapped in retries.”

    Owen Pritchard · Founder, IP Flare

Mastodon API: common questions

Which servers can I ask?

Any Mastodon-compatible server that answers the client API, including forks such as Hometown, Pleroma, Akkoma and Friendica. Pass the host with or without a scheme. A host that answers but is not compatible, such as a Misskey or Lemmy instance, returns lookupStatus: not_compatible with the software it reports.

How do I pass a handle or a post?

Profile routes accept user@host, acct:user@host, @user@host or a profile URL such as https://mastodon.social/@Gargron or https://mastodon.social/web/@Gargron. Post routes accept a post URL such as https://mastodon.social/@Gargron/1; the server in the URL is the server asked, because post ids belong to that server.

What does lookupStatus mean?

found means the item exists and is returned. not_found means the account, post or server does not exist. restricted means a login is required, the operator closed the feed, or the account is suspended. unsupported means the route is not offered there. not_compatible means the host is not a Mastodon-compatible server. HTTP 200 only means the request finished.

Why is a follower or following list empty?

An account can hide its network. When the owner does, isHidden is true and accounts is empty even though the profile counters are not. Without a hidden network, an empty list means the account has no followers or follows nobody on that server.

Can I search posts?

Search covers accounts and hashtags on every server. type=posts works only where the software allows public post search, such as Pleroma and Akkoma. On Mastodon type=posts normally comes back restricted with reason.code: login_required rather than an empty success. Search has no paging.

Why do some timelines return restricted?

Operators can restrict the public and hashtag timelines. The response may carry declaredAccess with the operator's local and remote settings (public, authenticated or disabled) so you can see which switch applies. About a third of servers close the public timeline.

How do batches report what is missing?

profiles.batch.get takes up to 40 account ids and posts.batch.get up to 20 post ids on one host. Both return the items the server sent plus missingIds for the ids it did not return. Ids are local to that server, and neither route pages.

How much does a Mastodon route cost?

Each Mastodon route charges one credit per completed request, except the custom emoji list, which charges two because a server sends its whole catalogue in one answer. A completed answer is billed even when lookupStatus is not_found, restricted, unsupported or not_compatible, and a name with no DNS record is one of those billed 200 answers. HTTP error responses (400, 401, 402, 502 and 503) are free. The price on the endpoint page is the billing source of truth, each page of a list or timeline is billed separately, and meta.creditsCharged on every response is the final word. New accounts start with 100 free credits.

What happens when a server name is correct but the server is down?

If the name resolves but the server does not answer, the response is HTTP 503 temporarily_unavailable with Retry-After, and no credits are charged. A name with no DNS record is different: it returns HTTP 200 with lookupStatus: not_found and reason.code: host_not_found, and that answer is billed. Both describe the named server, not a Social Fetch outage.

Can I use these routes from agents or MCP?

Yes. Every Mastodon route is a typed MCP tool and is reachable through Ask (POST /v1/ask) in plain English. Use the typed routes for production jobs.

The Mastodon API in detailHow the Mastodon routes work, what they cost, and how they differ from the official API.

Why teams use Social Fetch for Mastodon

Mastodon is many independent servers speaking one client API, so the server is part of every request. Pass it as host on server and feed routes, inside the handle on profile routes, or inside the post url on post routes. Ids belong to the server you asked: mastodon.social post 1 is not post 1 anywhere else, and every account and post in a response carries the host it came from.

The 24 routes cover accounts (profile.get, profile.posts.list, profile.followers.list, profile.following.list, profile.collections.list, profiles.batch.get), posts (post.get, post.context.get, post.edits.list, post.reactions.list, posts.batch.get), feeds (timeline.hashtag.list, timeline.public.list, hashtag.get, trends.posts.list, trends.hashtags.list, trends.links.list, directory.list, search.get) and servers (server.get, server.activity.list, server.peers.list, server.emojis.list, server.blocks.list).

Every response is the { data, meta } envelope and every outcome is HTTP 200, so branch on data.lookupStatus: found, not_found, restricted (a login is needed or the operator closed the feed), unsupported (the server does not offer the route) or not_compatible (the host is not a Mastodon-compatible server). Cursor pages carry page.nextCursor; trends and the directory carry page.nextOffset. Batch routes return the items they found plus missingIds for the rest.

How to call the Mastodon API

  1. 1. Create an API key

    Sign up at Social Fetch and copy a key (sfk_...). New accounts get 100 free credits, enough to try every Mastodon route on a few servers.

  2. 2. Name the server and route

    Use GET /v1/mastodon/profiles/Gargron%40mastodon.social for an account or GET /v1/mastodon/timelines/public?host=fosstodon.org&limit=20 for a public timeline. Send x-api-key on every request.

  3. 3. Branch, then page

    Check data.lookupStatus before storing a row. Continue with page.nextCursor while page.hasMore is true (or page.nextOffset on trends and the directory), and bill from meta.creditsCharged.

What each Mastodon route returns

  • Resolve a handle such as Gargron@mastodon.social or a profile URL to a full account with counters, flags, fields and roles.
  • List an account's posts with filter=all, original, media or pinned, and follow page.nextCursor for older pages.
  • Read a post with its author, media, poll, link card, hashtags and mention list, or a whole reply tree with ancestors and descendants.
  • Get the edit history, the accounts behind boosts or favourites, and up to 40 accounts or 20 posts in one batch call.
  • Pull a hashtag timeline, a server's public timeline, trending posts, hashtags and links, the profile directory and search.
  • Read server details, twelve weeks of activity, the peer list, custom emoji and published domain blocks.

How much does the Mastodon API cost?

Each Mastodon route charges one credit per completed request, except the custom emoji list, which charges two because a server sends its whole catalogue in one answer. The price on every endpoint page is the billing source of truth, and each page of a list or timeline is its own request. Credits never expire on pay-as-you-go packs, and meta.creditsCharged on every response is the billing source of truth.

Social Fetch vs the official Mastodon API

Each Mastodon-compatible server exposes the client API its software ships with, and the answer depends on the server you ask: its version, its software, its operator settings and whether a route is open to the public. Social Fetch gives you one request shape and one response shape across servers, typed lookupStatus instead of a different error on each host, stable cursors, and the same credit metering as every other source.

Pull your first Mastodon data.

Run a live Mastodon request in the playground. 100 free credits, no card, JSON back in seconds.

No credit cardSign up in 30 seconds withGoogleGitHub