Mastodon Server API
One server's public profile: who runs it, what it allows, how big it is and which feeds it opens.
GET /v1/mastodon/servers/{host}1 credit Failed requests are free
About this endpoint
GET /v1/mastodon/servers/mastodon.social returns data.server and data.software. software names the software when it can be told (mastodon, hometown, pleroma, akkoma and others) and is null when it cannot. data.server carries title, description, version, softwareVersion, sourceUrl, languages, thumbnail, icons, registrations (open, approvalRequired, reasonRequired, minAge, messageHtml), limits (postCharacters, mediaPerPost, pollOptions, imageBytes, videoBytes, featuredTags), stats (users, posts, knownDomains, activeUsersMonth), links, features, access and the public contactAccount without its email.
Add include=rules for the server's rules and include=about for its long description in aboutHtml. These arrive as a comma-separated list and are independent. A host that answers but is not a Mastodon-compatible server returns lookupStatus: not_compatible with the software it reports in data.software, so you can tell a Misskey or Lemmy host from a typo.
Mastodon Server API FAQ
What does software tell me?
It names the server software when the version string or NodeInfo makes it clear, for example mastodon, hometown, pleroma, akkoma or kmyblue. It is null when the server does not say, and non-null on a not_compatible result.
How many credits does a server lookup 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.
How do I get the rules or the about page?
Send include=rules, include=about, or both as include=rules,about. Rules fill server.rules and the long description fills server.aboutHtml. Without include both are null.
Why is the contact email missing?
The public contact account is returned as an account record; the contact email is never returned. Use the account's profile URL for a public contact route.
What does access mean?
On Mastodon 4.5 and later it reports who may read the public live, hashtag and trending-link feeds without a login: public, authenticated or disabled, for local and remote feeds. It is null on older servers.
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
- Profiles by idGET /v1/mastodon/profiles/batch
- PostGET /v1/mastodon/posts
- Post contextGET /v1/mastodon/posts/context