Mastodon
Mastodon API reference: 24 endpoints for profiles, posts, hashtags, trends and servers. Per-endpoint credit prices and cURL examples.
Mastodon profiles, posts, threads, boosts and favourites, hashtags, search, trends and server statistics, on any server you name.
Base path: /v1/mastodon/...
Quickstart
curl "https://api.insightsocial.app/v1/mastodon/directory?host=mastodon.social" \
-H "x-api-key: $INSIGHTSOCIAL_API_KEY"Endpoints
Every endpoint here has a fixed price.
Every endpoint here is beta: it returns the platform's own structure under our naming rules (snake_case keys, string ids, ISO times where the platform gives a timestamp), not a schema-2 entity, and its fields may change. See Beta endpoints.
| Endpoint | Credits | What it returns | Key parameters |
|---|---|---|---|
/directory | 20 | List the accounts a Mastodon server shows in its directory. Beta. | host |
/hashtag | 20 | Get daily use and account counts for a Mastodon hashtag. Beta. | tag, host |
/posts | 20 | Get a public Mastodon post by its URL: text, media, polls, link card, counts and author. Beta. | url |
/posts/batch | 20 | Get up to 20 Mastodon posts by their ids. Beta. | host, ids |
/posts/context | 20 | Get the posts a Mastodon post replies to and the replies under it. Beta. | url |
/posts/edits | 20 | List every saved version of a Mastodon post. Beta. | url |
/posts/reactions | 20 | List the accounts that boosted or favourited a Mastodon post. Beta. | url, kind |
/profile | 20 | Get a Mastodon account's public profile by handle, with the owner's discoverability and indexing flags. Beta. | handle |
/profile/collections | 20 | List an account's curated collections of accounts (Mastodon 4.7 and later), with the member accounts. Beta. | handle |
/profile/followers | 20 | List the accounts that follow a Mastodon profile. Beta. | handle |
/profile/following | 20 | List the accounts a Mastodon profile follows. Beta. | handle |
/profile/posts | 20 | List the public posts of a Mastodon profile. Beta. | handle |
/profiles/batch | 20 | Get up to 40 Mastodon profiles by their ids. Beta. | host, ids |
/search | 20 | Search a Mastodon server for accounts, hashtags or posts. Beta. | host, query |
/server | 20 | Get a Mastodon server's public profile, rules and statistics. Beta. | host |
/server/activity | 20 | Get twelve weeks of activity for a Mastodon server. Beta. | host |
/server/blocks | 20 | List the domains a Mastodon server publicly blocks. Beta. | host |
/server/emojis | 40 | List the custom emoji of a Mastodon server. Beta. | host |
/server/peers | 20 | List the domains a Mastodon server federates with. Beta. | host |
/timelines/hashtag | 20 | List public Mastodon posts with a hashtag. Beta. | tag, host |
/timelines/public | 20 | List the public timeline of a Mastodon server. Beta. | host |
/trends/hashtags | 20 | List the hashtags trending on a Mastodon server. Beta. | host |
/trends/links | 20 | List the links trending on a Mastodon server. Beta. | host |
/trends/posts | 20 | List the posts trending on a Mastodon server. Beta. | host |