Mastodon hub

Mastodon Hashtag Timeline API

Posts with one hashtag on one server, filtered by scope, media and the other tags they carry.

GET /v1/mastodon/timelines/hashtags/{tag}

1 credit Failed requests are free

About this endpoint

GET /v1/mastodon/timelines/hashtags/photography?host=mastodon.social returns data.posts for the tag, newest first. scope=all (the default) is everything the server has seen, local keeps its own accounts and remote keeps accounts from other servers. mediaOnly=true keeps posts with an attachment. any, all and none take up to four comma-separated tags: match any, require all, or exclude.

A post reaches a server through its users' follows, so the same tag gives different posts on different servers. data.tag repeats the tag, and data.declaredAccess is filled when the operator closed the feed, with the local and remote settings (public, authenticated or disabled). Follow page.nextCursor while page.hasMore is true; limit accepts 1 to 40 and defaults to 20.

Mastodon Hashtag Timeline API FAQ

Why does the same hashtag differ between servers?

A server only holds posts its users have seen through follows and boosts. Two servers can return different posts for one tag, so pick the server whose community you care about.

How many credits does a page 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. Each paginated page is a separate billed request.

How do any, all and none work?

Send comma-separated tags. any keeps a post with at least one of them, all requires every one, and none excludes a post with any. Each list accepts up to four tags, and they can be combined.

Why is the timeline restricted?

The operator closed hashtag timelines to the public. reason.code says whether a login is required or the operator disabled it, and declaredAccess shows the setting for local and remote feeds.

Can I page through old posts?

Pass page.nextCursor from the previous response while page.hasMore is true. limit accepts 1 to 40; each page is a separate billed request.