Mastodon Server Activity API
Twelve weeks of posts, active users and sign-ups on one server, as a time series.
GET /v1/mastodon/servers/{host}/activity1 credit Failed requests are free
About this endpoint
GET /v1/mastodon/servers/mastodon.social/activity returns data.weeks, newest first, with up to twelve entries. Each entry has weekStart as a YYYY-MM-DD UTC date, posts, activeUsers and registrations. The first entry is the week in progress and earlier entries are complete weeks counted back from the request time.
The numbers come from the server's own weekly rollup, so they are a server-reported measure rather than a count of every account. Different software reports different windows and some servers do not report activity at all: a server that does not offer the route returns lookupStatus: unsupported with an empty list. Use the server route for current totals and this route for the trend over time.
Mastodon Server Activity API FAQ
How many weeks are returned?
Up to twelve, newest first. Each entry starts on a UTC date in weekStart and reports posts, activeUsers and registrations for that week. The first entry is the week in progress; earlier entries are complete weeks counted back from the request time.
How many credits does it 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 the activity list empty?
The server does not report weekly activity, or it does not offer the route. The response is unsupported with an empty list. It is not a missing host.
Do these numbers match the server stats?
Not necessarily. stats.users and stats.posts are current totals from the instance document, while this route reports each week's own rollup and the two can use different definitions.
What happens when a server name is correct but the server is down?
If the name resolves but the server does not answer, the response is HTTP 503 temporarily_unavailable with Retry-After, and no credits are charged. A name with no DNS record is different: it returns HTTP 200 with lookupStatus: not_found and reason.code: host_not_found. Both describe the named server, not a Social Fetch outage.
Are not_found and other 200 outcomes billed?
A completed HTTP 200 answer costs the credits shown on the endpoint, including lookupStatus: not_found, restricted, unsupported and not_compatible. A name with no DNS record is one of those 200 answers and is billed like any other. HTTP error responses (400, 401, 402, 502 and 503) are free. Check meta.creditsCharged on every response.
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