Mastodon Posts & Profiles Scraper avatar

Mastodon Posts & Profiles Scraper

Pricing

from $0.03 / 1,000 status extracteds

Go to Apify Store
Mastodon Posts & Profiles Scraper

Mastodon Posts & Profiles Scraper

Scrape public Mastodon posts, profiles, hashtags, timelines, and status details from Fediverse instances.

Pricing

from $0.03 / 1,000 status extracteds

Rating

0.0

(0)

Developer

Hanna Nosova

Hanna Nosova

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

13 days ago

Last modified

Share

Scrape public Mastodon posts, hashtags, account timelines, public timelines, and status details from Fediverse instances.

Use this Actor when you need repeatable Mastodon data for social listening, open-web research, community monitoring, news tracking, creator research, or AI analysis. Results can be downloaded as CSV, JSON, Excel, XML, RSS, or used through the Apify Dataset API.

At a glance

  • Instance-based scraping: choose a Mastodon instance such as https://mastodon.social or https://fosstodon.org.
  • Multiple scrape modes: collect hashtag timelines, public timelines, account posts, or one status.
  • Post metadata: save URLs, content, language, visibility, reply/reblog/favorite counts, tags, mentions, media attachments, and account data.
  • Monitoring controls: use sinceId, minId, and maxId for incremental collection where supported.
  • Fediverse workflow ready: export rows to alerts, dashboards, social listening systems, or AI agents.

Ready-to-run examples

Use these saved Store examples as starting points. Open any example to prefill the Actor input, then adjust URLs, keywords, limits, or filters for your own run.

What can it do?

Mastodon Posts & Profiles Scraper turns public Mastodon timelines and statuses into structured social-media rows.

  • Export Mastodon posts and status data from hashtags, public timelines, account timelines, and individual statuses.
  • Collect engagement and account context such as replies, reblogs, favorites, account fields, tags, mentions, media, cards, and visibility.
  • Monitor Fediverse conversations by scheduling hashtag or account runs and using ID-based continuation fields.
  • Research communities and topics across public Mastodon instances without a login.
  • Use it as a Mastodon data API workflow for CSV, JSON, Excel, API, or AI-agent exports.

Common workflows

  • Social listening: monitor public Mastodon hashtags and accounts for brands, events, topics, or issues.
  • News and community tracking: watch public timelines on relevant instances.
  • Creator research: collect public account posts and engagement signals.
  • Open-web research: export public Fediverse discussion data for analysis.
  • AI summaries: pass status rows into classification, sentiment, clustering, or alerting workflows.

What data can you collect?

Each dataset row represents one public Mastodon status.

FieldDescription
statusIdMastodon status ID
urlPublic status URL
uriFediverse URI
instanceBaseUrlInstance used for the request
scrapeModeMode used for the row
createdAtPublic creation timestamp
editedAtEdit timestamp when available
contentTextCleaned post text
contentHtmlPublic HTML content
languageLanguage code when returned
visibilityStatus visibility value
sensitiveWhether the status is marked sensitive
spoilerTextContent warning text when present
repliesCountReply count
reblogsCountReblog/boost count
favouritesCountFavorite count
accountPublic account object
tagsPublic hashtag objects
mentionsMentioned accounts
mediaAttachmentsPublic media attachment metadata
cardLink preview card when available
pollPoll data when available
scrapedAtTimestamp when the row was saved

Pricing

This Actor uses Apify pay-per-event pricing. The prices below come from the current Actor pricing configuration. Apify public plans map to Store discount tiers, so the table shows both the user-facing plan context and the pricing tier name. The final price shown in Apify depends on the user account plan and any custom agreement.

EventWhat is chargedPrice
startOne-time fee charged when a run starts. Covers fixed startup cost.$0.005
itemCharged for each saved status extracted.$0.000032396 on Free; $0.000028170 on Starter / Bronze; $0.000021973 on Scale / Silver; $0.000016902 on Business / Gold; $0.000011268 on Platinum; $0.000007888 on Diamond

Apify may also charge platform usage for compute, storage, proxies, or data transfer outside this Actor pricing. Check the Actor run and the Apify Pricing tab for the exact cost shown to your account.

Input configuration

SettingJSON keyUse it forExample
Instance base URLinstanceBaseUrlMastodon instance to query.https://mastodon.social
Scrape modemodeHashtag, account, public timeline, or status mode.hashtag
HashtaghashtagHashtag for hashtag mode.news
Account ID or handleaccountIdOrHandleAccount for account-post mode.Gargron@mastodon.social
Status URL or IDstatusUrlOrIdStatus for single-status mode.https://mastodon.social/@account/123
Maximum statusesmaxItemsMaximum saved status rows.50
Public timeline: local onlylocalOnly return statuses from selected instance.false
Public timeline: remote onlyremoteOnly return remote federated statuses.false
Account posts: only mediaonlyMediaKeep account statuses with media attachments only.false
Account posts: exclude repliesexcludeRepliesSkip replies in account mode.false
Account posts: exclude boostsexcludeReblogsSkip boosts/reblogs in account mode.false
Since IDsinceIdReturn statuses newer than this ID where supported.116838156372364425
Minimum IDminIdReturn statuses immediately newer than this ID.116838156372364425
Maximum IDmaxIdReturn statuses older than this ID.116838156372364425

Example input

{
"instanceBaseUrl": "https://mastodon.social",
"mode": "hashtag",
"hashtag": "news",
"maxItems": 50,
"local": false,
"excludeReplies": false,
"excludeReblogs": false
}

Example output

{
"statusId": "116838156372364425",
"url": "https://example.social/@account/116838156372364425",
"instanceBaseUrl": "https://mastodon.social",
"scrapeMode": "hashtag",
"createdAt": "2026-06-30T08:00:00.000Z",
"contentText": "Example public Mastodon post text",
"language": "en",
"visibility": "public",
"repliesCount": 2,
"reblogsCount": 4,
"favouritesCount": 10,
"account": {
"acct": "account@example.social",
"displayName": "Example Account",
"url": "https://example.social/@account"
},
"tags": [],
"mentions": [],
"mediaAttachments": []
}

Tips for best results

  • Choose the right instance: Mastodon data is instance-based, so the same account or hashtag may differ by instance.
  • Use hashtag mode for monitoring: it is the easiest recurring social-listening setup.
  • Use account mode for creator research: combine excludeReplies and excludeReblogs for original posts.
  • Use ID cursors for incremental runs: store statusId values when you need continuation.
  • Keep first runs small: test maxItems=20 before scaling a new instance or mode.

Limits and caveats

  • The Actor extracts publicly visible Mastodon data only.
  • It does not access private, followers-only, deleted, or login-gated content.
  • Availability and fields vary by Fediverse instance and Mastodon-compatible server version.
  • Some instances require a login for filtered public timelines such as local or remote; the Actor reports that restriction as a clear failed run rather than returning misleading empty data.
  • Engagement counts can change after scraping.

API usage

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/mastodon-posts-profiles-scraper').call({
instanceBaseUrl: 'https://mastodon.social', mode: 'hashtag', hashtag: 'news', maxItems: 50,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('fetch_cat/mastodon-posts-profiles-scraper').call(run_input={
'instanceBaseUrl': 'https://mastodon.social', 'mode': 'hashtag', 'hashtag': 'news', 'maxItems': 50,
})
print(list(client.dataset(run['defaultDatasetId']).iterate_items()))

cURL

curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~mastodon-posts-profiles-scraper/runs?token=YOUR_APIFY_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"instanceBaseUrl":"https://mastodon.social","mode":"hashtag","hashtag":"news","maxItems":50}'

MCP and AI agents

This Actor can be used through the official Apify MCP server at https://mcp.apify.com.

For a focused single-Actor tool setup, use:

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

Use the same JSON keys shown in the input configuration table, such as instanceBaseUrl, mode, hashtag, accountIdOrHandle, statusUrlOrId, maxItems, and sinceId.

For Claude Desktop or another MCP client, add this server configuration and replace the token value:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=fetch_cat/mastodon-posts-profiles-scraper",
"headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
}
}
}

For Claude Code, set APIFY_TOKEN in your shell and run:

$claude mcp add --transport http apify 'https://mcp.apify.com?tools=fetch_cat/mastodon-posts-profiles-scraper' --header "Authorization: Bearer $APIFY_TOKEN"

Example prompt: “Collect the latest 25 public opensource posts from mastodon.social and return the post URL, account, timestamp, text, and engagement counts.”

FAQ

Can this scrape any Mastodon instance?

It works with public Mastodon-compatible instances that expose the needed public endpoints.

Can it collect private or followers-only posts?

No. It only collects public data.

Can I export to CSV or Excel?

Yes. Apify datasets can be downloaded as CSV, JSON, Excel, XML, RSS, HTML, or accessed through the API.

Support

If a run fails, returns no data, or a field looks wrong, open an issue from the Actor page.

Please include the Apify run ID or run URL, input JSON, one example public URL, query, or input item, what you expected, and what the dataset returned. Small reproducible inputs make parsing or site-layout issues much faster to fix.

Privacy and data handling

This Actor runs with Apify limited permissions and only processes data needed for the documented run. It uses content lookup inputs and public posts, profiles, videos, comments, or channel metadata needed for the requested output to produce the output dataset and sends requests to public Mastodon Posts Profiles pages/endpoints; results are stored in Apify run storage for your account. FetchCat does not use your inputs or outputs for advertising, does not use them for model training, and does not retain them outside the Apify run except for transient support debugging when you explicitly share run details. You are responsible for using the Actor lawfully, respecting the target site's terms, and avoiding unnecessary personal or sensitive data in inputs.