# Mastodon Profile Scraper (`scraperoka/mastodon-profile-scraper`) Actor

🧾 Mastodon Profile Scraper pulls public user profile data from Mastodon—bios, links, followers & more. 🚀 Great for community research, outreach, and lead generation. 🔍 Fast, reliable, and privacy-aware. 📈 Turn profiles into actionable insights!

- **URL**: https://apify.com/scraperoka/mastodon-profile-scraper.md
- **Developed by:** [Scraperoka](https://apify.com/scraperoka) (community)
- **Categories:** Lead generation, Social media, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## 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/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 Profile Scraper 🎯

Manually visiting Mastodon profiles to collect account metadata wastes hours you don’t have. **Mastodon Profile Scraper** pulls profile information from a list of Mastodon handles in bulk, saving you time. This Mastodon profile scraper (and Mastodon user profile scraper) is ideal for marketers, recruiters, and growth teams who need structured data fast. In a single run, you can process many profiles and export results immediately.

---

### What You Get: Sample Output

Here's a sample record from a single run:

```json
{
  "id": "123456789012345678",
  "username": "warandpeas",
  "acct": "warandpeas@mastodon.social",
  "display_name": "War and Peas",
  "note": "Open source gardening, small ideas, big grows 🌱",
  "followers_count": 1204,
  "following_count": 88,
  "statuses_count": 532,
  "created_at": "2024-02-10T12:34:56.000Z",
  "url": "https://mastodon.social/@warandpeas",
  "avatar_static": "https://mastodon.social/images/avatar_static.png",
  "header_static": "https://mastodon.social/images/header_static.png",
  "error_message": null,
  "success": true
}
````

> Note: The actor returns the raw Mastodon API account lookup response for each handle, or an error object when a profile can’t be fetched.

| Field | Type | What It Tells You |
|---|---|---|
| `id` | string | Stable profile identifier you can use to join datasets |
| `username` | string | The visible handle users type when searching or tagging |
| `acct` | string | The normalized `user@instance` account string for accurate matching |
| `display_name` | string | The profile’s display name for reports and enrichment |
| `note` | string | Bio text you can parse for positioning, interests, or topics |
| `followers_count` | number | Social reach estimate for prioritization and scoring |
| `following_count` | number | Indicates how engaged or community-focused the account is |
| `statuses_count` | number | Activity level (useful for engagement maturity) |
| `created_at` | string | Account age for segmentation and trust signals |
| `url` | string | Direct profile link for citations and human verification |
| `avatar_static` | string | Avatar image URL for creative review or branding workflows |
| `header_static` | string | Banner image URL for richer profile snapshots |
| `error_message` | string | null | Explains what went wrong when a handle can’t be fetched |
| `success` | boolean | Convenient flag to quickly separate successful vs failed results |

Export your dataset as JSON, CSV, or Excel — straight from the Apify dashboard.

***

### Why Mastodon Profile Scraper?

There are a lot of ways to pull data from Mastodon — here’s what sets Mastodon Profile Scraper apart.

#### Built for handle-based bulk enrichment

Feed in a list of `profile_ids` (Mastodon handles like `Mastodon` or `dataforleads@gmail.com`) and the actor fetches profile metadata for each one so you can build structured datasets quickly. This makes a Mastodon account scraper practical for batch research and ongoing enrichment.

#### Instance-aware lookups with fallback support

The actor detects the instance from the handle when you pass `dataforleads@gmail.com`, and it also includes a fallback lookup approach when the first attempt doesn’t succeed. That means fewer “missing profile” gaps when you’re collecting across different instances.

#### Resilient execution and per-profile error handling

If a profile fails to fetch, the actor returns an error object for that specific `profile_id` instead of failing the whole run. You still get partial results, which is especially important for Mastodon profile data extraction at scale.

#### Outputs structured profile metadata for analysis

Results are pushed to your Apify dataset as JSON records as each handle is processed. That keeps the output usable for data analysts, outreach teams, and anyone doing enrichment, segmentation, or downstream automation with a Mastodon profile scraping tool.

***

### Configuring Your Run

Drop this into your `input.json` to get started:

```json
{
  "profile_ids": [
    "Mastodon",
    "warandpeas",
    "user@instance.social"
  ]
}
```

| Parameter | Required | What It Does |
|---|---|---|
| `profile_ids` | ✅ | A list of Mastodon handles to scrape. Examples include `Mastodon` and `dataforleads@gmail.com`. |

***

### Core Capabilities

#### Bulk profile processing from a handle list

Mastodon Profile Scraper is designed to turn many handles into many structured results in one run. It’s a straightforward Mastodon profile URL scraper workflow for anyone who needs automated Mastodon profile scraping without manual browsing.

#### Accurate profile metadata from the Mastodon API

For each handle, the actor fetches profile metadata via Mastodon’s account lookup endpoint. The returned objects include key account details like display name, bio text (`note`), and follower metrics.

#### Resilience with clear failure outputs

When a handle can’t be fetched, the actor returns an error object that includes the `profile_id` and a status-style message. This keeps your Mastodon user profile scraper outputs audit-friendly and easier to debug.

#### Real-time dataset writing during the run

Results are pushed as they’re processed, so you don’t have to wait for the entire batch to finish before exporting. This makes Mastodon profile crawler runs more dependable for iterative workflows.

#### Automation-ready for research pipelines

Because outputs are JSON records written to your dataset, you can integrate them into ETL jobs, lead enrichment, or analytics tooling. This is a practical Mastodon API profile scraper approach for repeatable data collection.

***

### Who Gets the Most Out of This

Mastodon Profile Scraper helps teams that already have a list of Mastodon accounts and want structured enrichment fast. For example, **growth teams** can convert handle lists into clean datasets containing bios and follower metrics to prioritize outreach. **Community managers** can quickly audit who’s active and how the audience is distributed by analyzing follower and posting volume across accounts. **Sales development reps** can turn discovered Mastodon accounts into organized records they can feed into lead scoring or CRM enrichment workflows. **Freelance researchers** can use the exported profile metadata as evidence-friendly inputs for reports and segmentation. For **developers and data engineers**, the consistent dataset output supports automation—pull once, store, and then join with other sources for analysis.

***

### Step-by-Step: How to Use It

No coding needed. Here's how to run Mastodon Profile Scraper from start to finish:

1. **Open** the actor on Apify — start from the actor page and click **Run**: <https://console.apify.com>
2. **Enter** your inputs in `profile_ids` (a list of Mastodon handles like `Mastodon` or `dataforleads@gmail.com`)
3. **Configure proxy settings** for reliable scraping (recommended for larger batches)
4. **Hit Run** and watch the live log for progress and any per-profile warnings
5. **View** results in the dataset tab as records are pushed during processing
6. **Export** your dataset as JSON, CSV, or Excel directly from the Apify dashboard

The whole process takes under 5 minutes to set up.

***

### Integrations & Export Options

Once your data is collected, Mastodon Profile Scraper plugs directly into your existing workflow. Download your results in common formats from the Apify dataset tab (JSON, CSV, Excel), or connect your dataset to other tools via Apify’s native integrations and automation platforms.

You can also use Apify API access to pull results programmatically from your run, and set up webhooks or scheduled runs so your Mastodon profile scraping tool can run automatically when you need fresh data.

***

### Pricing & Free Trial

Mastodon Profile Scraper runs on the Apify platform, which offers a **free tier** — no credit card required to get started. Apify provides free credits for initial experimentation, then you can scale with pay-as-you-go billing based on platform compute usage. For teams running heavier workflows, Apify subscription plans may be available for more predictable scaling. Start for free at [apify.com](https://apify.com) and scale when you’re ready.

***

### Reliability & Performance

| What We Handle | How |
|---|---|
| Rate limits and access variability | Uses built-in request handling and proxy support for reliability |
| Cross-instance handle lookups | Includes fallback logic to improve fetch success across instances |
| Fetch failures per handle | Returns an error object for the specific `profile_id` that fails |
| Batch processing stability | Processes each profile and writes results as it goes for partial-run resilience |

**Limitations:** Mastodon Profile Scraper only retrieves profile metadata that’s accessible through the public Mastodon account lookup process. If a handle can’t be fetched, you’ll see an error object for that `profile_id`. For enterprise-scale automation, contact us to discuss custom configurations.

For enterprise-scale runs, contact us to discuss custom configurations.

***

### Frequently Asked Questions

#### Is there a free plan or trial?

Yes. Apify offers a free tier with credits for getting started, so you can test Mastodon profile scraper outputs without committing upfront.

#### Do I need to log in to Mastodon to use this?

No. This actor fetches profile metadata for handles using public account lookup access, so you don’t need a Mastodon login or session.

#### How accurate is the data?

The data accuracy depends on what the account owner has published in their profile metadata. The actor returns structured results from the account lookup response for each handle, including bios and follower metrics.

#### How many results can I get per run?

Your results correspond to the number of handles you provide in `profile_ids`. The actor processes each one and pushes its result to the dataset as it completes.

#### How often is the data updated / how fresh is it?

Data freshness matches the time you run the actor. If you need updates, schedule or re-run the actor to refresh the profile metadata.

#### Is this legal? Does it comply with GDPR / CCPA?

You should use the output in a way that complies with applicable laws and platform rules. The actor works with **publicly available data**, but compliance decisions (including GDPR/CCPA and any consent requirements) are ultimately your responsibility.

#### Can I export results to Google Sheets or Excel?

Yes. You can export from the Apify dashboard as JSON, CSV, or Excel, and then import into tools like Google Sheets or your preferred spreadsheet/CRM workflow.

#### Can I run this on a schedule automatically?

Yes. You can use Apify’s scheduling capabilities to run the actor automatically on a cadence you choose, so your Mastodon profile scraping tool keeps data up to date.

#### Can I access this via API?

Yes. You can trigger and retrieve run results via the Apify API. For details, refer to the Apify API documentation at <https://apify.com/docs/api>.

#### What happens if the actor hits an error?

If fetching a specific profile fails, the actor returns an error object for that `profile_id` while continuing the rest of the run. This way you still get partial results instead of losing everything.

***

### Need Help or Have a Request?

Got a question about Mastodon Profile Scraper or want a new feature added? Reach out at <dataforleads@gmail.com>. Share what you’re trying to build (for example, exporting to a specific format or adding an enrichment step), and we’ll respond with guidance. This actor is actively maintained based on user feedback—send your request and we’ll take a look.

***

### Disclaimer & Responsible Use

*Mastodon Profile Scraper is the fastest, most reliable way to collect Mastodon profile metadata at scale — start your free run today.*

This actor collects **publicly available data** from Mastodon profile lookups. It does not access private accounts, login-gated content, or password-protected pages. You’re responsible for using the data in compliance with GDPR, CCPA, platform Terms of Service, and any applicable local regulations. For data-removal requests, contact <dataforleads@gmail.com>. Use responsibly, ethically, and only for lawful purposes.

# Actor input Schema

## `profile_ids` (type: `array`):

List of Mastodon handles (e.g. 'Mastodon' or 'user@instance.social') to scrape.

## Actor input object example

```json
{
  "profile_ids": [
    "Mastodon",
    "warandpeas"
  ]
}
```

# 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 = {
    "profile_ids": [
        "Mastodon",
        "warandpeas"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraperoka/mastodon-profile-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 = { "profile_ids": [
        "Mastodon",
        "warandpeas",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("scraperoka/mastodon-profile-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 '{
  "profile_ids": [
    "Mastodon",
    "warandpeas"
  ]
}' |
apify call scraperoka/mastodon-profile-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Mastodon Profile Scraper",
        "description": "🧾 Mastodon Profile Scraper pulls public user profile data from Mastodon—bios, links, followers & more. 🚀 Great for community research, outreach, and lead generation. 🔍 Fast, reliable, and privacy-aware. 📈 Turn profiles into actionable insights!",
        "version": "0.1",
        "x-build-id": "mQIApGSjvMh2Edno3"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scraperoka~mastodon-profile-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scraperoka-mastodon-profile-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/scraperoka~mastodon-profile-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scraperoka-mastodon-profile-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/scraperoka~mastodon-profile-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scraperoka-mastodon-profile-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",
                "required": [
                    "profile_ids"
                ],
                "properties": {
                    "profile_ids": {
                        "title": "Profile IDs",
                        "type": "array",
                        "description": "List of Mastodon handles (e.g. 'Mastodon' or 'user@instance.social') to scrape.",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
