# Lemmy Scraper – Posts, Comments & Communities (Fediverse) (`devteamdrew/lemmy-scraper`) Actor

Search Lemmy posts, comments and communities or export a community's posts from any instance via the public Lemmy API. Fediverse Reddit-alternative data, LLM-ready, pay per result.

- **URL**: https://apify.com/devteamdrew/lemmy-scraper.md
- **Developed by:** [Andrew Moffat](https://apify.com/devteamdrew) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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

## Lemmy Scraper – Posts, Comments & Communities (Fediverse)

Search Lemmy posts, comments and communities or export a community's posts from any instance via the public Lemmy API. Fediverse Reddit-alternative data, LLM-ready, pay per result.

**Lemmy Scraper** by Moxie: fast, reliable and polite, built on official/public data sources.

### What can it do?

- Reddit-alternative social listening
- Community research for marketing
- Datasets for NLP/LLM work
- Monitoring keywords with incremental mode

### Data source

The public Lemmy API (v3) of the instance you choose (e.g. lemmy.world). Public data only; no login.

### Features

- **Pay only for results** (pay-per-event pricing, no monthly rental)
- **Incremental mode**: scheduled runs return only items you haven't received before
- **LLM-ready output**: optional compact Markdown per item for RAG / AI agents
- **Polite rate limiting** with automatic retries and backoff
- Clean, flat JSON you can export as CSV, Excel, JSON or via API

### Input example

```json
{
  "instance": "lemmy.world",
  "mode": "search",
  "queries": [
    "linux"
  ],
  "maxItems": 20
}
```

### Output example

```json
{
  "id": "https://example.instance/post/1000001",
  "kind": "post",
  "url": "https://lemmy.world/post/1000001",
  "apId": "https://example.instance/post/1000001",
  "title": "Example: Which Linux distro do you recommend for a home media PC?",
  "body": "Example post body text.",
  "link": null,
  "community": "linux4noobs@programming.dev",
  "author": "janedoe@example.instance",
  "publishedAt": "2026-10-30T15:10:48.463244Z",
  "score": 2,
  "upvotes": 2,
  "downvotes": 0,
  "commentCount": 2,
  "nsfw": false,
  "instance": "lemmy.world",
  "query": "linux"
}
```

### Pricing

| Event | Free plan | Bronze | Silver | Gold |
|---|---|---|---|---|
| Post, comment or community (`result`) | $0.0008 | $0.00072 | $0.00064 | $0.00056 |
| Actor start | $0.003 per run | $0.003 | $0.003 | $0.003 |

Paid Apify plans get automatic discounts (Bronze -10%, Silver -20%, Gold -30%) on results.

**Example:** 1,000 results ≈ $0.80 + $0.003 start fee. Apify platform usage is included in the price.

Benchmark: Several Lemmy actors have about 2 users each (Apify Store, 30 Oct 2026).

### Use via API or MCP

```bash
curl -X POST "https://api.apify.com/v2/acts/devteamdrew~lemmy-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' -d '{"instance": "lemmy.world", "mode": "search", "queries": ["linux"], "maxItems": 20}'
```

AI agents (Claude, Cursor, etc.) can call this actor through the Apify MCP server: add `https://mcp.apify.com/?actors=devteamdrew/lemmy-scraper` as an MCP server.

### FAQ

**Does it cover the whole fediverse?**\
It searches what the chosen instance knows about, which for big instances like lemmy.world includes federated communities.

**Can I schedule it?**\
Yes. Use Apify Schedules together with incremental mode to receive only new items.

**Something broke?**\
Open an issue on the actor's Issues tab; we monitor nightly and usually fix within 24 hours.

### Related actors

- [Bluesky Scraper – Posts, Profiles & Search](https://apify.com/devteamdrew/bluesky-scraper)
- [UK Companies House Scraper – Companies & Directors](https://apify.com/devteamdrew/companies-house-scraper)
- [UK Planning Applications Scraper – 400+ Councils & Postcodes](https://apify.com/devteamdrew/uk-planning-applications)
- [Hacker News Scraper – Stories, Comments & Jobs](https://apify.com/devteamdrew/hacker-news-scraper)
- [npm Package Scraper – Downloads & Dependencies](https://apify.com/devteamdrew/npm-package-scraper)
- [GitHub Trending Scraper – Repos, Stars & Developers](https://apify.com/devteamdrew/github-trending-scraper)
- [Mastodon Scraper – Fediverse Hashtags, Accounts & Trends](https://apify.com/devteamdrew/mastodon-scraper)
- [SEC EDGAR Scraper – 10-K, 8-K & Form D Funding Filings](https://apify.com/devteamdrew/sec-edgar-scraper)
- [arXiv Scraper – Paper Search, Abstracts & Authors](https://apify.com/devteamdrew/arxiv-scraper)
- [UK Government Tenders Scraper – Contracts Finder, Find a Tender](https://apify.com/devteamdrew/uk-public-tenders)
- [UK CQC Care Homes & Providers Scraper – Ratings & Care Leads](https://apify.com/devteamdrew/uk-cqc-care-providers)
- [SAM.gov Scraper – Federal Contract Opportunities, No API Key](https://apify.com/devteamdrew/sam-gov-opportunities)
- [UK Operator Licence Scraper – HGV & Bus Operators (DVSA VOL)](https://apify.com/devteamdrew/uk-operator-licences)
- [USAspending Federal Awards Scraper – Contracts & Grants](https://apify.com/devteamdrew/usaspending-awards)
- [EU Tenders Scraper – TED Public Procurement Notices](https://apify.com/devteamdrew/eu-ted-tenders)

### Legal and GDPR

This actor only collects publicly available data from official or open APIs and respects their rate limits and terms of use.

Results may contain personal data (e.g. names, handles). You are responsible for having a lawful basis under GDPR/UK GDPR and similar laws to process it, and for using the data in line with the source platform's terms. Do not use it for spam or for profiling individuals.

***

See real sample rows, FAQs and ready-made feeds at [rowsift.co.uk](https://rowsift.co.uk/feeds/lemmy-scraper/?utm_source=apify\&utm_medium=readme\&utm_campaign=lemmy-scraper\&utm_content=footer).

# Actor input Schema

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

Lemmy server domain.

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

Search, community posts, or community discovery.

## `queries` (type: `array`):

Keywords.

## `communities` (type: `array`):

e.g. `technology` or `technology@lemmy.world`.

## `sort` (type: `string`):

Ordering.

## `includeComments` (type: `boolean`):

Also return matching comments.

## `maxItems` (type: `integer`):

Maximum number of results to return (and pay for) per run.

## `incremental` (type: `boolean`):

Remember items delivered in previous runs with the same input and skip them. Great for scheduled monitoring runs: you only pay for new results.

## `outputFormat` (type: `string`):

`json` = structured fields; `llm` = id, url and a compact Markdown block ready for LLMs/RAG; `both` = structured fields plus Markdown.

## `requestDelayMs` (type: `integer`):

Polite rate limit between API requests. Retries with backoff on 429/5xx are automatic.

## Actor input object example

```json
{
  "instance": "lemmy.world",
  "mode": "search",
  "queries": [
    "self hosting"
  ],
  "communities": [
    "technology"
  ],
  "sort": "New",
  "includeComments": false,
  "maxItems": 100,
  "incremental": false,
  "outputFormat": "json",
  "requestDelayMs": 500
}
```

# Actor output Schema

## `results` (type: `string`):

All results in the default dataset (overview view).

## `runSummary` (type: `string`):

Counts of pushed and skipped (already seen) items.

# 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 = {
    "instance": "lemmy.world",
    "queries": [
        "self hosting"
    ],
    "communities": [
        "technology"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("devteamdrew/lemmy-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 = {
    "instance": "lemmy.world",
    "queries": ["self hosting"],
    "communities": ["technology"],
}

# Run the Actor and wait for it to finish
run = client.actor("devteamdrew/lemmy-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 '{
  "instance": "lemmy.world",
  "queries": [
    "self hosting"
  ],
  "communities": [
    "technology"
  ]
}' |
apify call devteamdrew/lemmy-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devteamdrew/lemmy-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/c7ed6mWiIcOiYiYye/builds/Jdy7aFjMUvzEu3Sk7/openapi.json
