# Mastodon & Fediverse Influencer & Content Intelligence (`straightforward_hydra/mastodon-fediverse-intelligence`) Actor

Discover influencers, enrich accounts, scrape posts & hashtags on Mastodon, Pleroma, Pixelfed and Firefish. No key.

- **URL**: https://apify.com/straightforward\_hydra/mastodon-fediverse-intelligence.md
- **Developed by:** [Dev D](https://apify.com/straightforward_hydra) (community)
- **Categories:** Social media, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## Mastodon & Fediverse Influencer & Content Intelligence 🐘

**Discover niche influencers, enrich accounts, scrape posts & engagement, and pull hashtag content from the Fediverse — no API key, no proxy.**

Works on **any Mastodon-compatible instance** — so one actor covers **Mastodon, Pleroma, Pixelfed and Firefish**. Point it at an instance and:

- 🔥 **Discover niche influencers** — give it a **hashtag** (`#art`, `#opensource`, `#photography`) and get the accounts active in that niche, **ranked by followers**, each with an **engagement score**. (Federated — surfaces accounts from across many instances.)
- 👤 **Account enrichment** — handles → full profiles (followers, following, post count, bio).
- 📝 **Posts & engagement** — an account's posts with favourites/reblogs/replies.
- #️⃣ **Hashtag content** — every recent post under a hashtag.

Perfect for **influencer marketing, community & brand monitoring, audience research, and social analytics** on the open social web.

> Uses the public **Mastodon REST API** — no key, no login, pure JSON. Very low maintenance.

---

### Compatible platforms

| Platform | How |
|---|---|
| **Mastodon** | Native. |
| **Pleroma** | Implements the Mastodon API. |
| **Pixelfed** | Implements the Mastodon API. |
| **Firefish** | Mastodon-compatible endpoints. |

Just set the `instance` (e.g. `mastodon.social`, `pixelfed.social`, `pleroma.envs.net`).

### Modes

- 🔥 **Discover** — hashtag (or name) → ranked accounts.
- 👤 **Accounts** — handles → enriched profiles.
- 📝 **Posts** — handles → posts + engagement.
- #️⃣ **Hashtag** — hashtag → content stream.

---

### Input

| Field | Description |
|---|---|
| **Instance** | The instance domain to query. |
| **Mode** | discover / accounts / posts / hashtag. |
| **Hashtag** | Topic for discover/hashtag modes. |
| **Query** | Alternative name search (discover). |
| **Handles** | Accounts for accounts/posts modes. |
| **Include engagement** | Sample posts to compute avg favourites/reblogs + score. |
| **Max results** | discover: top accounts; posts/hashtag: max posts. |

#### Example — top #photography accounts, ranked

```json
{
  "instance": "mastodon.social",
  "mode": "discover",
  "hashtag": "photography",
  "includeEngagement": true,
  "maxResults": 100
}
````

#### Example — a Pixelfed account's posts

```json
{
  "instance": "pixelfed.social",
  "mode": "posts",
  "handles": ["dansup"],
  "maxResults": 100
}
```

### Output (discover)

```json
{
  "rank": 1,
  "acct": "LibreOfficeDE@social.tchncs.de",
  "display_name": "LibreOffice",
  "followers_count": 2650,
  "following_count": 12,
  "statuses_count": 1134,
  "bio": "The Document Foundation …",
  "matched": "#opensource",
  "avg_favourites": 9.5,
  "engagement_score": 13.5,
  "sampled_posts": 10,
  "url": "https://social.tchncs.de/@LibreOfficeDE"
}
```

Post text is decoded from HTML to plain text; posts mode adds favourites/reblogs/replies + URL.

### Run it on a schedule

Track a hashtag's leaderboard or a set of accounts over time — pipe to a sheet, database or webhook.

### Notes & limitations

- Uses **public, unauthenticated** endpoints — hashtag timelines, account lookup/statuses and account search. (The instance-wide public firehose is often login-gated; hashtag discovery covers the niche use case.)
- Coverage depends on the instance you query and how much of the Fediverse it federates with.
- Data source: the queried Mastodon-compatible instance.

***

#### Keywords

Mastodon, Fediverse, Pleroma, Pixelfed, Firefish, influencer marketing, social media, influencer discovery, hashtag, engagement, social analytics, audience research, brand monitoring, ActivityPub, decentralized social, Twitter alternative, profile scraper, posts scraper, social intelligence, open social web.

# Actor input Schema

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

The Mastodon-compatible instance domain, e.g. "mastodon.social", "pixelfed.social", "pleroma.envs.net", "firefish.social". Works on Mastodon, Pleroma, Pixelfed and Firefish.

## `mode` (type: `string`):

discover = top accounts in a niche; accounts = enrich handles; posts = an account's posts; hashtag = posts under a hashtag.

## `hashtag` (type: `string`):

A hashtag/topic, e.g. "art", "photography", "opensource". In discover mode, accounts posting under it are ranked by followers.

## `query` (type: `string`):

Alternative to hashtag: search accounts by name/handle text.

## `handles` (type: `array`):

Account handles, e.g. \["Gargron", "someone@mastodon.social"]. The @ is optional; use user@instance for remote accounts.

## `includeEngagement` (type: `boolean`):

For discover/accounts: sample recent posts to compute avg favourites/reblogs/replies + an engagement score.

## `engagementSampleSize` (type: `integer`):

How many recent posts to sample for engagement.

## `maxResults` (type: `integer`):

discover: top accounts; posts/hashtag: max posts.

## Actor input object example

```json
{
  "instance": "mastodon.social",
  "mode": "discover",
  "hashtag": "art",
  "includeEngagement": false,
  "engagementSampleSize": 20,
  "maxResults": 100
}
```

# 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 = {
    "hashtag": "art"
};

// Run the Actor and wait for it to finish
const run = await client.actor("straightforward_hydra/mastodon-fediverse-intelligence").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 = { "hashtag": "art" }

# Run the Actor and wait for it to finish
run = client.actor("straightforward_hydra/mastodon-fediverse-intelligence").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 '{
  "hashtag": "art"
}' |
apify call straightforward_hydra/mastodon-fediverse-intelligence --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Mastodon & Fediverse Influencer & Content Intelligence",
        "description": "Discover influencers, enrich accounts, scrape posts & hashtags on Mastodon, Pleroma, Pixelfed and Firefish. No key.",
        "version": "0.1",
        "x-build-id": "oztwJ7KRIBHba1lhc"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/straightforward_hydra~mastodon-fediverse-intelligence/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-straightforward_hydra-mastodon-fediverse-intelligence",
                "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/straightforward_hydra~mastodon-fediverse-intelligence/runs": {
            "post": {
                "operationId": "runs-sync-straightforward_hydra-mastodon-fediverse-intelligence",
                "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/straightforward_hydra~mastodon-fediverse-intelligence/run-sync": {
            "post": {
                "operationId": "run-sync-straightforward_hydra-mastodon-fediverse-intelligence",
                "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",
                        "type": "string",
                        "description": "The Mastodon-compatible instance domain, e.g. \"mastodon.social\", \"pixelfed.social\", \"pleroma.envs.net\", \"firefish.social\". Works on Mastodon, Pleroma, Pixelfed and Firefish.",
                        "default": "mastodon.social"
                    },
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "discover",
                            "accounts",
                            "posts",
                            "hashtag"
                        ],
                        "type": "string",
                        "description": "discover = top accounts in a niche; accounts = enrich handles; posts = an account's posts; hashtag = posts under a hashtag.",
                        "default": "discover"
                    },
                    "hashtag": {
                        "title": "Hashtag (discover / hashtag modes)",
                        "type": "string",
                        "description": "A hashtag/topic, e.g. \"art\", \"photography\", \"opensource\". In discover mode, accounts posting under it are ranked by followers."
                    },
                    "query": {
                        "title": "Name query (discover mode alt)",
                        "type": "string",
                        "description": "Alternative to hashtag: search accounts by name/handle text."
                    },
                    "handles": {
                        "title": "Handles (accounts / posts modes)",
                        "type": "array",
                        "description": "Account handles, e.g. [\"Gargron\", \"someone@mastodon.social\"]. The @ is optional; use user@instance for remote accounts.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "includeEngagement": {
                        "title": "Include engagement",
                        "type": "boolean",
                        "description": "For discover/accounts: sample recent posts to compute avg favourites/reblogs/replies + an engagement score.",
                        "default": false
                    },
                    "engagementSampleSize": {
                        "title": "Engagement sample size",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "How many recent posts to sample for engagement.",
                        "default": 20
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "discover: top accounts; posts/hashtag: max posts.",
                        "default": 100
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
