Mastodon Instance & Timeline Scraper avatar

Mastodon Instance & Timeline Scraper

Pricing

Pay per usage

Go to Apify Store
Mastodon Instance & Timeline Scraper

Mastodon Instance & Timeline Scraper

Scrape Mastodon instance timelines and profiles. Extract toots, boosts, favourites, and instance statistics.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Donny Nguyen

Donny Nguyen

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

2 days ago

Last modified

Categories

Share

Mastodon Instance Scraper

Scrape Mastodon instance public timelines and instance metadata. Extract toots, boosts, favourites, reply counts, author details, media attachments, and instance statistics using the Mastodon public API.

Features

  • Scrape public timelines from any Mastodon instance
  • Collect instance metadata (user count, status count, version, rules)
  • Automatic pagination for large timeline collections
  • Filter for local-only or media-only toots
  • HTML content cleaned to plain text
  • Extract reblog/boost information
  • Collect author follower/following counts
  • Tag and media attachment extraction

Input Parameters

ParameterTypeRequiredDefaultDescription
instanceUrlsarrayYes-List of Mastodon instance base URLs (e.g. https://mastodon.social)
maxTootsintegerNo100Maximum toots per instance. Set 0 for single page (40 toots)
includeInstanceInfobooleanNotrueAlso fetch instance metadata from /api/v1/instance
onlyLocalbooleanNofalseOnly fetch toots from local instance users
onlyMediabooleanNofalseOnly fetch toots containing media attachments
proxyConfigurationobjectNoApify ProxyProxy settings for requests

Output Fields

Toot Items (type: "toot")

FieldTypeDescription
typestringAlways "toot" for toot items
tootIdstringUnique Mastodon toot ID
tootContentstringPlain text content of the toot
contentHtmlstringOriginal HTML content
authorstringDisplay name of the toot author
authorHandlestringAuthor's handle (user@instance or local username)
authorUrlstringURL to the author's profile
authorFollowersnumberAuthor's follower count
authorFollowingnumberNumber of accounts the author follows
authorStatusesCountnumberTotal toots by the author
authorBotbooleanWhether the account is a bot
boostCountnumberNumber of boosts (reblogs)
favouriteCountnumberNumber of favourites (likes)
repliesCountnumberNumber of replies
createdAtstringISO timestamp of toot creation
languagestringLanguage code of the toot
sensitivebooleanWhether marked as sensitive content
visibilitystringToot visibility level
tootUrlstringDirect URL to the toot
tagsarrayHashtags used in the toot
mediaAttachmentsarrayMedia files attached (type, url, description)
reblogobjectReblogged toot info if this is a boost
instanceUrlstringSource instance URL
scrapedAtstringISO timestamp of data collection

Instance Info Items (type: "instanceInfo")

FieldTypeDescription
typestringAlways "instanceInfo"
instanceNamestringName of the Mastodon instance
descriptionstringInstance description
userCountnumberTotal registered users
statusCountnumberTotal toots on the instance
domainCountnumberNumber of federated domains
versionstringMastodon software version
registrationsbooleanWhether new registrations are open
adminContactstringAdmin contact email
rulesarrayInstance rules as text strings

Example Output

{
"type": "toot",
"tootId": "111234567890",
"tootContent": "Just discovered a great open-source project! #opensource #foss",
"author": "Jane Developer",
"authorHandle": "jane@fosstodon.org",
"boostCount": 12,
"favouriteCount": 45,
"repliesCount": 3,
"createdAt": "2024-12-15T14:30:00.000Z",
"tags": ["opensource", "foss"],
"mediaAttachments": [],
"instanceUrl": "https://fosstodon.org",
"scrapedAt": "2024-12-20T10:00:00.000Z"
}

Use Cases

  • Fediverse analytics: Monitor activity across multiple Mastodon instances
  • Community research: Study engagement patterns in specific Mastodon communities
  • Content discovery: Find trending toots and popular hashtags
  • Instance comparison: Compare instance sizes, activity levels, and policies
  • Bot detection: Identify automated accounts across the fediverse
  • Media monitoring: Track media-rich posts across instances

Cost Estimate

This actor uses the Utility pricing tier at $0.0003 per result. Example costs:

Toots ScrapedEstimated Cost
100$0.03
1,000$0.30
10,000$3.00

Mastodon public APIs are generally permissive, so proxy costs are minimal. Compute costs are low due to the lightweight Cheerio-based approach.

Notes

  • Only public toots are accessible through this scraper
  • Rate limits vary by instance; the scraper handles pagination automatically
  • Some instances may block API access from certain IP ranges
  • The Mastodon API v1 is used for maximum compatibility across instances