Mastodon API

Retrieve public Mastodon statuses, lightweight profiles, and public timelines by account, hashtag, or instance.

Specify instance domains for timeline queries; cross-instance usernames require matching server identifiers.

Platform availability

24h health
Normal
Normal

Last 30 days

Available capabilities

Each Mastodon action, what it does, its price and its health over the last 24 hours. Open an action for its parameters, response fields and code samples.

CapabilityWhat it doesPer 1,00024-hour health
Posts by useruser_postsPull the posts of one Mastodon account, given as a handle or user@instance in username, with like, boost and reply counts, language and a flag marking boosts.$1.39 per 1,000 requestsNormal
ProfilesprofileResolve a Mastodon handle or user@instance address to one account's display name, full handle, home instance and profile link.$1.39 per 1,000 requestsNormal
HashtaghashtagBrowse the posts under a Mastodon hashtag, given without the # in hashtag, with author, text, language, media links and like, boost and reply counts.$1.39 per 1,000 requestsNormal
TrendingtrendingGet the posts trending on a Mastodon instance, mastodon.social unless instance names another, with author, text, language, media and like, boost and reply counts.$1.39 per 1,000 requestsNormal
TimelinetimelineRead the public timeline of a Mastodon instance, fosstodon.org by default, with each post's author, text, language, media links and like, boost and reply counts.$1.39 per 1,000 requestsNormal

Open a capability for its parameters, response fields, code samples and trial.

What does each Mastodon action accept?

Each answer below pairs one callable action with its real inputs. Parameter meanings and allowed values are action-specific; a familiar name does not carry the same meaning across every platform.

Official sources are linked only to clarify the platform term beside them. They do not imply platform authorization or endorsement, and they do not add official-site features to the EveryInfra API contract.

ActionRequiredOptionalDeliveryLimitPer 1,000Response fields
user_posts

Posts by user

Pull the posts of one Mastodon account, given as a handle or user@instance in username, with like, boost and reply counts, language and a flag marking boosts. Same-named accounts on other instances stay separate, and the full history is not guaranteed.

usernameinstanceSync deliveryCatalog values: defaultLimit=20, maxLimit=100. A limit can control pages or per-parent expansion for some actions, so it is not always a final row count.$1.39 per 1,000 requestsid · url · text · author_name · author_username · author_url · instance · like_count · reblog_count · comment_count · language · is_reblog · posted_at · platform · media_urls · hashtags
profile

Profiles

Resolve a Mastodon handle or user@instance address to one account's display name, full handle, home instance and profile link. A bare handle is looked up on mastodon.social unless instance is set, and a match does not prove it is the account you meant.

usernameinstanceSync delivery—$1.39 per 1,000 requestsusername · display_name · handle · instance · url · platform
hashtag

Hashtag

Browse the posts under a Mastodon hashtag, given without the # in hashtag, with author, text, language, media links and like, boost and reply counts. They come from one instance's tag timeline and leave out boosts and replies, so they do not measure the whole federated conversation.

hashtaginstanceSync deliveryCatalog values: defaultLimit=20, maxLimit=100. A limit can control pages or per-parent expansion for some actions, so it is not always a final row count.$1.39 per 1,000 requestsid · url · text · author_name · author_username · author_url · instance · like_count · reblog_count · comment_count · language · is_reblog · posted_at · platform · media_urls · hashtags
trending

Trending

Get the posts trending on a Mastodon instance, mastodon.social unless instance names another, with author, text, language, media and like, boost and reply counts. Positions and counts reflect the moment of the call; they neither explain the trending algorithm nor rank the whole fediverse.

instanceSync deliveryCatalog values: defaultLimit=20, maxLimit=100. A limit can control pages or per-parent expansion for some actions, so it is not always a final row count.$1.39 per 1,000 requestsid · url · text · author_name · author_username · author_url · instance · like_count · reblog_count · comment_count · language · is_reblog · posted_at · platform · media_urls · hashtags
timeline

Timeline

Read the public timeline of a Mastodon instance, fosstodon.org by default, with each post's author, text, language, media links and like, boost and reply counts. It is not a signed-in personal feed or an archive of everything on Mastodon.

instanceSync deliveryCatalog values: defaultLimit=20, maxLimit=100. A limit can control pages or per-parent expansion for some actions, so it is not always a final row count.$1.39 per 1,000 requestsid · url · text · author_name · author_username · author_url · instance · like_count · reblog_count · comment_count · language · is_reblog · posted_at · platform · media_urls · hashtags

What do the Mastodon user_posts parameters mean?

Pull the posts of one Mastodon account, given as a handle or user@instance in username, with like, boost and reply counts, language and a flag marking boosts. Same-named accounts on other instances stay separate, and the full history is not guaranteed.

Full API reference: parameters, code samples, response example and health →
usernameRequired
Specifies the Mastodon account handle or full user@instance format, with an optional leading @ symbol. Providing a short handle without specifying an instance defaults to mastodon.social, and identical usernames across different instances represent distinct accounts.
Mastodon WebFinger: Account Handles Require Domain Resolution — Official documentation explicitly states that @user@example.com and @user@example.org are distinct accounts, defined by both username and domain. This document clarifies account identification rules and does not imply that this gateway returns all official Account metadata. · Checked
instanceOptional
Selects a Mastodon instance domain without a scheme or path. Timeline defaults to fosstodon.org and other actions default to mastodon.social. An explicit instance takes precedence over the domain in username, so keep the two values consistent.

What do the Mastodon profile parameters mean?

Resolve a Mastodon handle or user@instance address to one account's display name, full handle, home instance and profile link. A bare handle is looked up on mastodon.social unless instance is set, and a match does not prove it is the account you meant.

Full API reference: parameters, code samples, response example and health →
usernameRequired
Specifies the Mastodon account handle or full user@instance format, with an optional leading @ symbol. Providing a short handle without specifying an instance defaults to mastodon.social, and identical usernames across different instances represent distinct accounts.
Mastodon WebFinger: Account Handles Require Domain Resolution — Official documentation explicitly states that @user@example.com and @user@example.org are distinct accounts, defined by both username and domain. This document clarifies account identification rules and does not imply that this gateway returns all official Account metadata. · Checked
instanceOptional
Selects a Mastodon instance domain without a scheme or path. Timeline defaults to fosstodon.org and other actions default to mastodon.social. An explicit instance takes precedence over the domain in username, so keep the two values consistent.

What do the Mastodon hashtag parameters mean?

Browse the posts under a Mastodon hashtag, given without the # in hashtag, with author, text, language, media links and like, boost and reply counts. They come from one instance's tag timeline and leave out boosts and replies, so they do not measure the whole federated conversation.

Full API reference: parameters, code samples, response example and health →
hashtagRequired
Specifies the topic tag without the leading # to fetch the hashtag timeline on a target instance. Excludes boosts and replies, so it does not represent a complete sample of federated network tags.
Mastodon: Hashtag Streams and Public Instance Preview Limits — Official documentation states that hashtag feeds retrieve public statuses containing a given tag, with tag paths excluding the # symbol; instance access is constrained when public previews are disabled. EveryInfra parameters for excluding Boosts/replies adhere to this page's contract rather than copying all official query keys. · Checked
instanceOptional
Selects a Mastodon instance domain without a scheme or path. Timeline defaults to fosstodon.org and other actions default to mastodon.social. An explicit instance takes precedence over the domain in username, so keep the two values consistent.

What do the Mastodon trending parameters mean?

Get the posts trending on a Mastodon instance, mastodon.social unless instance names another, with author, text, language, media and like, boost and reply counts. Positions and counts reflect the moment of the call; they neither explain the trending algorithm nor rank the whole fediverse.

Full API reference: parameters, code samples, response example and health →

What do the Mastodon timeline parameters mean?

Read the public timeline of a Mastodon instance, fosstodon.org by default, with each post's author, text, language, media links and like, boost and reply counts. It is not a signed-in personal feed or an archive of everything on Mastodon.

Full API reference: parameters, code samples, response example and health →
instanceOptional
Selects a Mastodon instance domain without a scheme or path. Timeline defaults to fosstodon.org and other actions default to mastodon.social. An explicit instance takes precedence over the domain in username, so keep the two values consistent.

How to use the Mastodon API

  1. 01Read the public catalog and choose a platform action.
  2. 02Send the platform, action, and required parameters to POST /api/v1/social.
  3. 03Handle a synchronous result, or poll the returned job ID when the action runs asynchronously.
  4. 04Store the structured response fields needed by your application.
mastodon_user_posts.sh
curl -X POST https://api.everyinfra.com/api/v1/social \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"platform":"mastodon","action":"user_posts","params":{"username":"<username>"}}'

Mastodon API questions

What can I retrieve with the Mastodon API?

Set platform to mastodon. The current catalog lists posts by user, profiles, hashtag, trending, and timeline. These action names identify different Mastodon objects or views; they are not interchangeable search modes.

Which input starts a Mastodon `user_posts` request?

Specifies the Mastodon account handle or full user@instance format, with an optional leading @ symbol. Providing a short handle without specifying an instance defaults to mastodon.social, and identical usernames across different instances represent distinct accounts. Send it as username inside params.

Which fields can Mastodon `user_posts` return?

Its declared schema includes text, author_name, author_username, and author_url. A declared field can still be absent from an individual record, and every other action has its own field list.

Does every Mastodon action return immediately?

Actions labeled asynchronous return a job ID you poll. Every other action can also run asynchronously: add "mode": "async" to the request body to receive a job ID immediately, useful for slow tasks or large limits. The current catalog contains sync delivery.