Mastodon API

Mastodon Scraper API for Profiles, Posts and Search

Read Mastodon profiles, posts, replies, boosts and favourites, followers, hashtags, trends and server details. Look up accounts on any server by their user@server address.

WHAT YOU CAN BUILD / 10 ENDPOINTS

Put Mastodon data to work.

Find your use case, then explore the request and response.

Get a Mastodon profile

GET/v1/mastodon/profile

Build a fediverse creator directory from names, bios, verified links and follower, following and post counts.

Get a Mastodon user’s posts

GET/v1/mastodon/user/posts

Build an account monitor from original posts, replies, boosts or media posts with reply, boost and favourite counts.

Get Mastodon followers or following

GET/v1/mastodon/user/connections

Map an account’s community from its followers or following, with each account’s profile and audience size.

Get a Mastodon post

GET/v1/mastodon/post

Save a Mastodon post as a source record with its text, media, link preview, poll and engagement counts.

Get Mastodon post replies

GET/v1/mastodon/post/replies

Rebuild a conversation from the posts above a post and its replies, linked by in_reply_to_id.

Get Mastodon post boosts or favourites

GET/v1/mastodon/post/interactions

Find who amplified a post from the accounts that boosted or favourited it, with their profiles.

Get Mastodon hashtag posts

GET/v1/mastodon/hashtag

Track a campaign or topic from recent hashtag posts and seven days of daily hashtag usage.

Search Mastodon accounts and hashtags

GET/v1/mastodon/search

Find accounts or hashtags for a topic, with profile details or daily hashtag usage for each result.

Get Mastodon trends

GET/v1/mastodon/trends

Build a trends dashboard from a server’s trending posts, hashtags and news links with their share history.

Get a Mastodon server

GET/v1/mastodon/server

Compare Mastodon servers by monthly active users, weekly posts and sign-ups, languages, rules and registration settings.

HOW IT WORKS

From API key to Mastodon data in four steps.

Run a sample below without a key.

  1. 01

    Get your API key

    Create a free account and copy your key. You start with 100 free credits; no card needed.

  2. 02

    Choose an endpoint

    Pick one of the 10 Mastodon endpoints and add its input, such as a public handle.

  3. 03

    Send one request

    Call it with your key in the x-api-key header. ScrapeAtlas reads the public Mastodon data and retries when a read fails.

  4. 04

    Use the JSON

    Get structured JSON with a coverage status. Only successful requests use a credit.

TRY IT HERE / LIVE SAMPLE

Try a sample request.

Try the Mastodon API right here. This sample uses the Get a Mastodon profile endpoint and returns live JSON. No API key needed.

  1. 01
    Choose a sample value

    Start with Gargron@mastodon.social, or change the handle field to your own value.

  2. 02
    Select Run sample

    Execute the sample code and see the response in the JSON response tab.

  3. 03
    Build on the result

    Open the full playground to try more parameters and copy code for your app.

Open this endpoint in the playground Request and response fields
LIVE SAMPLE / Get a Mastodon profileNo API key needed

Preparing the sample…

// Run this sample here — no API key needed.
const value = "Gargron@mastodon.social";
const url = new URL("/website/demo/mastodon",
  "https://api.scrapeatlas.com");
url.searchParams.set("value", value);

const response = await fetch(url);
const data = await response.json();
console.log(data);
GET/v1/mastodon/profile

A live example from our playground. Change the value above, then select Run sample.

CUSTOMER STORIES

What they are saying
about us.

Nigel Yong — Founder, PostOnce

Pay as you go

Start free.
Build at your pace.

One-time credit packs, priced in US dollars. Credits never expire, and there is no monthly commitment.

Free

Try the API with your next idea.

$0No credit card needed

100 free credits

One starter grant per account

Starter

For a new idea or a one-off project.

$19USD / one-time

10,000 credits

$1.90 per 1,000 successful requests

Growth

Save 6.3%

For regular workflows and bigger builds.

$89USD / one-time

50,000 credits

$1.78 per 1,000 successful requests

Enterprise Plan

Want to scrape larger volumes?

Let’s talk about a plan that fits your scale.

Mastodon API

Frequently Asked Questions

Explore the API reference

Mastodon API and scraping

What data can I retrieve with the Mastodon API?

Retrieve public profiles, account posts, single posts with their replies, the accounts that boosted or favourited a post, followers and following, hashtag posts, account and hashtag search, trends and server details. Each endpoint returns structured JSON with a cursor wherever the results continue on another page.

Can I look up a Mastodon profile on any server?

Yes. Pass user@server or a profile URL to Profile. Accounts on 28 major servers are read from their own server; accounts elsewhere, including other fediverse software, are read from mastodon.social’s copy and marked with a federated_view warning. Use Connections for the account’s followers or following.

How do I scrape posts from a Mastodon account?

Call User Posts with the account’s user@server address. Each page returns up to 40 posts and boosts with content, media, hashtags and reply, boost and favourite counts. Pass the returned cursor for older posts, and set filter to original, posts, media or pinned to narrow the timeline.

Mastodon: servers, trends and search

Can I compare Mastodon servers with the API?

Yes. Server returns a server’s title, description, software version, monthly active users, languages, rules and registration settings, plus up to 12 weeks of post, login and sign-up counts. Set the server parameter to any of the 28 supported servers to compare them side by side.

How do I get trending posts and hashtags on Mastodon?

Call Trends with type posts, hashtags or links. Trending posts include their reply, boost and favourite counts; trending hashtags and links include daily usage history. Set server to read another server’s trends and pass the returned cursor for the next page.

How do I search Mastodon for accounts or hashtags?

Call Search with a query and type accounts or hashtags. Account results include profile details and follower counts; hashtag results include daily usage. To read the posts behind a hashtag, call Hashtag, which returns recent posts newest first with a cursor for older ones.

API access and integration

How do I get a ScrapeAtlas API key and authenticate requests?

Create a ScrapeAtlas account and generate an API key in the dashboard. Send the key in the x-api-key request header when calling https://api.scrapeatlas.com. The API playground lets you enter an endpoint’s parameters and inspect its JSON response.

Can I call the scraping API from Python, JavaScript or the CLI?

Yes. Send authenticated HTTP requests from Python, JavaScript or another language that supports HTTP. The endpoint reference includes request examples and response fields. Use the ScrapeAtlas CLI for terminal workflows and pass the returned pagination values when requesting additional result pages.

Can I connect an AI assistant to the ScrapeAtlas MCP server?

Yes. Connect an MCP-compatible assistant to the ScrapeAtlas MCP server to discover and call the public platform tools with your ScrapeAtlas account. The agent reference also gives coding assistants a readable guide to the endpoints and their request schemas.

Make something with it

Ready to build?

Bring social data into your next project.
Start with 100 free credits and see what you can build.

No credit card needed.Building with an AI agent?