# Mastodon Trends Scraper | Trending Posts, Tags & Links (`parseforge/mastodon-instance-trends-scraper`) Actor

Get instant access to social activity from Mastodon Instance Trends with profile name, follower count, posts, replies and timestamps. Perfect for community managers, brand watchers and trend researchers. Run on demand or on a recurring schedule and feed every row into your favourite analytics or.

- **URL**: https://apify.com/parseforge/mastodon-instance-trends-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Social media, News, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## 🐘 Mastodon Trends Scraper

> 🚀 **Pull trending Mastodon posts, hashtags, and links in seconds.** Built on the official Mastodon REST API used by every instance in the Fediverse.

> 🕒 **Last updated:** 2026-05-27 · **📊 19 fields** per record · **Any public Mastodon instance** · **Statuses, tags, and links**

The Mastodon Trends Scraper pulls trending content from any public Mastodon instance (mastodon.social, fosstodon.org, mas.to, hachyderm.io, and thousands more) using the official `/api/v1/trends/` endpoints. It returns one structured record per trending post, hashtag, or link - with account, engagement, media, and language metadata fully parsed.

Coverage: every Mastodon-compatible instance on the Fediverse. Three trend types: statuses, tags, links. Up to 1,000,000 records per run on the paid plan.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Social listening teams | Track decentralized social conversations |
| Journalists & researchers | Spot emerging stories outside corporate networks |
| Brand monitoring | Detect mentions and trending hashtags |
| Open-source community | Build Fediverse analytics dashboards |

### 📋 What the Mastodon Trends Scraper does

- Queries the official `/api/v1/trends/statuses`, `/trends/tags`, and `/trends/links` endpoints
- Strips HTML, extracts media, and normalizes account + engagement fields
- Works against any public Mastodon instance - no API key required
- Outputs to tabular records via Apify dataset
- Auto-limits to 10 items on the free plan; up to 1,000,000 on paid

> 💡 **Why it matters:** Mastodon's distributed nature means there's no single "trending" page. This Actor lets you collect trends from any instance, any time.

### 🎬 Full Demo (_🚧 Coming soon_)

### ⚙️ Input

<table>
<thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td>instance</td><td>string</td><td>Mastodon instance domain (e.g. mastodon.social)</td></tr>
<tr><td>trendType</td><td>enum</td><td>statuses, tags, or links</td></tr>
<tr><td>maxItems</td><td>integer</td><td>Cap on rows (free: 10)</td></tr>
</tbody>
</table>

```tabular
{ "instance": "mastodon.social", "trendType": "statuses", "maxItems": 50 }
````

```tabular
{ "instance": "fosstodon.org", "trendType": "tags", "maxItems": 25 }
```

> ⚠️ **Good to Know:** Each Mastodon instance manages its own trends - results from `mastodon.social` differ from `fosstodon.org`. Some smaller instances disable trends entirely.

### 📊 Output

| Field | Type | Description |
|---|---|---|
| 🖼 imageUrl | string | First media attachment or account avatar |
| 📌 title | string | Cleaned status text (first 200 chars) |
| 🔗 url | string | Canonical post URL |
| 🆔 id | string | Status / tag ID |
| 👤 account | string | @username@instance |
| 👤 accountDisplayName | string | Display name |
| 🔗 accountUrl | string | Profile URL |
| 👥 accountFollowers | number | Followers count |
| 📝 content | string | Full plain-text content |
| 🌐 language | string | Post language |
| 🔞 sensitive | boolean | NSFW flag |
| 👁 visibility | string | public / unlisted / private |
| 💬 repliesCount | number | Replies |
| 🔁 reblogsCount | number | Reblogs (boosts) |
| ⭐ favouritesCount | number | Favourites |
| 🕒 createdAt | string | ISO post timestamp |
| 🖼 mediaCount | number | Number of media attachments |
| 🏷 tags | array | Hashtags |
| 🕒 scrapedAt | string | ISO timestamp |
| ❌ error | string | null | Error message if extraction failed |

### ✨ Why choose this Actor

- Direct Mastodon API source, no third-party caching
- Real-time data, never stale
- Pay-per-result pricing; only charged for what you keep
- Works with Make, Zapier, n8n, Airbyte, GitHub Actions, Google Sheets

### 📈 How it compares to alternatives

| Approach | Cost | Maintenance | Coverage |
|---|---|---|---|
| Manual instance browsing | Free | High (per instance) | One trend at a time |
| Build your own Mastodon client | Dev cost | High | Custom |
| This actor | Pay per result | None | Any instance, three trend types |

### 🚀 How to use

1. [Create a free Apify account w/ $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp)
2. Open the Mastodon Trends Scraper actor page
3. Set `instance` (default: mastodon.social), `trendType`, and `maxItems`
4. Click **Start** and wait for the run to finish
5. Open the dataset as tabular / spreadsheet / tabular / tabular

### 💼 Business use cases

#### Social listening

| Need | How this Actor helps |
|---|---|
| Detect emerging stories | Pull trending statuses hourly |
| Cross-instance signal | Compare trends across 10+ instances |

#### Brand monitoring

| Need | How this Actor helps |
|---|---|
| Hashtag tracking | Pull trending tags daily |
| Owned-media visibility | Detect when your domain trends in links |

#### Research

| Need | How this Actor helps |
|---|---|
| Fediverse studies | Bulk pull trending content for analysis |
| Misinfo tracking | Snapshot trends as they evolve |

#### Product & marketing

| Need | How this Actor helps |
|---|---|
| Content ideation | Surface what's getting reblogged today |
| Influencer discovery | Find high-engagement accounts on a topic |

### 🔌 Automating Mastodon Trends Scraper

Run on a schedule and forward results to Make, Zapier, n8n, Slack, Airbyte, GitHub Actions, or Google Drive. Use Apify's webhook to push fresh trends into your analytics warehouse.

### 🌟 Beyond business use cases

#### Research

Academic studies of decentralized social networks rely on consistent trending snapshots. This Actor produces them on demand.

#### Personal

Build a "trending elsewhere" feed showing what's hot on instances you don't have an account on.

#### Non-profit

Activist groups can track movement-related hashtags across the Fediverse.

#### Experimentation

Build a TUI dashboard that polls 5 instances and shows real-time differences.

### 🤖 Ask an AI assistant about this scraper

- [ChatGPT](https://chatgpt.com/)
- [Claude](https://claude.ai/)
- [Perplexity](https://www.perplexity.ai/)
- [Microsoft Copilot](https://copilot.microsoft.com/)

### ❓ Frequently Asked Questions

**Q: Do I need a Mastodon account?** No. The trends endpoints are fully public.

**Q: Which instance should I pick?** `mastodon.social` is the largest, but each instance has different trends. Try `fosstodon.org` for tech, `mas.to` for media, `hachyderm.io` for developers.

**Q: Why are some instances empty?** Trends are opt-in per instance. Smaller servers may have them disabled.

**Q: Are private posts included?** No. Only `public` visibility statuses appear in trends.

**Q: Can I get trends from .social (Threads via ActivityPub)?** Threads' federation is read-only and does not expose a trends API.

**Q: How fresh is the data?** Live - every request hits the instance directly.

**Q: Rate limits?** Mastodon's anonymous API allows ~300 requests per 5 minutes per IP. The Actor stays well under that.

**Q: Can I scrape replies to a trending post?** Not in this Actor; use a status-detail scraper.

**Q: Why is content sometimes empty?** Some content-warning posts mask the body; check `spoilerText` and `sensitive`.

**Q: Does it work for trending links?** Yes - set `trendType: "links"` to get article URLs, authors, and provider names.

### 🔌 Integrate with any app

Apify's integrations let you push results to Slack, Discord, Sheets, Airtable, BigQuery, S3, and 100+ more.

### 🔗 Recommended Actors

| Actor | What it does |
|---|---|
| GitHub Trending Scraper | Daily trending repos |
| Hacker News Scraper | Top tech stories |
| Reddit Subreddit Scraper | Subreddit posts |
| Bluesky Posts Scraper | Bluesky feed |

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge).

**🆘 Need Help?** [Open our contact form](https://tally.so/r/BzdKgA)

> **⚠️ Disclaimer:** independent tool, not affiliated with the Mastodon project or any specific instance. Only publicly available data is collected.

# Actor input Schema

## `instance` (type: `string`):

Mastodon instance domain (e.g. mastodon.social, fosstodon.org, mas.to). No https://.

## `trendType` (type: `string`):

What kind of trending content to fetch.

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## Actor input object example

```json
{
  "instance": "mastodon.social",
  "trendType": "statuses",
  "maxItems": 10
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/mastodon-instance-trends-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "maxItems": 10 }

# Run the Actor and wait for it to finish
run = client.actor("parseforge/mastodon-instance-trends-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 10
}' |
apify call parseforge/mastodon-instance-trends-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=parseforge/mastodon-instance-trends-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Mastodon Trends Scraper | Trending Posts, Tags & Links",
        "description": "Get instant access to social activity from Mastodon Instance Trends with profile name, follower count, posts, replies and timestamps. Perfect for community managers, brand watchers and trend researchers. Run on demand or on a recurring schedule and feed every row into your favourite analytics or.",
        "version": "0.1",
        "x-build-id": "tb28xmCDn7hfhVvTW"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~mastodon-instance-trends-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-mastodon-instance-trends-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/parseforge~mastodon-instance-trends-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-mastodon-instance-trends-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/parseforge~mastodon-instance-trends-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-mastodon-instance-trends-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "instance": {
                        "title": "Instance Domain",
                        "type": "string",
                        "description": "Mastodon instance domain (e.g. mastodon.social, fosstodon.org, mas.to). No https://.",
                        "default": "mastodon.social"
                    },
                    "trendType": {
                        "title": "Trend Type",
                        "enum": [
                            "statuses",
                            "tags",
                            "links"
                        ],
                        "type": "string",
                        "description": "What kind of trending content to fetch.",
                        "default": "statuses"
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
