Mastodon Posts & Profiles Scraper avatar

Mastodon Posts & Profiles Scraper

Pricing

from $0.02 / 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.02 / 1,000 status extracteds

Rating

0.0

(0)

Developer

Fetch Cat

Fetch Cat

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

13 days ago

Last modified

Security

Limited permissions

Share

Export public Mastodon posts from a hashtag, account, public timeline, or individual status into structured data. Each row includes post text, engagement counts, media metadata and an embedded author profile for social listening, community research and analysis.

Choose an instance that exposes public timelines. Coverage is limited to what that instance makes available without login. This is not a search of the entire Fediverse.

Quick start

  1. Open the input form and choose your Mastodon instance.
  2. Select a mode and supply its hashtag, account, or status when needed.
  3. Start with a small limit, run the Actor, and download the dataset as JSON, CSV or Excel.
{
"instanceBaseUrl": "https://mastodon.social",
"mode": "hashtag",
"hashtag": "news",
"maxItems": 20
}

Prefer a video guide? This short Apify walkthrough shows you how to set up and run an Actor. It uses a different Actor, but the setup steps are the same.

Ready-to-run examples

Choose a public example to see its settings before starting a run:

What you get

  • Hashtag conversations: collect public posts for a topic on the chosen instance.
  • Account posts: research a public account, optionally excluding replies or boosts or selecting media posts.
  • Public timelines: inspect local or federated activity known to an instance.
  • One status: retrieve a local status ID or a same-instance status URL.

Use the resulting dataset for community research, social listening, news analysis or AI summaries. Profiles are embedded in status rows. This Actor does not return standalone profile records or full-text search results.

Who is it for?

  • Community researchers reviewing public conversations visible to a chosen Mastodon instance.
  • News analysts gathering source-linked hashtag posts with author context.
  • Social-listening teams following selected public account or timeline samples.
  • Data developers importing structured statuses and embedded public author profiles.

How you can use the data

  • Review a news hashtag sample. Use the existing mastodon.social instance and news hashtag with a twenty-status cap. Keep contentText, status URL, createdAt and embedded author attribution, including content warnings where exposed.
  • Separate collection context from network-wide claims. Local or federated timeline mode reflects what the selected server knows. Keep instanceBaseUrl and scrapeMode with each row rather than presenting the export as the whole Fediverse.
  • Use the account mode's specific controls. For a public account you supply, optionally exclude replies or boosts or select media posts. These controls apply to account posts, not hashtag or public timeline collection. Profiles remain embedded in status rows rather than separate records.
  • Build your own incremental research set. Retain status IDs and use the supported ID cursors for later timeline runs, joining your own exports. For recorded unfinished work, prepare a new continuation input yourself. The Actor does not automatically resume or maintain historical comparisons.

Input settings

SettingJSON keyPurpose
Instance base URLinstanceBaseUrlPublic instance. Defaults to https://mastodon.social.
Scrape modemodehashtag (default), accountStatuses, publicTimeline, or statusByUrlOrId.
HashtaghashtagRequired for hashtag mode.
Account ID or handleaccountIdOrHandleRequired for account-post mode.
Status URL or IDstatusUrlOrIdRequired for single-status mode.
Maximum statusesmaxItemsSaved-row limit, 1–5000. Default 20.
Local / remote timelinelocal, remotePublic timeline filters. Do not enable both.
Account filtersonlyMedia, excludeReplies, excludeReblogsFilters for account posts only.
ID cursorssinceId, minId, maxIdIncremental collection in timeline modes.

See input-field help for each mode's requirements and filter limitations. Requests use direct public access. There is no proxy control or login input.

Example inputs

Use the Quick start input as a small first run. Adjust the fields described above for your own data.

Output data

Each row represents one saved status. Boosts contain the original status data, and repeated status IDs are skipped within a run. Fields unavailable from the instance are null or empty collections, not inferred values.

Shape-only example (illustrative, not a collected post):

{
"statusId": "123456789",
"url": "https://example.social/@example/123456789",
"instanceBaseUrl": "https://example.social",
"scrapeMode": "hashtag",
"contentText": "Illustrative public post",
"language": "en",
"repliesCount": 0,
"reblogsCount": 0,
"favouritesCount": 0,
"account": { "acct": "example", "displayName": "Example account" },
"tags": [],
"mediaAttachments": []
}
FieldsContents
statusId, url, uriStatus identity and public destinations.
instanceBaseUrl, scrapeMode, scrapedAtCollection context.
createdAt, editedAtSource timestamps when available.
contentText, contentHtml, spoilerTextText, original formatted content and content warning.
language, visibility, sensitiveSource language and visibility labels.
repliesCount, reblogsCount, favouritesCount, bookmarksCountAvailable engagement counts. Bookmark counts are often absent.
accountPublic author ID, handle, display name, biography, images, counts and custom fields.
inReplyToId, inReplyToAccountId, reblogStatusIdReply and boost context when present.
tags, mentions, mediaAttachments, emojisSource collections. Attachment metadata, not downloaded media.
poll, card, rawAvailable poll/link preview data and the source status object.

A completed run can also provide RUN_SUMMARY with saved-row counts and warnings. When the run records unfinished collection, PENDING_WORK contains continuation information. Resuming requires a new input, not automatic continuation.

Download your results

Open your run's dataset, choose Export and select JSON, CSV or Excel. JSON keeps nested fields together. CSV and Excel are useful when you want to review the records in a spreadsheet.

See Apify's download and export guide for the available formats and field options.

Pricing

The start event is charged once after valid input is accepted, including a valid empty run. The item event applies to each saved status, and there are no separate paid error rows.

Keep the saved-status cap small for initial work. See the Pricing tab for current rates and discounts, and run details for applicable platform usage. A result cap is not a guaranteed total cost.

Tips for best results

  • Choose the instance deliberately. Its public access policies and known remote activity determine coverage.
  • Use the correct mode for account filters. Reply, boost and media controls do not filter hashtag or public timelines.
  • Keep source status IDs for later collection. Supported ID cursors help your own incremental timeline workflow.
  • Retain content warnings and source links. They provide context for interpreting collected post text.
  • Inspect warnings and final status. Restrictions, exhausted history and later failures can leave a useful but incomplete sample.

Limits and caveats

Only content the chosen instance exposes publicly without login is available. There is no login input or proxy control. Private, missing or restricted posts cannot be retrieved. A federated timeline is activity known to that server rather than a search of the entire Fediverse, and no authenticated full-text search or standalone profile records are provided.

The four modes have separate required targets and filter rules. Local and remote filters must not both be enabled, and account media/reply/boost filters apply only to account posts. One-status mode returns at most one row and accepts a local ID or same-instance status URL. Instance policies, available history and filters can reduce output. Source order is retained without custom sorting or guaranteed full history.

Boost rows contain original status data and repeated status IDs are skipped within a run. Missing fields remain null or empty, bookmark counts are often absent, and engagement and profile data can change. Media fields are attachment metadata rather than downloaded files.

A completed timeline with no matches can succeed empty with a summary warning. This does not prove privacy or deletion. An access restriction may instead fail the run, and saved rows can remain if later requests fail. Inspect final status and available RUN_SUMMARY counts and warnings before treating a dataset as complete.

When unfinished collection is recorded, PENDING_WORK contains continuation information. Resuming requires a new input rather than automatic continuation. Persist IDs and perform repeat-export joins or historical analysis in your own destination.

Automation and integrations

Save your settings for next time

Once you have an input that works for you, save it as an Apify task. This keeps your settings together so you can use them again without filling in the form from scratch.

Run on a schedule

Need fresh results regularly? You can schedule the Actor or a saved task to run at a time that suits you.

Each scheduled run collects the data again. If you want to compare results or highlight changes, add that step in your own workflow.

Send results to your other tools

Use n8n, Make or Zapier to connect this scraper to the rest of your workflow. For example, you could pass its results to an AI assistant or add records to a spreadsheet. Follow the Apify integration guides for your chosen tool.

For a custom connection, an Apify webhook can notify your app when a run finishes or fails. Your app can then fetch the results or handle the failure.

API usage

Want to collect this data from your own app or automation? The examples below send input to the scraper and show how to collect its results.

The Node.js and Python examples wait for the run to finish before reading its results. The cURL example starts the run and returns its details. Wait for that run to finish, then use its defaultDatasetId to fetch the results.

For setup instructions, see Apify's JavaScript client guide, Python client guide and Actor runs API reference.

cURL

curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~mastodon-posts-profiles-scraper/runs' \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H 'Content-Type: application/json' \
--data @- <<'JSON'
{
"instanceBaseUrl": "https://mastodon.social",
"mode": "hashtag",
"hashtag": "news",
"maxItems": 20
}
JSON

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": 20
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

import os
from apify_client import ApifyClient
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('fetch_cat/mastodon-posts-profiles-scraper').call(run_input={'instanceBaseUrl': 'https://mastodon.social', 'mode': 'hashtag', 'hashtag': 'news', 'maxItems': 20})
print(client.dataset(run['defaultDatasetId']).list_items().items)

API and AI-agent usage notes

The cURL request starts an asynchronous run. Wait for success, then retrieve items from its defaultDatasetId using the Dataset API.

MCP and AI agents

You can ask your AI assistant to collect data with Mastodon Posts & Profiles Scraper and help you work with the results. The scraper returns the data, and your assistant can then summarize it, compare records or prepare notes.

Connect your assistant through the Apify MCP server. MCP gives your assistant a way to find this scraper, run it and read the results. Follow the official setup and sign-in guide for your app.

Easier setup with an Apify plugin

If you use a supported coding assistant, the official Apify plugin can set up the connection for you. It connects your assistant to Apify and includes instructions for common tasks. Follow the guide for your particular app.

Use Apify AI in Console

Prefer to keep everything in Apify? Open Apify AI in Console and ask it to find Fetch Cat's Mastodon Posts & Profiles Scraper. You can describe the data you want and ask questions about the results.

Apify AI is currently in beta. It asks for confirmation before starting an Actor, and normal run charges apply.

Choose your assistant

Connect just this scraper

To keep your setup focused on this scraper, add this server configuration to a compatible MCP client:

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

Sign in to Apify when your client asks. If your client uses a Bearer token instead, follow its setup guide and keep the token in its secure configuration. Configuration formats vary by app, so use the linked guide if your client needs a different format.

Use Apify's general server

Already connected to the general Apify MCP server at https://mcp.apify.com? You can use it to find this scraper without adding another server. Ask your assistant to use Mastodon Posts & Profiles Scraper by Fetch Cat, or give it the identifier fetch_cat/mastodon-posts-profiles-scraper.

Your assistant can check the available settings and retrieve the results from the returned run. If the run is still working, it should follow that run rather than start it again. Both connection options use Apify's hosted service.

Example requests

  • “Use Fetch Cat’s Mastodon Posts and Profiles Scraper to collect up to 5 news hashtag posts from https://mastodon.social. Keep source links, text, content warnings and embedded author attribution without claiming whole-Fediverse coverage.”
  • “Collect up to 5 posts from the local public timeline of https://mastodon.social with remote-only filtering off. Keep status IDs, collection context and available engagement counts, and report any instance restriction.”
  • “Retrieve up to 5 news hashtag statuses from https://mastodon.social for my own incremental research set. Retain status IDs and source dates, and inspect any pending-work record without starting an automatic continuation.”

Normal Apify charges apply. Check the live Pricing tab before asking your assistant to run a larger batch.

Pay with x402

If your AI agent has a funded wallet, it can pay for Apify usage through x402. This experimental option lets an agent use Apify without a conventional account.

Apify AGI provides a prepaid API token with a spending cap after payment. Your agent can use that token to run this scraper through the Apify API or an authenticated MCP connection.

Some MCP setups also support paying for each request directly. That is a different payment option, so check the official guide for its availability.

Follow the official guide for wallet setup, supported payment options and current terms. Apify handles the payments. Keep wallet keys and payment tokens in your agent's secure configuration.

Other ways for agents to pay

Apify also supports MPP for prepaid access through AGI and Skyfire for eligible Actors. If your agent already uses one of these, see the agentic payment guide to choose the right setup.

FAQ

Can I export Mastodon posts and profiles to CSV?

Yes. Download the dataset as CSV, JSON or Excel. Author profiles are nested within post rows rather than separate profile records.

Is this an alternative to writing a Mastodon API integration?

It provides a hosted collection and export workflow for the documented public modes. It does not add authenticated search, private data access or cross-instance coverage beyond the selected server.

Why are there no results or why did a filter fail?

A hashtag may have no available posts on that instance. Some servers restrict public timelines or local/remote filters. Check the instance, mode, input help, final status and summary. Absence alone does not prove deletion or privacy.

Can I use this through an API or MCP?

Yes, using the Actor identifier and bounded inputs above. Retrieve the dataset after the run completes. MCP connection setup is managed by Apify.

How is a run charged?

The start event applies once after input validation and item applies per saved status. Consult the Pricing tab for rates. Reducing maxItems bounds the requested result count, not a guaranteed total cost.

Support and feedback

For custom additions or integrations, email hello@fetchcat.dev.

Found an error or have a feature request? Open an issue with the run URL, a non-sensitive input example and what you expected.

Need help sharing it? See Apify’s guide to sharing a run when reporting an issue. Sharing a run can give the developer access to its input, logs and results, so use a run that contains no sensitive data. Please leave out API tokens, passwords, cookies, private documents and personal data. Use a public sample URL or a redacted example instead.

Tried this scraper? We'd love to hear how it worked for you. Leave a review to help others choose the right tool and help us improve it. Your feedback means a lot to us.

Made with care for curious people, AI agents and the possibilities in data. ♥