Mastodon Profiles Batch API
Up to 40 account ids from one server in one request, with the missing ones named.
GET /v1/mastodon/profiles/batch1 credit Failed requests are free
About this endpoint
GET /v1/mastodon/profiles/batch?host=mastodon.social&ids=1,13179 takes one server and a comma-separated list of account ids from that server. It returns data.accounts with full account records and data.missingIds for the requested ids the server did not return. Ids are local: account 1 on mastodon.social is a different account from 1 anywhere else.
The route accepts 1 to 40 ids and does not page. Use it to hydrate ids collected from search, a follower list or a batch of posts without one request per account. A deleted or suspended account, or an id that never existed, appears in missingIds rather than as an error.
Mastodon Profiles Batch API FAQ
How do I pass the ids?
Send host with the server name and ids as a comma-separated list, for example ids=1,13179. Between 1 and 40 ids are accepted, and duplicates are rejected.
How many credits does one batch cost?
Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth.
Why is an id in missingIds?
The server did not return it: the account was deleted, is suspended, or the id never existed there. missingIds is the only signal because the server does not explain each id.
Can I mix ids from different servers?
No. One request asks one host. Send one batch per server, because account ids are local to the server that issued them.
Other Mastodon endpoints
- ProfileGET /v1/mastodon/profiles/{handle}
- Profile postsGET /v1/mastodon/profiles/{handle}/posts
- FollowersGET /v1/mastodon/profiles/{handle}/followers
- FollowingGET /v1/mastodon/profiles/{handle}/following
- CollectionsGET /v1/mastodon/profiles/{handle}/collections
- PostGET /v1/mastodon/posts
- Post contextGET /v1/mastodon/posts/context
- Post editsGET /v1/mastodon/posts/edits