Menu

How to Scrape Mastodon with Go: Profiles, Posts, Hashtags Across Servers, and Trends (2026)
📰

How to Scrape Mastodon with Go: Profiles, Posts, Hashtags Across Servers, and Trends (2026)

DEV Community: go·Viktor·about 9 hours ago
#3tz8MLeJ
#devtogo#devto#dev#silentsunday#golang
Reading 0:00
15s threshold

Scraping Mastodon is unusual in a good way: you don't need to parse HTML at all. Every Mastodon server exposes the same public REST API, and most read endpoints answer without a token. The hard part isn't getting data. It's that there is no single "Mastodon". There are thousands of servers, each with its own partial view of the network, its own rate limits, and its own settings.

In this post I'll build a small Mastodon scraper in Go, standard library only, that:

Looks up a profile on the account's home server

Pages through a user's original posts for the last N days and computes engagement

Collects a hashtag from several servers and de-duplicates the results

Reads trending hashtags per server

Writes everything to CSV

Everything below was run on October 26, 2026, and the output is real.

Before you start: read the server's rules and terms, keep request rates low, and respect people's choices.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.