Skip to the content

Scraper API

Mastodon

mastodon.postsAvailable

Mastodon posts of an account

Its public posts, newest first: text, time, counts, hashtags, links, media, polls and boosts.

Give it a Mastodon account, and optionally how many posts, which kind, and where to continue.

1 unit a record, for runs that return data. Runs that fail cost nothing. How units work

Counted
1 unit a record
Inputs
5, 1 required
Record
30 fields
A run takes
up to 5 minutes
Records kept
7 days
Measured
its success, on the status page

POST/v1/scrapers/mastodon.posts/runs

{
"input": {
"account": "@Mastodon@mastodon.social",
"max_posts": 3
}
}

sent, and answered

a record of the run30 fields

{
id: "117625790631441803"
uri: "https://mastodon.social/users/Mastodon/statuses/117625790631441803"
url: "https://mastodon.social/@Mastodon/117625790631441803"
server: "mastodon.social"
text: "Update on #Plushtodon pre-orders: The plushies are going through Germa…
content_warning: null
sensitive: false
language: "en"
visibility: "public"
… 21 more fields

ok1 unit a record

A record this scraper returned for this input. The first 9 of its 30 fields are set down here; the whole record is below.

mastodon.social
The page Mastodon posts of an account reads, as a browser shows it
The page this scraper reads, photographed in a browser on 19 November 2026. It belongs to its publisher, who has no part in this service.

What it is used for

Read an account's posts
The public posts of a Mastodon account, newest first: text, links, media, hashtags and counts of replies, boosts and favourites.
Follow announcements
Run it on a schedule for the accounts you watch and pass on the posts whose id you have not seen.
See what lands
Sort an account's posts by boost_count and favourite_count to see which ones its readers responded to.

What you send

A Mastodon account, and optionally how many posts, which kind, and where to continue. These are its 5 inputs, as its schema has them.

accountstring Required
The account as @user@server, e.g. @Mastodon@mastodon.social, or its profile address (https://mastodon.social/@Mastodon).
max_postsinteger Optional
How many posts to return, newest first: 1 to 400.Default 40
includestring Optional
posts: the account's own posts and boosts. posts_and_replies: those and its replies. media: only its posts with images, video or audio.Default posts
include_boostsboolean Optional
False leaves out the posts of others that the account boosted.Default true
cursorstring Optional
Continue an earlier run: the next_cursor it reported.

A request, ready to send

It starts a run with the input shown at the top of this page, waits up to 60 seconds for it, and reads its records. Put your key in the variable it reads.

# Start a run and wait up to 60 seconds for it to finish
curl -X POST "https://api.enrichednow.com/v1/scrapers/mastodon.posts/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"account":"@Mastodon@mastodon.social","max_posts":3}}'

# Read its records, with the id the first call answered
curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY"
from enrichednow import EnrichedNow

client = EnrichedNow()  # reads ENRICHEDNOW_API_KEY

# Start a run, wait for it to end, and get its records
result = client.scrape("mastodon.posts", {
    "account": "@Mastodon@mastodon.social",
    "max_posts": 3,
})
print(result.run.id, result.run.status, result.run.record_count)

# Read its records: pages are fetched as you go
for record in result.records:
    print(record)

Install it with pip install enrichednow, then save as run.py and run python3 run.py

import EnrichedNow from "enrichednow";

const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY

// Start a run, wait for it to end, and get its records
const { run, records } = await client.scrape("mastodon.posts", {
  account: "@Mastodon@mastodon.social",
  max_posts: 3,
});
console.log(run.id, run.status, run.record_count);

// Read its records: pages are fetched as you go
for await (const record of records) console.log(record);

Install it with npm install enrichednow, then save as run.mjs and run node run.mjs

package main

import (
	"context"
	"fmt"
	"log"
	"time"

	enrichednow "github.com/enrichednow/enrichednow-go"
)

func main() {
	client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
	if err != nil {
		log.Fatal(err)
	}
	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
	defer cancel()

	// Start a run, wait for it to end, and get its records
	run, records, err := client.Scrape(ctx, "mastodon.posts", map[string]any{"account": "@Mastodon@mastodon.social", "max_posts": 3})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(run.ID, run.Status, run.RecordCount)

	// Read its records: pages are fetched as you go
	for records.Next() {
		fmt.Println(string(records.Current()))
	}
	if err := records.Err(); err != nil {
		log.Fatal(err)
	}
}

Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go

import com.enrichednow.EnrichedNowClient;
import com.enrichednow.ScrapeResult;
import java.util.Map;

public class Run {
    public static void main(String[] args) {
        EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY

        // Start a run, wait for it to end, and get its records
        ScrapeResult result = client.scrape("mastodon.posts", Map.of("account", "@Mastodon@mastodon.social", "max_posts", 3));
        System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());

        // Read its records: pages are fetched as you go
        for (Map<String, Object> record : result.records()) {
            System.out.println(record);
        }
    }
}

Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java

enrichednow run mastodon.posts --input account=@Mastodon@mastodon.social --input max_posts=3

Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh

What comes back

Its public posts, newest first: text, time, counts, hashtags, links, media, polls and boosts. A record has 30 fields. One we could not read is null, never an empty string or a zero.

A record mastodon.posts returned
{
  "id": "117625790631441803",
  "uri": "https://mastodon.social/users/Mastodon/statuses/117625790631441803",
  "url": "https://mastodon.social/@Mastodon/117625790631441803",
  "server": "mastodon.social",
  "text": "Update on #Plushtodon pre-orders: The plushies are going through German customs on the way to our warehouse, after which they’ll start getting shipped out. Unfortunately we could not meet the early November deadline that we promised due to … [truncated]",
  "content_warning": null,
  "sensitive": false,
  "language": "en",
  "visibility": "public",
  "created_at": "2026-11-16T11:05:27.567000Z",
  "edited_at": null,
  "author_acct": "Mastodon@mastodon.social",
  "author_name": "Mastodon",
  "author_url": "https://mastodon.social/@Mastodon",
  "author_bot": false,
  "reply_count": 4,
  "boost_count": 66,
  "favourite_count": 131,
  "quote_count": 0,
  "hashtags": [
    "plushtodon"
  ],
  "mentions": [],
  "links": [
    "https://shop.joinmastodon.org/products/pre-order-mastodon-plushie-20cm-plushtodon"
  ],
  "media": [],
  "link_card": {
    "url": "https://shop.joinmastodon.org/products/pre-order-mastodon-plushie-20cm-plushtodon",
    "title": "PRE-ORDER Mastodon plushie 20cm - Plushtodon",
    "description": null,
    "image_url": "https://files.mastodon.social/cache/preview_cards/images/209/240/375/original/ff24843e2838e595.jpg",
    "provider": null
  },
  "poll": null,
  "quoted_post_url": null,
  "reply_to_id": null,
  "boosted_by_acct": null,
  "boosted_at": null,
  "fetched_at": "2026-11-19T18:07:40.968072Z"
}

The scraper returned this record for the input above, reading a saved copy of the page, not the live site.

Values shortened for this page: text: 446 characters, the first 239 shown.

The fields of a record

idstring
The post's id on the server that answered.
uristring or null
The post's permanent id on the network, on the server it was written on.
urlstring or null
The post's address on the web.
serverstring
The server that answered, e.g. mastodon.social.
textstring or null
The post's text, links written out; null for a post that is only media.
content_warningstring or null
The warning the author put in front of the text, when there is one.
sensitiveboolean
True when the author marked the media as sensitive.
languagestring or null
The language the post is marked with, e.g. en.
visibilitystring or null
public or unlisted: the only posts a visitor who is not signed in is shown.
created_atdatetime or null
When it was posted, in UTC.
edited_atdatetime or null
When it was last edited, in UTC; null when it never was.
author_acctstring or null
The author's full address, user@server.
author_namestring or null
The author's display name.
author_urlstring or null
The author's profile address.
author_botboolean or null
True when the author's account says it is automated.
reply_countinteger or null
Number of replies the answering server knows of.
boost_countinteger or null
Number of boosts (reposts) the answering server knows of.
favourite_countinteger or null
Number of favourites the answering server knows of.
quote_countinteger or null
Number of posts that quote this one; null where the server does not say.
hashtagslist of strings
The hashtags of the post, without the #, lower case.
mentionslist of strings
The accounts the post mentions, as user@server.
linkslist of strings
The full addresses of the links in the text, in order, without mentions and hashtags.
medialist of objects
The post's images, videos and audio, in order.Each holds type, url, preview_url, alt_text, width, height, duration_s.
link_cardobject or null
The preview card of a link in the post, when the server made one.Holds url, title, description, image_url, provider.
pollobject or null
The post's poll, when it has one.Holds options, votes, voters, multiple, expires_at, expired.
quoted_post_urlstring or null
The address of the post this one quotes, when it quotes one.
reply_to_idstring or null
The id, on the answering server, of the post this one replies to; null when it is not a reply.
boosted_by_acctstring or null
In an account's posts: the account that boosted this post, when it is listed as a boost.
boosted_atdatetime or null
When it was boosted, in UTC.
fetched_atdatetime
When the answer was read, in UTC.

The whole schema, in its reference

Units and limits

Counted per record
Billed per record: a run that returns data costs 1 unit for each record it returns.
A miss costs nothing
A run that fails, that meets something not supported yet, or that you cancel costs nothing. You pay for runs that return data.
What bounds a run
A run may take up to 5 minutes. Its records are read in pages of up to 1,000 and are kept for 7 days.

What it does not do

  • Up to 400 posts a run; the run reports where to continue.
  • Only public and unlisted posts are read.
  • Counts are those the account's own server knows of.

The bounds its schema sets

max_posts
1 to 400; 40 unless you say otherwise
include
posts, posts_and_replies, media; posts unless you say otherwise

Scraper API pricing: how units workThe five ways a run ends

Questions

What does Mastodon posts of an account return?

Its public posts, newest first: text, time, counts, hashtags, links, media, polls and boosts. A record has 30 fields, among them id, uri, url, server, text and content_warning. A value that could not be read is null, never an empty string or a zero.

What do I send?

A Mastodon account, and optionally how many posts, which kind, and where to continue. The input account is required. Optional: max_posts, include, include_boosts and cursor.

How is it counted?

Billed per record: a run that returns data costs 1 unit for each record it returns. A run that fails, that meets something not supported yet, or that you cancel costs nothing. The first 1,000 units each month are free.

How much does one run return?

Its schema sets these bounds: max_posts 1 to 400 (40 unless you say otherwise); include posts, posts_and_replies, media (posts unless you say otherwise). A run may take up to 5 minutes.

What does it not do?

Up to 400 posts a run; the run reports where to continue. Only public and unlisted posts are read. Counts are those the account's own server knows of.

How long are the records kept, and in what format do they come?

Records are kept for 7 days after the run ended, and read in pages of up to 1,000. They come as JSON, as NDJSON with one record a line, or as CSV with a column for each field.

Can an AI assistant call it?

Yes. Through the EnrichedNow MCP server an assistant calls the tool run_scraper with the scraper_id mastodon.posts and the same input. It costs what the same API call costs.

Mastodon

Public Mastodon accounts, their posts, a post's replies and a hashtag's posts, on any Mastodon server, as a visitor who is not signed in sees them.

  • Mastodon profile

    mastodon.profile

    A Mastodon account as @user@server, or its profile address. Its names, bio, profile fields, pictures, follower, following and post counts, dates and the owner's own settings.

  • Mastodon post

    mastodon.post

    A Mastodon post's address. The post: text, time, author, reply, boost, favourite and quote counts, hashtags, links, media and poll.

  • A Mastodon post's address, and optionally how many replies. The post, then the replies under it, each with text, author, time, counts and the post it answers.

  • Mastodon hashtag

    mastodon.hashtag

    A hashtag and a Mastodon server, and optionally only its own users' posts and how many. The public posts with that hashtag the server knows, newest first: text, author, time, counts, links and media.

Mastodon on the line-up

Where
Worldwide

Run it on an input of your own.

Create an account, make a key, and send the request above with your own input. The first 1,000 units each month are free.