# Collect #rust posts from Mastodon and Fosstodon

**Use case:** 

Collects the newest public posts tagged #rust from mastodon.social and fosstodon.org, with text, author, date, language, boosts, favourites, replies and links, plus a 7 day usage stats row per hashtag and server. Good for developer community research and social listening. Swap in any hashtag or Mastodon server.

## Input

```json
{
  "hashtags": [
    "rust"
  ],
  "accounts": [
    "@Mastodon@mastodon.social"
  ],
  "includeThread": false,
  "timelines": [],
  "trendingTags": false,
  "searchType": "accounts",
  "instances": [
    "mastodon.social",
    "fosstodon.org"
  ],
  "maxPostsPerSource": 15,
  "includeProfiles": true,
  "includeHashtagStats": true,
  "keywordMatch": "contains",
  "includeReplies": true,
  "includeBoosts": true,
  "onlyMedia": false,
  "respectOptOuts": true,
  "maxPagesPerSource": 50,
  "maxItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

## Output

```json
{
  "source": {
    "label": "Source",
    "format": "text"
  },
  "authorAcct": {
    "label": "Author",
    "format": "text"
  },
  "url": {
    "label": "Link",
    "format": "link"
  },
  "createdAt": {
    "label": "Date",
    "format": "date"
  },
  "text": {
    "label": "Text",
    "format": "text"
  },
  "repliesCount": {
    "label": "Replies",
    "format": "number"
  },
  "reblogsCount": {
    "label": "Boosts",
    "format": "number"
  },
  "favouritesCount": {
    "label": "Favourites",
    "format": "number"
  },
  "language": {
    "label": "Language",
    "format": "text"
  },
  "hashtags": {
    "label": "Hashtags",
    "format": "array"
  },
  "mentions": {
    "label": "Mentions",
    "format": "array"
  },
  "imageUrls": {
    "label": "Images",
    "format": "array"
  },
  "videoUrls": {
    "label": "Videos",
    "format": "array"
  },
  "links": {
    "label": "Links",
    "format": "array"
  },
  "isReply": {
    "label": "Reply",
    "format": "boolean"
  },
  "isBoost": {
    "label": "Boost",
    "format": "boolean"
  },
  "boostedBy": {
    "label": "Boosted by",
    "format": "text"
  },
  "authorFollowersCount": {
    "label": "Author followers",
    "format": "number"
  },
  "matchedKeywords": {
    "label": "Matched keywords",
    "format": "array"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Mastodon Scraper: Posts, Hashtags, Profiles, Trends Actor is ready to run with the inputs already set for "Collect #rust posts from Mastodon and Fosstodon". [Sign up or log in](https://console.apify.com/create-task-from-example/MszvjuBvbEIKujaWU) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Collect #rust posts from Mastodon and Fosstodon" task

The Mastodon Scraper: Posts, Hashtags, Profiles, Trends Actor will start running based on the input automatically. You can also change all the input fields, like hashtags, accounts, and more, to match your specific use case.

### 3. Receive the "Collect #rust posts from Mastodon and Fosstodon" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as source, author, link, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Collect #rust posts from Mastodon and Fosstodon" task via API](https://apify.com/zhtech/mastodon-scraper.md).

## FAQ

### What does the Mastodon rust hashtag task return?

The Mastodon rust hashtag task saves one row per post (text, author, server, date, language, boosts, favourites, replies, media, links, URL) and one stats row per hashtag and server with uses per day.

### How do I follow another hashtag or server?

In the Mastodon rust hashtag task, replace rust with any hashtag and edit Instances, for example infosec.exchange for security or scholar.social for research. Each hashtag is read on each server.

### Can I get new posts every hour?

The Mastodon rust hashtag task can run hourly on an Apify schedule with Oldest post date set to 1 hour, so each run returns only the latest posts for alerts in Slack or email.

### Does the Mastodon rust hashtag task respect user opt outs?

The Mastodon rust hashtag task uses each server's public API and skips accounts that opted out of indexing (noindex, #nobot or #noindex in the bio), with no login.

### How much does the Mastodon rust hashtag task cost?

The Mastodon rust hashtag task uses pay per event pricing: a small start fee plus a fixed price per post or hashtag row saved, with no charge for compute time. Small runs like this fit the Apify free plan credit.

## About this Actor

This example demonstrates how to use [Mastodon Scraper: Posts, Hashtags, Profiles, Trends](https://apify.com/zhtech/mastodon-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/zhtech/mastodon-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/zhtech/mastodon-scraper.md

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`).
