InsightSocial

Mastodon scraper API

The InsightSocial Mastodon API has 24 endpoints, from 20 credits a call. A profile call costs 20 credits, about $0.02 on Pro, and your first 10 calls up to 100 credits each are free.

The Mastodon API for public profiles, posts, replies, boosts, hashtags, trends and server statistics on any server, as JSON, on the same key and balance as every other platform.

24 endpoints · from 20 credits a call · 10 free calls up to 100 credits each · no credit card

curl "https://api.insightsocial.app/v1/mastodon/profile?handle=example%40mastodon.social" \
-H "x-api-key: $INSIGHTSOCIAL_API_KEY"
200 OKJSON
{
"success": true,
"platform": "mastodon",
"endpoint": "/v1/mastodon/profile",
"schema_version": "2",
"data": {
"host": "mastodon.social",
"profile": {
"id": "109000000000000001",
"host": "mastodon.social",
"handle": "example@mastodon.social",
"username": "example",
"url": "https://mastodon.social/@example",
"display_name": "Example Person",
"bio": "Film photography and open source.",
"created_at": "2022-11-04T00:00:00.000Z",
"last_post_date": "2026-11-07",
"stats": {
"followers": 4120,
"following": 310,
"posts": 2875
},
"is_bot": false,
"is_discoverable": true,
"is_indexable": true
}
},
"unavailable": [],
"credits_used": 0,
"charge_reason": "miss",
"free_call": true
}

What Mastodon data can you get?

Public Mastodon data only, in the same JSON envelope as every other platform. Every Mastodon endpoint is beta: inside data it returns Mastodon's own structure under our naming rules (snake_case keys, string ids, ISO times where Mastodon gives a timestamp), not the shared profile and post schema, and fields may change.

Profiles and follower lists

An account's public profile with its discoverability and indexing flags, its posts, followers, following and curated collections, and up to 40 profiles by id.

Posts, threads and reactions

A post by URL with media, polls and counts, the thread around it, every saved edit, who boosted or favourited it, and up to 20 posts by id.

Hashtags, search and trends

Posts with a hashtag, daily use of a hashtag, a server's public timeline, search, and the hashtags, links and posts trending on a server.

Servers

A server's profile, rules and statistics, twelve weeks of activity, its directory, the servers it federates with or blocks, and its custom emoji.

What people build with the Mastodon API

  • Hashtag and topic tracking

    Follow a hashtag on the servers your audience uses, with daily use counts and the posts that carry it, next to the same topic on other platforms.

  • Fediverse research

    Map servers by activity, peers and public block lists, and see which accounts each server lists in its directory.

  • Thread and reaction analysis

    Read a post's full thread and the accounts that boosted or favourited it, and track how its text was edited.

Mastodon API endpoints

All 24 Mastodon endpoints and their price in credits. Every one has a fixed price.

EndpointCreditsWhat it returns
/directory20List the accounts a Mastodon server shows in its directory.
/hashtag20Get daily use and account counts for a Mastodon hashtag.
/posts20Get a public Mastodon post by its URL: text, media, polls, link card, counts and author.
/posts/batch20Get up to 20 Mastodon posts by their ids.
/posts/context20Get the posts a Mastodon post replies to and the replies under it.
/posts/edits20List every saved version of a Mastodon post.
/posts/reactions20List the accounts that boosted or favourited a Mastodon post.
/profile20Get a Mastodon account's public profile by handle, with the owner's discoverability and indexing flags.
/profile/collections20List an account's curated collections of accounts (Mastodon 4.7 and later), with the member accounts.
/profile/followers20List the accounts that follow a Mastodon profile.
/profile/following20List the accounts a Mastodon profile follows.
/profile/posts20List the public posts of a Mastodon profile.
/profiles/batch20Get up to 40 Mastodon profiles by their ids.
/search20Search a Mastodon server for accounts, hashtags or posts.
/server20Get a Mastodon server's public profile, rules and statistics.
/server/activity20Get twelve weeks of activity for a Mastodon server.
/server/blocks20List the domains a Mastodon server publicly blocks.
/server/emojis40List the custom emoji of a Mastodon server.
/server/peers20List the domains a Mastodon server federates with.
/timelines/hashtag20List public Mastodon posts with a hashtag.
/timelines/public20List the public timeline of a Mastodon server.
/trends/hashtags20List the hashtags trending on a Mastodon server.
/trends/links20List the links trending on a Mastodon server.
/trends/posts20List the posts trending on a Mastodon server.

Parameters, response fields and examples for each endpoint are in the Mastodon API reference.

InsightSocial vs the official Mastodon API

Every Mastodon server runs the open Mastodon REST API, and most public data can be read from it without a key, one server at a time.

InsightSocial APIOfficial Mastodon API
AccessOne API keyOpen; public data needs no key on most servers
Across serversName the server per call; same envelope for every serverCall each server's own API
Other platformsThe same key covers the other platforms tooMastodon only
Cost per call20 creditsFree; each server sets its own limits

The official API is the right tool for posting, messaging or managing accounts you own. This one is read-only public data.

How much does the Mastodon API cost?

Mastodon calls start at 20 credits. Every endpoint's price is in the table above and in the free GET /v1/endpoints catalogue, so you know the cost before you call. Pro's 10,000 monthly credits cover about 500 profiles at 20 credits each.

  • Failed calls are free

    A call that errors or finds nothing costs 0 credits.

  • Repeats and retries

    A repeat call is charged again: the full price when it fetches new data, 2 credits when the answer comes from the shared cache. Add fresh=1 to force a new read. Only a retry with the same Idempotency-Key is free.

  • One balance

    API calls and Chrome extension exports share the same credits. The free plan includes 500 a month.

Not writing code?

Connect InsightSocial to Claude or ChatGPT and ask for Mastodon data in plain English. Same account, same credits.

Use it from Claude or ChatGPT

Mastodon API: frequently asked questions

If you only need Mastodon, its own API is free and well documented, and it is a fine choice. This one is for when Mastodon is one of several platforms: one key, one response envelope, one credit balance and one set of errors across all of them.