Mastodon Posts Scraper: Hashtags, Profiles and Servers avatar

Mastodon Posts Scraper: Hashtags, Profiles and Servers

Pricing

from $1.00 / 1,000 post delivereds

Go to Apify Store
Mastodon Posts Scraper: Hashtags, Profiles and Servers

Mastodon Posts Scraper: Hashtags, Profiles and Servers

Collect public Mastodon posts by hashtag, from public profiles or from the local timeline of any server: text, links, media, counts, tags, mentions and public author details. Pay per post.

Pricing

from $1.00 / 1,000 post delivereds

Rating

0.0

(0)

Developer

nanodata

nanodata

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

9 days ago

Last modified

Categories

Features

Limited permissions

Share

Mastodon Posts Scraper

Collect public Mastodon posts by hashtag, from public profiles, or from the local timeline of a server. Each row is one post with its text, links, media, counts, hashtags, mentions and the public details of its author. You pay per post delivered.

The data comes from the public API that Mastodon servers such as mastodon.social offer for their public posts. No account, no login and no API key are needed. Only public posts are read. Direct messages, followers-only posts and private profile data are not available and are not collected.

What you get

For each post the actor returns one row with:

  • id, url, uri: the post id on the server it was read from, its web address, and its global address (the same on every server)
  • created_at, edited_at: times in UTC (edited_at is null when the post was never edited)
  • content, content_text: the post body as HTML and as plain text
  • spoiler_text, sensitive, language, visibility: content warning, sensitive flag, language code, and visibility (always public)
  • replies_count, reblogs_count, favourites_count, quotes_count: the counts shown on the post
  • tags: hashtags in the post, with their addresses
  • mentions: accounts mentioned, with acct and profile address
  • media_attachments: type, address, preview address and alt text of each image, video or audio file
  • card: the link preview (address, title, description, provider, image)
  • poll: the poll summary (options with vote counts, total votes, expiry)
  • is_reblog, reblog: for a boost, the post that was boosted
  • in_reply_to_id, in_reply_to_account_id: the post and account this one replies to
  • account_id, account_username, account_acct, account_display_name, account_url, account_avatar, account_header, account_note (profile text as plain text)
  • account_followers_count, account_following_count, account_statuses_count, account_bot, account_locked, account_group, account_created_at, account_last_status_at, account_fields (the public profile fields)
  • sourceInstance, sourceType, sourceTag, sourceAccount, scrapedAt: where the row was read from and when

A value the server does not show is null. Lists with nothing in them are empty.

Typical uses

  • Follow what people say about a topic, a product or an event
  • Count posts, boosts and likes per hashtag over time
  • Build a list of active accounts around a topic, with their public profile text and follower counts
  • Archive the public posts of a profile
  • Feed a dashboard, a spreadsheet or a language model with fresh public text

Pricing

You pay per post delivered, plus a small fee for each run.

EventNamePrice
Run start (charged once, together with the first delivered row)actor-start$0.001 per run
One post rowpost-result$0.001 per post ($1.00 per 1,000)

A run that finds nothing is not charged. If you set a maximum cost for the run, the actor stops cleanly once the next row would go over it.

New to Apify? Every account gets a $5 free monthly platform credit, enough for a first test run before you pay anything.

Input

FieldTypeDefaultDescription
hashtagslistemptyHashtags without the # sign, for example marketing or python
instanceslistmastodon.socialServers to read the hashtags from. Every hashtag is read on every server. Names only, for example fosstodon.org
accountslistemptyPublic profiles as @user@mastodon.social or a profile address such as https://mastodon.social/@user. A name without a server uses the first server in instances
includeLocalTimelineyes/nonoAlso read the public local timeline of each server
maxPostsPerSourcenumber100Maximum posts for each hashtag on each server, each profile and each local timeline. Up to 5,000
onlyOriginalyes/nonoLeave out boosts
languagelistemptyKeep only these languages, for example en or de. Posts without a language tag are left out when this is set

With no hashtag, profile or local timeline given, the actor reads the hashtag marketing on mastodon.social (40 posts) as a sample. A run can read up to 40 sources (hashtags times servers, plus profiles, plus local timelines).

Example: two hashtags, 60 posts each

{
"hashtags": ["marketing", "python"],
"instances": ["mastodon.social"],
"maxPostsPerSource": 60
}

Example: public profile and one server's local timeline

{
"accounts": ["@example_user@mastodon.example"],
"includeLocalTimeline": true,
"instances": ["fosstodon.org"],
"maxPostsPerSource": 50,
"onlyOriginal": true,
"language": ["en"]
}

How it works: the actor reads each source page by page (40 posts per page), newest first, and takes turns between sources. The same post that shows up twice (for example on two servers) is delivered once. Servers limit how often they can be asked. The actor reads the limits the server reports and waits for the window to reset before it continues.

Output sample

{
"id": "117569101702930712",
"url": "https://example.com/2026/11/06/brand-guide/",
"uri": "https://example.com/?p=339",
"created_at": "2026-11-06T10:47:31.000Z",
"edited_at": "2026-11-06T10:58:26.000Z",
"content": "<p><strong>A Brand Guide</strong></p>...",
"content_text": "A Brand Guide\n\nA strong brand starts with ...",
"spoiler_text": null,
"sensitive": false,
"language": "en",
"visibility": "public",
"replies_count": 0,
"reblogs_count": 2,
"favourites_count": 5,
"tags": [{"name": "marketing", "url": "https://mastodon.social/tags/marketing"}],
"mentions": [],
"media_attachments": [{"id": "117569140522189719", "type": "image", "url": "https://files.mastodon.social/.../original/f0b5b2365b4d8799.jpg", "preview_url": "https://files.mastodon.social/.../small/f0b5b2365b4d8799.jpg", "remote_url": null, "description": null}],
"card": {"url": "https://example.com/", "title": "Example", "description": "...", "type": "link", "provider_name": "Example", "author_name": null, "image": null},
"poll": null,
"is_reblog": false,
"reblog": null,
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"account_acct": "example_user@mastodon.example",
"account_display_name": "Example",
"account_followers_count": 2,
"account_bot": false,
"account_note": "Expert services for ...",
"account_fields": [{"name": "Powered by", "value": "WordPress", "verified_at": null}],
"sourceInstance": "mastodon.social",
"sourceType": "tag",
"sourceTag": "marketing",
"sourceAccount": null,
"scrapedAt": "2026-11-09T12:00:00Z"
}

Limitations

  • Only public posts. Posts that are unlisted, followers-only or direct are not collected, even when a server lists them.
  • Some servers hide their public posts from visitors who are not logged in. Those sources are skipped, and the run status says so.
  • A hashtag timeline on a server shows the posts that server knows about. It is not every post on the network. Read the same hashtag on several servers to widen the view.
  • Counts are the values the server reports at the time of the run. Servers differ in what they report, so some fields can be null.
  • The search function of Mastodon needs a login and is not used.

FAQ

Do I need a Mastodon account or an API key? No. The actor reads the public timelines that servers show to anyone.

Can I read private or followers-only posts? No. Only public posts are collected, and the public profile details that the server shows with them.

Which servers work? Any server that offers the public Mastodon API for its hashtag and profile timelines. Enter the server name, for example mastodon.social. Only https addresses of servers are accepted.

Why do I get fewer posts than I asked for? The hashtag or profile held fewer public posts, a language filter removed some, or the run reached the page limit for one source. The run status tells how many posts were delivered and how many were skipped by a filter.

Does it collect email addresses or messages? No. Direct messages and email addresses are not part of the public data. The profile text and profile fields appear as the author wrote them for the public.

What happens when a server asks to slow down? The actor waits for the time the server reports and then continues. If the wait would be longer than a few minutes, it stops and keeps what it has delivered.

How do I limit cost? Set maxPostsPerSource and the maximum cost for the run. The actor stops cleanly when the next row would go over the limit.

Use with AI agents (MCP)

Connect this actor to any MCP-compatible AI client, such as Claude Desktop, Cursor, VS Code, LangChain or LlamaIndex.

MCP server URL:

https://mcp.apify.com?tools=nanodata/mastodon-posts-scraper

Example prompt once connected:

"Use mastodon-posts-scraper to collect 30 recent public posts with the hashtag opensource from mastodon.social. Return results as a table."

Support

Found a problem or need a field added? Open an issue on the Issues tab. We usually reply within one business day. You can also email contact@nanoscrape.com.