List Mastodon server profile directory
List the accounts a Mastodon server shows in its directory.
Headers
Get your API keyAPI key (`sfk_...`)
The Mastodon server to ask, e.g. `mastodon.social`. A server URL is also accepted. The server you name is the one that answers.
`active` (default) most recently active first, `new` newest first.
one of: active, new
`all` (default) or `local` for the server's own accounts only.
one of: all, local
Pass `page.nextCursor` from the previous response (a plain number is taken as an offset). The list is ordered live, so a row can appear on two pages; remove repeats by `id`, `name` or `url`.
min 1 chars · max 512 chars
Items to skip, as an offset. Prefer `cursor` for the next page. Default: 0.
≥ 0 · ≤ 100000
Items per page, 1 to 80. Default: 40.
≥ 1 · ≤ 80
Endpoint-specific response payload.
`found`, `not_found`, `restricted` (login required or closed), `unsupported` (this server does not offer it) or `not_compatible` (the host is not a Mastodon-compatible server). See `reason`.
one of: found, not_found, restricted, unsupported, not_compatible
The server that was asked.
Only on a `not_compatible` result (and always on the server endpoint): the software the host runs, from its NodeInfo, e.g. `misskey` or `lemmy`; null when it does not say. Absent otherwise.
Why `lookupStatus` is not `found`, or null when it is `found`.
Machine-readable reason.
one of: login_required, closed_by_operator, hidden_by_owner, suspended, not_implemented, disabled_by_operator, not_a_mastodon_server, unsupported_server_software, host_not_found, post_not_visible
Plain-language explanation.
Accounts in the directory, in the requested order.
Account id on `host`.
The server this record came from.
`user@host`, with the account's home server.
Username without the host.
Profile page.
ActivityPub id, when the server shows it.
Display name.
Bio as sanitised HTML.
Bio as plain text.
An avatar or header image.
Image URL on the server or its media store.
Still frame of an animated image.
Alt text.
An avatar or header image.
Image URL on the server or its media store.
Still frame of an animated image.
Alt text.
Account creation, rounded to midnight UTC by the server.
Date of the latest post (a date, not a time).
The server's own counters.
Accounts following this account.
Accounts this account follows.
Posts by this account.
True when the account is marked as a bot.
True when the account is a group.
Follow requests need approval. Public posts are still public.
The server's moderators limited (silenced) the account.
True when the server suspended the account.
The owner's opt-in to the profile directory and recommendations. null on servers that do not report it.
The owner's opt-in to search engines indexing public posts. null when not reported.
The owner asks search engines to skip the profile. null when not reported.
The owner hides the follower and following lists. null when not reported.
The account this one moved to.
Account id on the server that returned it.
`user@host` of the account this one moved to.
Profile page of the new account.
Display name of the new account.
Profile metadata fields, in the owner's order.
Label.
Value as sanitised HTML.
Value as plain text.
When a link in the value was verified with rel=me.
Custom emojis used in the display name or bio.
Shortcode without colons.
Emoji image.
Still frame.
Public badges such as Owner or Moderator.
Role id on `host`.
Role name, such as Owner or Moderator.
Badge colour as a hex value, when set.
Pagination state for the current page.
Whether another page is available.
The way to the next page: pass it as `cursor`; null on the last page.
Offset to pass as `offset`; null on the last page. Prefer `nextCursor`.
Metadata describing the request and billing outcome.
Unique request identifier for tracing this API call.
min 1 chars
Credits charged for this request.
≥ 0
Public API version that served the response.
one of: v1
Code example
curl "https://api.socialfetch.dev/v1/mastodon/directory?host=mastodon.social" \
-H "x-api-key: YOUR_API_KEY"Responses
Accounts in the server's profile directory.