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"
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.
| Endpoint | Credits | What it returns |
|---|---|---|
| /directory | 20 | List the accounts a Mastodon server shows in its directory. |
| /hashtag | 20 | Get daily use and account counts for a Mastodon hashtag. |
| /posts | 20 | Get a public Mastodon post by its URL: text, media, polls, link card, counts and author. |
| /posts/batch | 20 | Get up to 20 Mastodon posts by their ids. |
| /posts/context | 20 | Get the posts a Mastodon post replies to and the replies under it. |
| /posts/edits | 20 | List every saved version of a Mastodon post. |
| /posts/reactions | 20 | List the accounts that boosted or favourited a Mastodon post. |
| /profile | 20 | Get a Mastodon account's public profile by handle, with the owner's discoverability and indexing flags. |
| /profile/collections | 20 | List an account's curated collections of accounts (Mastodon 4.7 and later), with the member accounts. |
| /profile/followers | 20 | List the accounts that follow a Mastodon profile. |
| /profile/following | 20 | List the accounts a Mastodon profile follows. |
| /profile/posts | 20 | List the public posts of a Mastodon profile. |
| /profiles/batch | 20 | Get up to 40 Mastodon profiles by their ids. |
| /search | 20 | Search a Mastodon server for accounts, hashtags or posts. |
| /server | 20 | Get a Mastodon server's public profile, rules and statistics. |
| /server/activity | 20 | Get twelve weeks of activity for a Mastodon server. |
| /server/blocks | 20 | List the domains a Mastodon server publicly blocks. |
| /server/emojis | 40 | List the custom emoji of a Mastodon server. |
| /server/peers | 20 | List the domains a Mastodon server federates with. |
| /timelines/hashtag | 20 | List public Mastodon posts with a hashtag. |
| /timelines/public | 20 | List the public timeline of a Mastodon server. |
| /trends/hashtags | 20 | List the hashtags trending on a Mastodon server. |
| /trends/links | 20 | List the links trending on a Mastodon server. |
| /trends/posts | 20 | List 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 API | Official Mastodon API | |
|---|---|---|
| Access | One API key | Open; public data needs no key on most servers |
| Across servers | Name the server per call; same envelope for every server | Call each server's own API |
| Other platforms | The same key covers the other platforms too | Mastodon only |
| Cost per call | 20 credits | Free; 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.
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.
The one you name. Most endpoints take a host, such as mastodon.social, and post URLs carry their own server, because post ids belong to a server. A server only knows the remote posts and accounts it has seen.
Yes. /v1/mastodon/posts/reactions takes a post URL and kind=boosts or kind=favourites and lists the accounts, up to 80 a page.
They return Mastodon's own record shapes under our naming rules (snake_case keys, string ids and ISO times) rather than the shared profile and post entities, so fields may change. Every Mastodon endpoint is 20 credits a call except server emoji, which is 40. Calls that fail or find nothing are free.
No. There is no Mastodon app, OAuth flow or review. One API key in the x-api-key header works for Mastodon and the other 60 platforms.
Yes. Your first 10 calls priced at 100 credits or less are free, and the free plan includes 500 credits every month. No credit card is needed to get a key.
60 requests a minute and 10 requests in flight at once, per API key. Going over either returns a 429 with a Retry-After header, and a rejected request costs nothing. There is no daily quota: past those two limits, your credit balance is what bounds volume.
List endpoints return rows in data.items and a pagination object with next_cursor and has_more. Send next_cursor back unchanged as the cursor parameter for the next page, and stop when has_more is false. A handful of endpoints page with their own parameter instead; their reference pages name it.
No. A call that errors or finds nothing costs 0 credits. A live fetch costs the endpoint's price, or for a metered endpoint what it actually read. 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.
A call fetches live unless a recent copy is in the shared cache, and every response says which with the cached field; a cached answer costs 2 credits. Add fresh=1 or send Cache-Control: no-cache to skip the cache; that call is charged at the normal price.
Collecting publicly available data is generally treated differently from accessing private data, but the answer depends on your jurisdiction, Mastodon's terms and what you do with personal data afterwards. The API reads public data only. Talk to a lawyer for anything commercial.
Mastodon API guides
The same key works for 60 more platforms
- TikTok scraper API
- LinkedIn scraper API
- Twitter/X scraper API
- YouTube scraper API
- Reddit scraper API
- Pinterest scraper API
- Bluesky scraper API
- Truth Social scraper API
- Snapchat scraper API
- Telegram scraper API
- Twitch scraper API
- Kick scraper API
- Rumble scraper API
- Kwai scraper API
- Douyin scraper API
- Xiaohongshu (RedNote) scraper API
- Quora scraper API
- TikTok Shop scraper API
- Weibo scraper API
- Zhihu scraper API
- Substack scraper API
- Nextdoor scraper API
- Amazon scraper API
- App Store scraper API
- Apple Music scraper API
- Behance scraper API
- Dailymotion scraper API
- Deezer scraper API
- DEV Community scraper API
- Discord scraper API
- Dribbble scraper API
- Fandom scraper API
- Flickr scraper API
- GitHub scraper API
- Google Ads Transparency scraper API
- Google News scraper API
- Google Trends scraper API
- Gumroad scraper API
- Hacker News scraper API
- Hugging Face scraper API
- Ko-fi scraper API
- Lemmy scraper API
- Letterboxd scraper API
- Linktree scraper API
- Lnk.Bio scraper API
- Medium scraper API
- MyAnimeList scraper API
- npm scraper API
- Polymarket scraper API
- Product Hunt scraper API
- Shopify scraper API
- SoundCloud scraper API
- Spotify scraper API
- Stack Overflow scraper API
- Stan Store scraper API
- Steam scraper API
- Vimeo scraper API
- Wikipedia scraper API
- Yahoo Finance scraper API
- Yelp scraper API