Mastodon Explorer
7 days trial then $30.00/month - No credit card required now
This Actor may be unreliable while under maintenance. Would you like to try a similar Actor instead?
See alternative ActorsMastodon Explorer
7 days trial then $30.00/month - No credit card required now
π Scrape Mastodon Social Network websites
Welcome to Mastodon Scraper
π About Mastodon (social network)
Mastodon is free and open-source software for running self-hosted social networking services. It has microblogging features similar to Twitter, which are offered by a large number of independently run nodes, known as instances, each with its own code of conduct, terms of service, privacy policy, privacy options, and content moderation policies.[6][7][8]
π About This Actor
Scrape data from Mastadon, the decentralized alternative to Twitter. Extract information on users, their "toots," likes, and favorites or scrape data based on a search query, such as a hashtag or a keyword. Export accumulated data into a variety of database formats.
π Tutorial
π Parameters
Input | Type | Description |
---|---|---|
query | string array | List of Query , Search Terms or Start URL |
portal | string | Default portal (default: mastodon.social) |
limit | integer | Number of results (per-query) |
π Basic Usage
1# search posts 2{ "query": ["sponge bobs"], "limit": 10 }
1# search hashtag 2{ "query": ["#python"], "limit": 10 }
1# just paste an url 2{ "query": ["https://mastodon.social/@elonmusk"], "limit": 10 }
π Advanced Usage
Mastodon Query Language (MQL)
[ [ <COMMAND:> | # | @ ] [ <NAME> | <ID> | <KEYWORD> ] [ / <SECTION> ] | <URL> ]
Possible QUERY values
Format | Example | Description |
---|---|---|
KEYWORDS | search terms | Search Anything |
KEYWORDS | webscraping | Search posts |
users:KEYWORDS | users:python | Search users |
hashtags:KEYWORDS | hashtags:php | Search hashtags |
portal:SECTION | Explore Current Portal | |
portal:about | Portal info & description | |
portal:info | Portal info | |
portal:description | Portal description | |
portal:posts | Portal posts | |
portal:hashtags | Portal hashtags | |
portal:news | Portal news | |
portal:feeds | All feeds | |
portal:local | Portal feeds (local) | |
portal:remote | Portal feeds (remote) | |
#HASHTAG | #python | Scrape Hashtag |
/info | #python/info | Hashtag info |
/posts | #python/posts | Hashtag posts |
@USER[@SERVER] | @elonmusk | Scraper User |
@elonmusk@mastodon.social | ||
/info | @Gargron/info | User info |
/posts | @Gargron/posts | User posts |
/replies | @Gargron/replies | User posts (with replies) |
/media | @Gargron/media | User media |
/following | @Gargron/following | User following |
/followers | @Gargron/followers | User followers |
<POST_ID> | 112718231305707672 | Scraper a Post |
/info | 112718231305707672/info | Post content |
/comments | 112718231305707672/comments | Post comments |
/reblogs | 112718231305707672/reblogs | Post reblogs (boosts) |
/likes | 112718231305707672/likes | Post liked users (favourites) |
https:<PORTAL_URL> | https://mastodon.social | Start URL |
https://mastodon.social/@elonmusk |
π Examples
By default the actor will scrape from mastodon.social
portal (eg: https://mastodon.social)
Example 1: Portal
To scrape from other portal, use portal
parameter and specify the website/portal hostname :
{ "portal": "fosstodon.org" }
Example 2: Scraping #hastag
{ "query": "#microsoft" }
Example 3: Scraping user posts
1{ "query": "@username" } 2{ "query": "@username@portal" }
Example 4: Using URL as input
When you specify URL for query
parameter, it will automatically parsed with appropriate parameter :
{ "query": "https://fosstodon.org/@Joefree/media" }
Example 5: Number of results
Use limit
parameter to get more results.
{ "query": "microsoft", "limit": 100 }
π Output Examples
1{ 2 "account": { 3 "acct": "Gargron", 4 "avatar": "https://files.mastodon.social/accounts/avatars/000/000/001/original/dc4286ceb8fab734.jpg", 5 "avatar_static": "https://files.mastodon.social/accounts/avatars/000/000/001/original/dc4286ceb8fab734.jpg", 6 "created_at": "2016-03-16T00:00:00.000Z", 7 "discoverable": true, 8 "display_name": "Eugen Rochko", 9 "fields": [ 10 { 11 "name": "Patreon", 12 "value": "<a href=\"https://www.patreon.com/mastodon\" target=\"_blank\" rel=\"nofollow noopener noreferrer me\"><span class=\"invisible\">https://www.</span><span class=\"\">patreon.com/mastodon</span><span class=\"invisible\"></span></a>" 13 }, 14 { 15 "name": "GitHub", 16 "value": "<a href=\"https://github.com/Gargron\" target=\"_blank\" rel=\"nofollow noopener noreferrer me\"><span class=\"invisible\">https://</span><span class=\"\">github.com/Gargron</span><span class=\"invisible\"></span></a>", 17 "verified_at": "2023-02-07T23:24:40.347+00:00" 18 } 19 ], 20 "followers_count": 312471, 21 "following_count": 395, 22 "header": "https://files.mastodon.social/accounts/headers/000/000/001/original/3b91c9965d00888b.jpeg", 23 "header_static": "https://files.mastodon.social/accounts/headers/000/000/001/original/3b91c9965d00888b.jpeg", 24 "id": "1", 25 "last_status_at": "2023-04-28", 26 "note": "<p>Founder, CEO and lead developer <span class=\"h-card\"><a href=\"https://mastodon.social/@Mastodon\" class=\"u-url mention\">@<span>Mastodon</span></a></span>, Germany.</p>", 27 "statuses_count": 73541, 28 "url": "https://mastodon.social/@Gargron", 29 "username": "Gargron" 30 }, 31 "application": { 32 "name": "Web" 33 }, 34 "card": { 35 "blurhash": "U34x7la*9EoYxNfQayfR4mj:?cWIajfRj[a{", 36 "description": "Learn how to get verified on Mastodon", 37 "height": 267, 38 "image": "https://files.mastodon.social/cache/preview_cards/images/059/998/839/original/74e91efacf98def0.png", 39 "title": "Verification", 40 "type": "link", 41 "url": "https://joinmastodon.org/verification", 42 "width": 400 43 }, 44 "content": "<p>Looks like <span class=\"h-card\"><a href=\"https://mastodon.social/@arstechnica\" class=\"u-url mention\">@<span>arstechnica</span></a></span> is now verified on here! Always great to see this feature used. It'll be even more prominent in the future.</p><p><a href=\"https://joinmastodon.org/verification\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><span class=\"invisible\">https://</span><span class=\"\">joinmastodon.org/verification</span><span class=\"invisible\"></span></a></p>", 45 "created_at": "2023-04-27T22:37:39.080Z", 46 "favourites_count": 420, 47 "id": "110273171231251728", 48 "language": "en", 49 "mentions": [ 50 { 51 "acct": "arstechnica", 52 "id": "110266162634306901", 53 "url": "https://mastodon.social/@arstechnica", 54 "username": "arstechnica" 55 } 56 ], 57 "reblogs_count": 280, 58 "replies_count": 14, 59 "uri": "https://mastodon.social/users/Gargron/statuses/110273171231251728", 60 "url": "https://mastodon.social/@Gargron/110273171231251728", 61 "visibility": "public" 62}
π Support
Actor Metrics
1 monthly user
-
3 stars
>99% runs succeeded
Created in Apr 2023
Modified 5 months ago