Mastodon Scraper avatar

Mastodon Scraper

Pricing

from $3.00 / 1,000 results

Go to Apify Store
Mastodon Scraper

Mastodon Scraper

Scrape any Mastodon instance like public timeline, hashtag streams, user profiles, account search, and trending tags. Pure HTTP, no login required, works against mastodon.social, mas.to, hachyderm.io, fosstodon.org, and every other federated instance.

Pricing

from $3.00 / 1,000 results

Rating

5.0

(17)

Developer

Crawler Bros

Crawler Bros

Maintained by Community

Actor stats

17

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

Scrape any Mastodon instance — single statuses by URL, full thread context, status / account search, hashtag streams, hashtag info, user profiles, follower/following lists, public timelines, trending content, and instance metadata. Pure HTTP, no login, no cookies, no proxy required. Works against mastodon.social, mas.to, hachyderm.io, fosstodon.org, infosec.exchange, and every other federated instance.

Mastodon's public REST API is permissive — every instance exposes the same documented endpoints, so this single actor covers the entire Fediverse.

What you get

For each record returned:

Status records (recordType=status)

FieldDescription
idMastodon status ID (per instance)
urlPublic URL of the status
createdAtISO 8601 timestamp
languageISO 639-1 language code
visibilitypublic / unlisted / private / direct
contentOriginal HTML content
contentTextPlain-text version of content (HTML stripped, entities decoded)
spoilerTextContent-warning text
sensitivetrue if marked sensitive
inReplyToIdStatus ID this is replying to
editedAtISO 8601 timestamp of the last edit
repliesCountReply count
reblogsCountReblog (boost) count
favouritesCountFavourite count
quotesCountQuote-post count (Mastodon 4.4+)
isReblogtrue if this status reblogs another
reblogOfIdID of the reblogged status (when isReblog=true)
mediaAttachmentsArray of {type, url, previewUrl, description}
mentionsArray of mentioned handles
tagsArray of hashtags used (lowercase)
accountAuthor profile (full Account object — see below)
instanceSource instance domain
scrapedAtISO 8601 UTC timestamp of extraction

Account records (recordType=account)

FieldDescription
idMastodon account ID
usernameHandle on this instance
acctFederated handle (user@otherinstance.tld for remote users)
displayNameDisplay name
urlProfile URL
noteProfile bio (plain text)
avatarAvatar image URL
headerHeader image URL
followersCountFollower count
followingCountFollowing count
statusesCountTotal status count
bottrue if marked as a bot
lockedtrue if profile is locked
discoverablefalse if hidden from discovery
createdAtAccount creation timestamp
lastStatusAtLast activity timestamp

Tag records (recordType=tag)

FieldDescription
nameHashtag name (lowercase)
urlPublic hashtag URL
usesTodayUses in the past 24h
accountsTodayDistinct accounts using it in the past 24h
historyArray of {day, uses, accounts} for the past 7 days

Empty fields are dropped from every record at every depth — the dataset never contains nulls or empty values.

Input

ParameterTypeDefaultDescription
modeEnumstatusByUrlstatusByUrl / statusContext / statusSearch / hashtag / hashtagInfo / profile / accountSearch / followers / following / publicTimeline / trending / instanceMetadata
instancePopularEnumPick a popular instance from a curated dropdown (overrides instance when set)
instanceStringmastodon.socialCustom instance domain
statusUrlStringsampleStatus URL (mode=statusByUrl / statusContext)
includeContextBooleanfalseInclude thread context with mode=statusByUrl
hashtagStringpythonHashtag (without #). Used by mode=hashtag / hashtagInfo
usernameStringUser handle (Gargron or user@otherinstance.tld). Used by mode=profile / followers / following
searchQueryStringFree-text query (mode=accountSearch / statusSearch)
timelineScopeEnumfederatedlocal / federated / remote. Used by mode=publicTimeline
trendingTypeEnumtagstags / statuses / links. Used by mode=trending
languageEnumISO 639-1 language filter (curated dropdown of 40 codes). Empty = no filter
excludeRepliesBooleanfalseDrop reply statuses
excludeReblogsBooleanfalseDrop reblogs (boosts)
mediaOnlyBooleanfalseOnly emit statuses with at least one media attachment
minFavouritesIntegerDrop statuses with fewer favourites than this
minReblogsIntegerDrop statuses with fewer reblogs than this
maxItemsInteger40Hard cap on emitted records (1-5000)

Modes overview

  • statusByUrl — paste a status URL (e.g. https://mastodon.social/@Gargron/110423915824138798). Returns the single status. Toggle includeContext=true to also pull ancestors + descendants.
  • statusContext — full reply thread for the given status URL.
  • statusSearchq= search across statuses; instance-dependent (many instances throttle for unauthenticated requests — try mas.to, fosstodon.org).
  • followers / following — paginated follower / following lists for a user.
  • hashtagInfo/api/v1/tags/{tag} returns 7-day usage history + usesToday / accountsToday.
  • instanceMetadata/api/v2/instance returns server version, rules, languages, contact email, active-monthly-user count.

Example input — hashtag stream

{
"mode": "hashtag",
"instance": "mastodon.social",
"hashtag": "python",
"maxItems": 50
}

Example input — user profile

{
"mode": "profile",
"instance": "mastodon.social",
"username": "Gargron",
"maxItems": 100
}

Example input — federated profile (cross-instance)

{
"mode": "profile",
"instance": "mastodon.social",
"username": "rss@oisaur.com",
"maxItems": 50
}

Example input — instance public timeline (local)

{
"mode": "publicTimeline",
"instance": "fosstodon.org",
"timelineScope": "local",
"maxItems": 100
}
{
"mode": "accountSearch",
"instance": "mastodon.social",
"searchQuery": "rust",
"maxItems": 25
}
{
"mode": "trending",
"instance": "mastodon.social",
"trendingType": "tags"
}

Example output

{
"recordType": "status",
"id": "111234567890123456",
"url": "https://mastodon.social/@username/111234567890123456",
"createdAt": "2026-04-15T14:32:00.000Z",
"language": "en",
"visibility": "public",
"content": "<p>Hello <a href=\"...\">#Mastodon</a>!</p>",
"contentText": "Hello #Mastodon!",
"repliesCount": 12,
"reblogsCount": 47,
"favouritesCount": 230,
"tags": ["mastodon"],
"mentions": [],
"mediaAttachments": [
{ "type": "image", "url": "https://files.mastodon.social/.../photo.jpg", "description": "Hello banner" }
],
"account": {
"id": "1",
"username": "Gargron",
"acct": "Gargron",
"displayName": "Eugen Rochko",
"url": "https://mastodon.social/@Gargron",
"followersCount": 379745,
"statusesCount": 81294,
"createdAt": "2016-03-16T14:34:26.392Z"
},
"instance": "mastodon.social",
"scrapedAt": "2026-05-06T05:07:30Z"
}

Use cases

  • OSINT / intelligence research — Mastodon hosts journalist + dissident + academic communities; track conversations on specific tags or accounts.
  • Brand monitoring — Pull every public mention of your brand handle or hashtag across the Fediverse.
  • Trend analysis — Use mode=trending to surface what's heating up on a given instance.
  • Academic research — Snapshot public-discourse data for sociological / linguistic studies.
  • Cross-platform social listening — Pair with our Bluesky / Twitter / Reddit scrapers for full coverage of post-X social media.
  • Content discovery — Surface high-engagement posts in a niche hashtag for content curation.

FAQ

Do I need a Mastodon account or login? No. Every endpoint this actor uses is fully public — t.me/s/-style. The actor authenticates as nobody and works straight from datacenter IPs.

Some instances return "This method requires an authenticated user" — what's going on? A few large instances (notably mastodon.social and infosec.exchange) lock down their public timeline and remote feed for anti-spam reasons. The actor surfaces a clear status message in that case. Workarounds:

  • Use mode=hashtag, mode=profile, or mode=accountSearch instead — those still work everywhere.
  • Switch instance to a more permissive instance like mas.to, hachyderm.io, or fosstodon.org.

How does federation work for mode=profile? Pass either a local handle (Gargron) or a federated handle (user@otherinstance.tld). The actor uses the configured instance's account-lookup endpoint, which transparently resolves remote users by federation.

What's the difference between local, federated, and remote timelines?

  • local — only posts from accounts on the configured instance.
  • federated — everything the instance currently sees (its own posts + every remote post that has reached it via federation).
  • remote — federated minus local (i.e. only remote posts).

How are reblogs (boosts) handled? A reblog is emitted as one record with isReblog=true and reblogOfId pointing at the original. The content, mediaAttachments, mentions, tags, repliesCount, etc. are all sourced from the underlying post (so the record is meaningful even though it was emitted via the booster). Use excludeReblogs=true to drop these.

How current is the data? Live — every run hits the configured instance at request time. Schedule the actor on the Apify platform for hourly / daily refreshes.

Do I need a proxy? No. Mastodon instances are happy to serve datacenter IPs. The actor sets a polite User-Agent and makes a small number of requests (3-30 per run typically).

What about NSFW / sensitive content? The actor returns sensitive: true and spoilerText for every flagged status. It does not filter sensitive content by default — handle this in your downstream pipeline.

Limitations

  • Status full-text search (q=...&type=statuses) is an authenticated endpoint on every instance — this actor cannot search status text by keyword. Use mode=hashtag to find topical content instead.
  • Some large instances (e.g. mastodon.social) have removed public-timeline access; the actor surfaces a clear status message and suggests an alternative instance.
  • Mastodon timeline endpoints page at most 40 statuses per request; very large maxItems will issue many requests with a polite delay.
  • Federated acct handles only resolve correctly when the configured instance has previously seen the remote user (federation is eventually-consistent).