# Mastodon Status Detail Scraper (`xtracto/mastodon-status-detail-scraper`) Actor

Fetch a Mastodon status (post) by URL with optional reply context.

- **URL**: https://apify.com/xtracto/mastodon-status-detail-scraper.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Mastodon Status Detail Scraper

Fetch the full detail of any Mastodon status (toot) by URL — text, media, favourites, reblogs, replies count, and the optional reply thread — across any Fediverse instance.

### Why use this actor

- **No account / no login required** — works against any public Mastodon instance, just paste the status URL.
- **Full status content** — the original HTML body, language, visibility, edited timestamp, sensitive flag, content warning, mentions, hashtags, and the attached application.
- **Media attachments** — every image, video, audio, or GIF on the toot with its CDN URL, preview URL, type, dimensions, and alt-text description.
- **Reply thread in one call** — set `includeContext: true` and you get the full ancestors chain and descendant replies attached as `_context`, perfect for archiving discussions.
- **Engagement counters** — `favourites_count`, `reblogs_count`, `replies_count`, and `quotes_count` straight from the source instance.
- **Stable JSON output** — every row carries `_input`, `_instance`, `_source`, `_scrapedAt` so you can join results back to your input list and audit which instance served the data.

### How it works

1. You provide a list of Mastodon status URLs (e.g. `https://mastodon.social/@Gargron/116591902390182432`).
2. The actor reads the host instance from the URL and asks that instance for the toot the same way the web app does, then attaches the reply thread when `includeContext` is on.
3. Results stream into your dataset, ready to download as JSON, CSV, or Excel.

You do not need to manage scrapers, browsers, or rotating IPs — all handled internally.

### Input

```json
{
  "statuses": [
    "https://mastodon.social/@Gargron/116591902390182432",
    "https://mastodon.social/@Gargron/116573430454779827"
  ],
  "instance": "mastodon.social",
  "includeContext": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["DATACENTER"]
  }
}
```

| Field | Type | Description |
|---|---|---|
| `statuses` | array | List of Mastodon status URLs to scrape. Use the full canonical URL `https://instance.tld/@user/status_id`. Bare numeric IDs are also accepted when `instance` is set. |
| `instance` | string | Default Mastodon instance hostname (without `https://`). Only used when an input is a bare status ID instead of a full URL. |
| `accessToken` | string | Optional access token for instances that require authentication. Leave blank for public Fediverse toots. |
| `includeContext` | boolean | When `true` (default), each record carries `_context.ancestors` (parent chain) and `_context.descendants` (replies). |
| `proxyConfiguration` | object | Apify Proxy settings. Datacenter proxy works for most public instances. |

### Output

Input: `https://mastodon.social/@Gargron/116591902390182432`

```json
{
  "id": "116591902390182432",
  "created_at": "2026-05-17T20:54:04.971Z",
  "in_reply_to_id": "116591878874980653",
  "in_reply_to_account_id": "115576270601199442",
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": "de",
  "uri": "https://mastodon.social/users/Gargron/statuses/116591902390182432",
  "url": "https://mastodon.social/@Gargron/116591902390182432",
  "replies_count": 1,
  "reblogs_count": 5,
  "favourites_count": 30,
  "quotes_count": 0,
  "edited_at": null,
  "content": "<p><span class=\"h-card\" translate=\"no\"><a href=\"https://mastodon.social/@AwetTesfaiesus\" class=\"u-url mention\">@<span>AwetTesfaiesus</span></a></span> Stört mich nur dass bei Bluesky immer die Zahl der registrierten Konten angegeben wird, und nicht die monatlich aktive Nutzerzahl. ...</p>",
  "reblog": null,
  "application": { "name": "Web", "website": null },
  "account": {
    "id": "1",
    "username": "Gargron",
    "acct": "Gargron",
    "display_name": "Eugen Rochko",
    "url": "https://mastodon.social/@Gargron",
    "avatar": "https://files.mastodon.social/accounts/avatars/000/000/001/original/a0a49d80c3de5f75.png",
    "followers_count": 380126,
    "following_count": 711,
    "statuses_count": 81382,
    "last_status_at": "2026-05-17"
  },
  "media_attachments": [],
  "mentions": [
    {
      "id": "115576270601199442",
      "username": "AwetTesfaiesus",
      "url": "https://mastodon.social/@AwetTesfaiesus",
      "acct": "AwetTesfaiesus"
    }
  ],
  "tags": [],
  "emojis": [],
  "quote": null,
  "card": null,
  "poll": null,
  "_context": {
    "ancestors": [
      {
        "id": "116591878874980653",
        "created_at": "2026-05-17T20:48:06.165Z",
        "url": "https://mastodon.social/@AwetTesfaiesus/116591878874980653",
        "content": "<p>Es kommt nicht auf die Größe an. #mastodon #fediverse Tagesschau</p>",
        "replies_count": 8,
        "reblogs_count": 18,
        "favourites_count": 42,
        "account": { "username": "AwetTesfaiesus", "display_name": "Awet Tesfaiesus, MdB" },
        "media_attachments": [
          {
            "id": "116591867934036051",
            "type": "image",
            "url": "https://files.mastodon.social/media_attachments/files/116/591/867/934/036/051/original/e19f2e90c62e68df.jpeg",
            "meta": { "original": { "width": 757, "height": 307 } }
          }
        ]
      }
    ],
    "descendants": [
      {
        "id": "116592105338871552",
        "url": "https://mastodon.social/@AwetTesfaiesus/116592105338871552",
        "content": "<p>...</p>",
        "favourites_count": 6,
        "account": { "username": "AwetTesfaiesus" }
      }
    ]
  },
  "_input": "https://mastodon.social/@Gargron/116591902390182432",
  "_instance": "mastodon.social",
  "_source": "S1-api",
  "_scrapedAt": "2026-05-18T11:13:57.029611+00:00"
}
```

| Field | Type | Description |
|---|---|---|
| `_input` | string | The status URL exactly as you supplied it. Use this to join results back to your input list. |
| `_instance` | string | Hostname of the Mastodon instance that served this record (e.g. `mastodon.social`). |
| `_source` | string | Internal tag for the path used to fetch the record. `S1-api` is the primary, fastest path. |
| `_scrapedAt` | string | ISO-8601 UTC timestamp when the record was scraped. |
| `id` | string | The status ID on its home instance. |
| `created_at` | string | When the toot was posted (ISO-8601). |
| `edited_at` | string | When the toot was last edited, or `null` if never edited. |
| `url` | string | Canonical URL of the toot. |
| `uri` | string | ActivityPub URI used in federation. |
| `visibility` | string | `public`, `unlisted`, `private`, or `direct`. |
| `sensitive` | boolean | `true` when the author marked the toot as sensitive. |
| `spoiler_text` | string | Content-warning text shown before the body, or empty string. |
| `language` | string | ISO 639 language tag set by the author (e.g. `en`, `de`). |
| `content` | string | The toot body as HTML. Mentions, hashtags, and links are inline anchors. |
| `replies_count` | integer | Number of direct replies the home instance has seen. |
| `reblogs_count` | integer | Number of reblogs (boosts). |
| `favourites_count` | integer | Number of favourites (likes). |
| `quotes_count` | integer | Number of quotes (when the instance supports quoting). |
| `in_reply_to_id` | string | ID of the toot this one replies to, or `null`. |
| `in_reply_to_account_id` | string | Account ID being replied to, or `null`. |
| `reblog` | object | The original toot when this record is itself a reblog, otherwise `null`. |
| `application` | object | Client app used to post (`name`, `website`). |
| `account` | object | The author profile (username, display name, avatar, follower/following counts, statuses count, …). |
| `media_attachments` | array | Each item has `id`, `type` (`image`/`video`/`gifv`/`audio`), `url`, `preview_url`, and `meta` with dimensions. Empty array when no media. |
| `mentions` | array | Accounts mentioned in the body — `id`, `username`, `acct`, `url`. |
| `tags` | array | Hashtags used in the body — `name`, `url`. |
| `emojis` | array | Custom emoji shortcodes used in the body and their image URLs. |
| `quote` | object | The quoted toot when this record quotes another, otherwise `null`. |
| `card` | object | Link preview card (title, description, image, provider) when the toot links out, otherwise `null`. |
| `poll` | object | Poll attached to the toot (options, vote counts, expiry), otherwise `null`. |
| `_context` | object | Present when `includeContext` is on. Contains `ancestors` (parent chain) and `descendants` (reply tree), each an array of status objects with the same shape as the top-level record. |

#### Error envelope

Statuses that don't exist or fail to fetch return a structured error instead of crashing the run:

```json
{
  "_input": "https://mastodon.social/@Gargron/110000000000000000",
  "_instance": "mastodon.social",
  "_statusId": "110000000000000000",
  "_error": "not_found",
  "_errorDetail": "NotFound https://mastodon.social/api/v1/statuses/110000000000000000",
  "_source": "S1-api",
  "_scrapedAt": "2026-05-18T11:14:02.001234+00:00"
}
```

Filter on `_error` to triage failed rows. Possible values: `not_found`, `invalid_input`, `fetch_failed`, `exception`.

### Pricing

This actor is billed per result: **$1.50 per 1,000 statuses**. Each successful status = 1 result. Errors (not-found, unreachable instance) are not billed.

### Other Sosmed Actors

| Platform | Actor | Best for |
|---|---|---|
| Mastodon | [Mastodon Account Scraper](https://apify.com/xtracto/mastodon-account-scraper) | Profile data, follower counts, recent toots for a Fediverse account |
| Bluesky | [Bluesky Post Detail Scraper](https://apify.com/xtracto/bluesky-post-detail-scraper) | Full post detail + thread on atproto |
| Threads | [Threads Post Detail Scraper](https://apify.com/xtracto/threads-post-detail-scraper) | Post text, media, replies for a Threads URL |
| X / Twitter | [X Post Detail Scraper](https://apify.com/xtracto/x-post-detail-scraper) | Tweet text, media, engagement metrics |
| Reddit | [Reddit Post Detail Scraper](https://apify.com/xtracto/reddit-post-detail-scraper) | Submission body, comments, vote counts |
| Tumblr | [Tumblr Post Detail Scraper](https://apify.com/xtracto/tumblr-post-detail-scraper) | Post HTML, tags, notes on Tumblr |

Browse the full catalog at [apify.com/xtracto](https://apify.com/xtracto).

### Notes

- The actor fetches data from the **home instance of the toot** (parsed from the URL). Per-instance rate limits and policies therefore apply — high-traffic instances like `mastodon.social` are generous; smaller instances may be slower.
- `includeContext` is optional. Disable it when you only need the toot itself and want lower latency and smaller dataset rows.
- Reply threads pulled from a federated instance can be partial: an instance only shows the replies it has actually received from the rest of the Fediverse. For the most complete thread, point the URL at the toot's home instance.
- For instances that require authentication to read public toots, supply an `accessToken` from that instance's developer settings.
- Counters (`favourites_count`, `reblogs_count`, `replies_count`) are eventually-consistent and may lag the live network by a few minutes as the Fediverse syncs.

# Actor input Schema

## `statuses` (type: `array`):

List of Mastodon status (toot) URLs to scrape. Use the full canonical URL in the form 'https://instance.tld/@user/status_id'.

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

Default Mastodon instance hostname (without 'https://'). Only used when an entry is a bare status ID instead of a full URL. Leave blank if every input is already a full URL.

## `accessToken` (type: `string`):

Optional access token for instances that require authentication to read public statuses. Leave blank for the public Fediverse — most instances do not need this.

## `includeContext` (type: `boolean`):

When enabled, each status record carries a '\_context' field with the parent thread (ancestors) and replies (descendants).

## `proxyConfiguration` (type: `object`):

Apify Proxy settings. Datacenter proxy works fine for most public Mastodon instances.

## Actor input object example

```json
{
  "statuses": [
    "https://mastodon.social/@Gargron/116591902390182432",
    "https://mastodon.social/@Gargron/116573430454779827"
  ],
  "instance": "mastodon.social",
  "includeContext": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `id` (type: `string`):

Unique identifier of the item at the source.

## `created_at` (type: `string`):

Created at as reported by the source.

## `in_reply_to_id` (type: `string`):

In reply to id as reported by the source.

## `in_reply_to_account_id` (type: `string`):

In reply to account id as reported by the source.

## `sensitive` (type: `string`):

Sensitive as reported by the source.

## `spoiler_text` (type: `string`):

Spoiler text as reported by the source.

## `visibility` (type: `string`):

Visibility as reported by the source.

## `language` (type: `string`):

Language code of the item.

## `uri` (type: `string`):

Resource identifier at the source.

## `url` (type: `string`):

Direct link to the scraped item.

## `replies_count` (type: `string`):

Replies count. Whole number.

## `reblogs_count` (type: `string`):

Reblogs count. Whole number.

## `favourites_count` (type: `string`):

Favourites count. Whole number.

## `quotes_count` (type: `string`):

Quotes count. Whole number.

## `edited_at` (type: `string`):

Edited at as reported by the source.

## `content` (type: `string`):

Main body text.

## `reblog` (type: `string`):

Reblog as reported by the source.

## `application` (type: `string`):

Application as reported by the source.

## `account` (type: `string`):

Account. Whole number.

## `media_attachments` (type: `string`):

Media attachments.

## `mentions` (type: `string`):

Mentions.

## `tags` (type: `string`):

Tags or keywords. List of values.

## `emojis` (type: `string`):

Emojis.

## `quote` (type: `string`):

Quote as reported by the source.

## `card` (type: `string`):

Card as reported by the source.

## `poll` (type: `string`):

Poll as reported by the source.

## `_context` (type: `string`):

Context as reported by the source.

## `_input` (type: `string`):

The input value this row was produced from.

## `_instance` (type: `string`):

Instance as reported by the source.

## `_source` (type: `string`):

Which extraction strategy produced the row.

## `_scrapedAt` (type: `string`):

UTC timestamp of the scrape, ISO 8601.

## `_statusId` (type: `string`):

Status Id as reported by the source.

# 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 = {
    "statuses": [
        "https://mastodon.social/@Gargron/116591902390182432",
        "https://mastodon.social/@Gargron/116573430454779827"
    ],
    "instance": "mastodon.social"
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/mastodon-status-detail-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 = {
    "statuses": [
        "https://mastodon.social/@Gargron/116591902390182432",
        "https://mastodon.social/@Gargron/116573430454779827",
    ],
    "instance": "mastodon.social",
}

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

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

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

```

## CLI example

```bash
echo '{
  "statuses": [
    "https://mastodon.social/@Gargron/116591902390182432",
    "https://mastodon.social/@Gargron/116573430454779827"
  ],
  "instance": "mastodon.social"
}' |
apify call xtracto/mastodon-status-detail-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xtracto/mastodon-status-detail-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/bCZw1GktrxOGXD9Zk/builds/s0RPQyPna534XPzAy/openapi.json
