Mastodon hub

Mastodon Post API

One post with its author, attachments, poll and link card, from the server in its URL.

GET /v1/mastodon/posts

1 credit Failed requests are free

About this endpoint

GET /v1/mastodon/posts?url=https://mastodon.social/@Gargron/1 takes a public post URL and returns the post from the server in that URL, because a post id belongs to its server. On found, data.post carries id, host, url, uri, createdAt, editedAt, language, contentHtml, text, contentWarning, isSensitive, visibility, the full author, replyTo, stats, media, hashtags, mentions, emojis, card, poll and app. Boosts set isBoost and fill boostOf; quotes fill quote.state and quote.post where the server supports them.

A deleted post, a followers-only post and an id that never existed all come back lookupStatus: not_found with post null: the server does not distinguish them. The route accepts the common post URL forms, including /@user/ID, /users/user/statuses/ID, /web/@user/ID and Pleroma's /notice/ID.

Mastodon Post API FAQ

Which URL forms are accepted?

https://host/@user/ID, https://host/@user@other.host/ID, https://host/users/user/statuses/ID, https://host/web/@user/ID, https://host/web/statuses/ID and Pleroma's https://host/notice/ID. The host in the URL is the server asked.

How many credits does a post 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.

What does a boost return?

The boosting post has isBoost true and the original in boostOf. The top-level author is the account that boosted it; boostOf.author is the original author.

Why is post null?

lookupStatus not_found covers a deleted post, a followers-only or direct post that is not public, and an id that never existed. restricted means a login is required or the operator closed the route.

Does it include the reply tree?

No. This route returns one post. Use GET /v1/mastodon/posts/context with the same url for its ancestors and descendants.