Mastodon API

Mastodon Social Data API for Profiles, Statuses, Hashtags, and Search

Scrappa's Mastodon API returns structured JSON from any public Mastodon instance. Look up public profiles by username, read account statuses with cursor pagination, fetch status contexts with replies, browse hashtag timelines, and search for accounts and hashtags. Scrappa is an independent service and is not affiliated with or endorsed by Mastodon.

500 free credits
No card needed
From $0.20 / 1k
Pay as you go
Structured JSON
Ready for apps
API key access
Test in minutes
5
Endpoints
Any instance
Source coverage
$0.20
Per 1k requests

Try it now

Make one request. Inspect structured JSON.

Use the first endpoint in this API family with a Scrappa API key. Every account includes 500 free monthly credits, so you can validate the response shape before buying credits.

Request preview
Request
curl -X GET "https://scrappa.co/api/mastodon/profile?instance=mastodon.social&acct=Gargron" -H "Accept: application/json" -H "X-API-KEY: YOUR_API_KEY"
JSON response
{
  "success": true,
  "data": {
    "id": "1",
    "username": "Gargron",
    "acct": "Gargron",
    "display_name": "Eugen Rochko",
    "followers_count": 383131,
    "following_count": 749,
    "statuses_count": 82500,
    "url": "https://mastodon.social/@Gargron"
  }
}

What you can build

Structured data for real applications. Here are some ideas.

Social Profile Lookup

Look up any public Mastodon account by username or federated handle to get display name, bio, avatar, follower counts, and custom fields.

Account Timeline Monitoring

Read the public posting history of any Mastodon account with cursor-based pagination and filtering by replies, boosts, and media.

Thread Context Reading

Fetch any status with its full conversation context including ancestors and descendants to read entire threads.

Hashtag Trend Tracking

Browse public hashtag timelines on any Mastodon instance to track trending topics and conversations in real time.

Cross-Instance Search

Search any public Mastodon instance for accounts, hashtags, or statuses with type filtering and pagination.

Mastodon scraper API

Mastodon API for social profiles, statuses, and hashtags

The Mastodon API is built for social media monitoring, research, and community tools. Each profile includes display name, bio, avatar, header, follower counts, and custom fields. Statuses include content, visibility, language, counts, media attachments, tags, and the embedded account. Hashtag timelines return the latest public posts for any tag.

Look up any public Mastodon account by username or federated handle.

Read account statuses with cursor-based pagination and filtering.

Fetch status contexts with ancestors and descendants for full threads.

Browse hashtag timelines with media, local/remote, and tag filters.

Search any public instance for accounts, hashtags, or statuses.

Choose the right Mastodon API endpoint

Use Profile Lookup for account discovery

Look up any public Mastodon account by username to get the full profile object with display name, bio, avatar, follower counts, and custom fields.

Open Mastodon Profile API docs

Use Account Statuses for timeline monitoring

Read the public posting history of any account with cursor-based pagination. Filter by replies, boosts, and media to focus on the content you need.

Open Mastodon Statuses API docs

Use Status Context for thread reading

Fetch any status with its full conversation context including ancestors and descendants to read entire threads in one request.

Open Mastodon Status Context API docs

Use Hashtag Timeline for trend tracking

Browse public hashtag timelines on any Mastodon instance to track trending topics and conversations in real time.

Open Mastodon Hashtag API docs

Use Search for cross-instance discovery

Search any public Mastodon instance for accounts, hashtags, or statuses with type filtering and pagination.

Open Mastodon Search API docs

Available endpoints

Everything you need in one API.

Scrappa vs ScrapingBee / ScraperAPI

See how Scrappa compares to the official API.

Mastodon social data as JSON
Scrappa:
ScrapingBee / ScraperAPI: Build your own parser
Multi-instance support
Scrappa: Any public instance
ScrapingBee / ScraperAPI: Single instance
Thread context
Scrappa: Ancestors + descendants
ScrapingBee / ScraperAPI: Parse it yourself
Price per 1k requests
Scrappa: From $0.20
ScrapingBee / ScraperAPI: Varies by credits per request
Unified API key
Scrappa: Yes (80+ APIs)
ScrapingBee / ScraperAPI: Scraping only
Free tier
Scrappa: 500 credits/month
ScrapingBee / ScraperAPI: Trial credits

Key features

Public profile lookup by username or federated handle
Account statuses with cursor-based pagination and filtering
Status context with ancestors and descendants for full threads
Hashtag timelines with media, local/remote, and tag filters
Cross-instance search for accounts, hashtags, and statuses

Frequently asked questions

No. Scrappa is an independent service and is not affiliated with or endorsed by Mastodon. The Mastodon API returns structured JSON from public Mastodon instances through a Scrappa API key.

Every Scrappa account includes 500 free credits each month. After that, each request costs one credit, which works out to $0.20 to $0.30 per 1,000 requests depending on the credit pack or plan. Failed requests are never charged.

Account statuses and hashtag timelines use cursor-based pagination. The response carries a pagination block with has_more plus next_cursor (max_id) and prev_cursor (min_id) taken from the upstream Link header. Search uses offset-based pagination. A valid empty result is a successful response.

Any public Mastodon instance. Pass the instance parameter with the hostname (e.g. mastodon.social, mstdn.social). IP addresses and private ranges are not allowed.

Start using the Mastodon API

Sign up and get 500 free credits. No credit card required.