Mastodon Scraper: Posts, Hashtags, Profiles, Trends
Pricing
from $0.28 / 1,000 posts
Mastodon Scraper: Posts, Hashtags, Profiles, Trends
Scrape public Mastodon posts from hashtags, accounts, timelines, trends and post links on any instance, no login. Text, counts, media, tags, mentions, polls, cards, plus profiles and hashtag stats. Date, language and keyword filters.
Pricing
from $0.28 / 1,000 posts
Rating
0.0
(0)
Developer
ZH Tech
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Features
Share
Mastodon Scraper: posts, hashtags, profiles and trends from any instance
Scrape public Mastodon posts from hashtags, accounts, single post links and threads, local and federated timelines and trending posts, plus profile rows (followers, following, post count, bio, verified links) and hashtag stats (uses per day for the last week). Works on mastodon.social, fosstodon.org, hachyderm.io and any other Mastodon server, several at once, with duplicates removed.
No login, no access token, no app registration. The actor reads the official public Mastodon REST API that every server offers to logged out visitors, checks each server's robots.txt and timeline settings first, and tells you clearly when a server keeps something for logged in users only. The default run takes about 3 seconds and you only pay for rows you get.
What can this Mastodon scraper do?
| You give it | You get |
|---|---|
Hashtags (opensource, #rust, rust@fosstodon.org, a tag link) | Posts with the hashtag, newest first, from every instance you list, deduplicated, plus one hashtag stats row per tag and instance |
Accounts (@Mastodon@mastodon.social, a profile link, a plain username) | One profile row and the account's posts, read on the account's own home server so the full public history is available |
| Post links | The post, and optionally the whole thread (parent posts and public replies) |
| Timelines: local, federated, trending | The instance's public feeds where the server allows logged out access |
| Trending hashtags | Hashtag rows with rank and uses per day |
| Search terms | Matching accounts (profile rows) or hashtags (hashtag rows) |
Fields on every post row: id, url, uri, createdAt, editedAt, language, visibility, sensitive, spoilerText, text (plain text with line breaks and full URLs), contentHtml, repliesCount, reblogsCount (boosts), favouritesCount, quotesCount, isReply, inReplyToId, isBoost, boostedBy, boostedAt, authorAcct, authorDisplayName, authorUrl, authorAvatar, authorFollowersCount, authorFollowingCount, authorStatusesCount, authorCreatedAt, authorBot, mediaCount, mediaTypes, imageUrls, videoUrls, media (type, URL, preview, alt text, size, duration), hashtags, mentions, links, emojis, poll, card (link preview), quote, application, source, instance, matchedKeywords, scrapedAt.
Why this actor
- Knows which servers allow what. Mastodon admins decide whether hashtag and live feeds are public. mastodon.social shows hashtags but not the local timeline to logged out visitors, fosstodon.org shows both, mstdn.social shows neither. The actor reads each server's settings and turns a refusal into a clear
AUTH_REQUIREDrow with a suggestion, instead of an empty run. Error rows are free. - Accounts read at home.
@user@fosstodon.orgis read on fosstodon.org, not through another server that only knows the posts it happened to receive. Custom domains are resolved with WebFinger. If a home server cannot be read, the actor falls back to the copy on your first instance and says so in the log. - Rich, clean rows. HTML and plain text side by side, content warnings, alt text for every image, polls with votes, link cards, quotes, edit time, boosts unwrapped to the original post with
boostedBy, full handles (user@server) everywhere. - Several instances in one run. List mastodon.social and fosstodon.org and a hashtag is read on both; posts that federated to both are saved and charged once.
- Filters that save money. Dates (also relative, such as
24 hours), languages, keywords and exclude keywords (checked in text, content warnings, alt text, link cards and polls), no replies, no boosts, media only. Skipped posts are not charged. A newest date jumps straight to that day instead of paging through newer posts. - Fediverse friendly. Honest user agent, robots.txt checked for every server, about 2 requests per second per server (far below the 300 requests per 5 minutes Mastodon allows), and accounts that opted out of indexing (
noindex,#nobot,#noindex) are skipped by default and never charged. - Fair billing. Error rows, filtered posts, opted out accounts and duplicates are free. Invalid input stops the run before the start fee.
Use cases
- Social listening and brand monitoring: follow a hashtag or your brand's accounts across several servers every day.
- Community and developer relations: see what open source, security or science communities on fosstodon.org, infosec.exchange or scholar.social are talking about.
- Research: collect public posts on a topic with dates, languages, boosts and reply threads for discourse or sentiment analysis (follow each server's rules and the authors' rights).
- Trend tracking: daily trending hashtags and posts per instance, with uses per day.
- Influencer and account research: compare accounts by followers, posting activity and engagement, export verified links from profile fields.
- Alerts: schedule a run every hour with Oldest post date
1 hourand a keyword list, and send new matches to Slack, email or a webhook.
How to use
- Add Hashtags, Accounts, Post URLs or pick Timelines.
- Set Instances for hashtags and timelines (mastodon.social by default; add fosstodon.org for wider coverage).
- Set Max posts per source (newest first) and optionally an Oldest post date such as
7 days. - Optionally add Keywords, Languages or turn off replies or boosts.
- Click Start. Results appear in the Posts, Profiles, Hashtags and Errors tabs and can be exported as JSON, CSV, Excel or XML.
Input examples
The prefilled example (also used when the input is empty): 20 posts with #opensource, 20 posts and the profile of the official Mastodon account, and the hashtag stats row.
{"hashtags": ["opensource"],"accounts": ["@Mastodon@mastodon.social"],"maxPostsPerSource": 20}
A hashtag on two servers, English only, last 7 days:
{"instances": ["mastodon.social", "fosstodon.org"],"hashtags": ["rust"],"languages": ["en"],"oldestDate": "7 days","maxPostsPerSource": 500}
Local, federated and trending timelines plus trending hashtags of one server:
{"instances": ["fosstodon.org"],"timelines": ["local", "federated", "trending"],"trendingTags": true,"maxPostsPerSource": 40}
One post with its whole conversation:
{"postUrls": ["https://mastodon.social/@Mastodon/117466985005297414"],"includeThread": true,"maxPostsPerSource": 100}
An account's own posts in October 2026, without replies and boosts:
{"accounts": ["https://mastodon.social/@MastodonEngineering"],"oldestDate": "2026-10-01","newestDate": "2026-10-31","includeReplies": false,"includeBoosts": false,"maxPostsPerSource": 1000}
Find accounts about a topic:
{"searchQueries": ["python"],"searchType": "accounts","maxPostsPerSource": 40}
Output examples
A post row (HTML shortened):
{"type": "post","source": "account","input": "@Mastodon@mastodon.social","instance": "mastodon.social","id": "117625790631441803","url": "https://mastodon.social/@Mastodon/117625790631441803","createdAt": "2026-11-16T11:05:27.567Z","editedAt": null,"language": "en","visibility": "public","sensitive": false,"spoilerText": "","text": "Update on #Plushtodon pre-orders: The plushies are going through German customs on the way to our warehouse ...\n\nhttps://shop.joinmastodon.org/products/pre-order-mastodon-plushie-20cm-plushtodon","contentHtml": "<p>Update on <a href=\"https://mastodon.social/tags/Plushtodon\" ...","repliesCount": 5,"reblogsCount": 68,"favouritesCount": 134,"quotesCount": 0,"isReply": false,"isBoost": false,"boostedBy": null,"authorAcct": "Mastodon@mastodon.social","authorDisplayName": "Mastodon","authorUrl": "https://mastodon.social/@Mastodon","authorFollowersCount": 878789,"authorStatusesCount": 568,"mediaCount": 0,"imageUrls": [],"videoUrls": [],"media": [],"hashtags": ["plushtodon"],"mentions": [],"links": ["https://shop.joinmastodon.org/products/pre-order-mastodon-plushie-20cm-plushtodon"],"poll": null,"card": {"url": "https://shop.joinmastodon.org/products/pre-order-mastodon-plushie-20cm-plushtodon","title": "PRE-ORDER Mastodon plushie 20cm ...","type": "link","image": "https://files.mastodon.social/cache/preview_cards/images/209/240/375/original/ff24843e2838e595.jpg"},"quote": null,"application": "Web","scrapedAt": "2026-11-22T01:55:35.312Z"}
A profile row (shortened):
{"type": "profile","source": "account","instance": "mastodon.social","acct": "Mastodon@mastodon.social","displayName": "Mastodon","url": "https://mastodon.social/@Mastodon","bio": "Our mission is to connect the world through thriving online communities. ...","followersCount": 878789,"followingCount": 51,"statusesCount": 568,"lastStatusAt": "2026-11-16","createdAt": "2016-11-23T00:00:00.000Z","bot": false,"fields": [{ "name": "Homepage", "value": "https://joinmastodon.org", "url": "https://joinmastodon.org", "verifiedAt": "2018-10-31T04:11:00.076+00:00" }],"verifiedLinks": ["https://joinmastodon.org"],"avatar": "https://files.mastodon.social/accounts/avatars/000/013/179/original/b4ceb19c9c54ec7e.png"}
A hashtag row:
{"type": "hashtag","source": "hashtag","instance": "mastodon.social","name": "opensource","url": "https://mastodon.social/tags/opensource","usesToday": 16,"accountsToday": 12,"uses7d": 2921,"accounts7dSum": 1466,"history": [{ "day": "2026-11-22", "uses": 16, "accounts": 12 }, { "day": "2026-11-21", "uses": 372, "accounts": 188 }]}
An error row (never charged):
{"type": "error","source": "hashtag","input": "opensource@mstdn.social","errorCode": "AUTH_REQUIRED","error": "mstdn.social only shows hashtag timelines to logged in users (instance setting: authenticated). This actor does not log in. Try the same hashtag on mastodon.social or fosstodon.org, which allow it.","instance": "mstdn.social"}
Error codes: AUTH_REQUIRED (the server keeps this feed for logged in users), NOT_FOUND, GONE (deleted or suspended), OPTED_OUT (the account asked not to be indexed), NOT_MASTODON (the server does not speak the Mastodon API), ROBOTS_DISALLOWED, RATE_LIMITED, INVALID_INPUT, FAILED.
A RUN_SUMMARY record in the key value store lists every source with posts saved, posts skipped, pages read and why it stopped, plus each instance's version and timeline access settings.
Field notes
- text is the post converted to plain text: paragraphs become blank lines, line breaks are kept, links keep their full URL, hashtags and mentions stay readable (
#rust,@Mastodon). The original HTML is incontentHtml. - Boosts in account timelines are saved as the original post (author, text and counts of the original) with
isBoost: true,boostedByandboostedAt. Turn off Include boosts to skip them. - Counts (replies, boosts, favourites) are the numbers the answering server knows. For posts from other servers they can be lower than on the author's home server, which is one reason accounts are read at home.
- Handles are always complete (
user@server), also for users local to the server that answered. - Only public and unlisted posts are returned; Mastodon never shows followers only or direct posts to logged out visitors.
- Hashtag stats:
usesToday,uses7dandhistoryare the server's own counts of posts and accounts per day.
Pricing
Pay per event, you only pay for what is delivered:
- Actor start: a small flat fee once per run.
- Post: per post row.
- Profile: per profile row.
- Hashtag: per hashtag row (stats, trending or search).
The current prices are on the Pricing tab. Never charged: error rows, posts skipped by your filters, opted out accounts, duplicates across sources and instances, and anything after your max total charge or Max results is reached. Input without any valid source stops the run before the start fee.
Typical runs: the prefilled example is 1 start, 40 posts, 1 profile and 1 hashtag row. A daily hashtag monitor on two servers with 100 new posts a day is about 3,000 posts a month.
Use with the API, integrations and AI agents
- API:
POST https://api.apify.com/v2/acts/zhtech~mastodon-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKENwith the JSON input as the body returns the rows in one call. Add&view=posts(orprofiles,hashtags,errors) for one row type. - Clients:
apify-clientfor JavaScript and Python. Example (JavaScript):await client.actor('zhtech/mastodon-scraper').call({ hashtags: ['rust'], instances: ['fosstodon.org'], oldestDate: '24 hours' }). - Schedules and integrations: run it hourly or daily with Oldest post date and connect Google Sheets, Slack, a webhook, Zapier, Make or n8n.
- AI agents and MCP: the actor works as a tool through the Apify MCP server (mcp.apify.com), so assistants such as Claude, ChatGPT or Cursor can look up what a community is saying about a topic or summarize an account's latest posts on demand. Set a max total charge to cap the cost. Note that some servers, including mastodon.social and mastodon.online, forbid using their content for training AI models; respect that.
FAQ
Do I need a Mastodon account or an access token? No. The actor only calls API endpoints that Mastodon serves to logged out visitors. It never logs in and never sends a token.
Which servers work? Any Mastodon server, and many compatible ones for accounts and posts. What is available depends on each admin's settings: on 2026-11-21, mastodon.social and mastodon.online allowed hashtag feeds and trends but not live timelines, fosstodon.org allowed everything, infosec.exchange allowed only its local timeline, and mstdn.social kept all feeds for logged in users (accounts and posts still work there). The actor checks this on every run and reports it in the error row and the run summary.
Why did I get AUTH_REQUIRED? The server's admin decided that this feed (hashtags, local or federated timeline, trends) is only for logged in users or switched it off. This actor does not log in. Read the same hashtag on another server; mastodon.social and fosstodon.org are good choices because hashtag posts federate widely. The row is free.
Can I search posts by keyword? Mastodon only allows full text search of posts for logged in users, on every server. Use a hashtag or an account as the source and add Keywords: the actor keeps only posts that contain your words and charges only those. Search accounts or hashtags finds profiles and hashtags by name.
Why are some accounts skipped with OPTED_OUT?
Their owners asked search engines not to index them (Mastodon's noindex setting) or wrote #nobot or #noindex in their bio, a common fediverse request to automated tools. The actor respects that by default and does not charge for them. Turn off Respect account opt outs only if you have the owner's permission.
How far back can it go? For accounts, the whole public history on the home server. For hashtags and timelines, as far back as the server has posts. Use Oldest post date or Max posts per source to stop earlier. Max pages per source (50 pages of up to 40 posts by default) caps reading when strict filters skip most posts.
Are boosts, replies and threads included?
Yes. Boosts are saved as the original post with boostedBy. Replies are included unless you turn them off. For a post URL, Add the whole thread saves the parent posts and the public replies.
Do I need a proxy? No. The Mastodon API is public and the actor stays far under the rate limit. If a server ever blocks your runs, turn on Apify datacenter proxy. Residential proxy is not supported and is switched to datacenter automatically.
Is it legal to scrape Mastodon? The actor reads only data that servers publish to anyone without login, through their documented API, at a polite rate, after checking robots.txt, and it skips accounts that opted out. Posts belong to their authors. You are responsible for how you use the data, for following each server's rules and privacy laws such as the GDPR, and for not using it for spam, harassment or AI training where a server forbids it.
Limitations
- No login only content: followers only posts, direct messages, follower lists, notifications and full text post search are not available.
- Server settings decide which feeds are public; the actor reports refusals but cannot work around them.
- Account search and hashtag search return at most 40 results per term and server, because logged out visitors get one page of results.
- Counts are those of the server that answered and can differ slightly between servers.
- Media files are not downloaded; you get their URLs and alt text.
- Non Mastodon fediverse software (Pleroma, Akkoma, GoToSocial, Misskey, Lemmy) is supported only as far as it implements the Mastodon API.
Support
Found a wrong field, a server that misbehaves, or need another data point? Open an issue on the Issues tab with the input you used and it will be looked at quickly.