# Lemmy Community Posts Scraper (`parseforge/lemmy-community-posts-scraper`) Actor

Scrapes Lemmy community posts from any instance, filtered by community and sort order. Returns each post as a flat row with score, comments, and body.

- **URL**: https://apify.com/parseforge/lemmy-community-posts-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Social media, News, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $19.00 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### Lemmy Community Posts Scraper

**Scrape Lemmy community posts from any instance, sorted your way, up to a million per run.** Each post comes with its score, comments, and full body text. No login or API key. Export to CSV, JSON, Excel, or XML.

Lemmy's API is fine for one-off reads, but it rate-limits you and forces you to handle pagination and schema drift yourself. This reads the public post feeds directly from any Lemmy instance, filtered by community and sort order, and returns each match in one fixed schema.

| Who uses it | What they scrape Lemmy for |
|---|---|
| Market researchers | Which topics a niche is discussing this week |
| Community managers | Monitor engagement on their own Lemmy community |
| Data journalists | Pull post histories for a story on Fediverse trends |
| App developers | Seed a new client with real post data |

### What it does

This Actor collects Lemmy posts by instance, community, and sort order, and returns each one as a flat row.

- 📊 **Computed signals:** virality score, engagement rate, controversy score, and post age.
- 🔍 **Flexible filtering:** pick any instance, one community, or all communities, and sort by Active, Hot, New, or Top.
- 📦 **Flat output:** every post is one row, ready for CSV, JSON, Excel, or XML.
- ⚡ **No login:** public feeds only, no OAuth, no API key, no rate-limit headaches.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with Lemmy data

**📈 Track topics and trends.**

A market researcher runs the Actor on a niche community every morning and exports the top posts to see what the community is discussing.

**🛡️ Monitor your community.**

A community manager scrapes their own Lemmy community daily to catch spam or off-topic posts before they take over.

**📰 Gather data for a story.**

A data journalist pulls a year of posts from a political community to analyze how the conversation shifted over time.

**🧪 Seed a new app.**

An app developer scrapes a few thousand posts from a popular instance to populate a test database for a new Lemmy client.

### Why choose this scraper

|  | What you get |
|---|---|
| **No API key** | Read public feeds directly, no registration or OAuth |
| **Any instance** | Point it at lemmy.world, beehaw.org, or your own server |
| **Sorted your way** | Active, Hot, New, Top day, week, month, year, all-time |
| **Flat schema** | Every post is one row, no nested JSON to flatten |

### How it compares

This Actor focuses on posts only, while the competitors below also scrape comments, communities, or search results.

| Feature | ParseForge | Lemmy Scraper · Communities, Posts, Comments & Instances | Lemmy Scraper | Lemmy Posts & Communities Scraper |
|---|---|---|---|---|
| Scrape posts from any instance | Yes | Yes | Yes | Yes |
| Filter by community | Yes | Yes | Yes | Yes |
| Sort by Active, Hot, New, Top | Yes | Not listed | Not listed | Yes |
| Scrape comments | Not listed | Yes | Yes | Yes |
| Scrape communities | Not listed | Yes | Yes | Yes |
| Scrape instance metadata | Not listed | Yes | Not listed | Not listed |

### Configure the run

Drive the Actor from an instance hostname, a community name, and a sort order, alone or together, and filters run as each post is read so only matches reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "maxItems": 10
}
```

A larger pull:

```json
{
  "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.021 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $2.10 |
| 1,000 results | $21.00 |
| 10,000 results | $210.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [Lemmy Community Posts Scraper](https://apify.com/parseforge/lemmy-community-posts-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to Lemmy through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/lemmy-community-posts-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check that the instance hostname is correct and reachable. If you set a community name, make sure it exists on that instance. Also try a different sort order, as some instances may not support all sorts.

**Why does the run stop before reaching maxItems?**

The Actor stops when the feed has no more posts. If you need more, try a different sort order or a larger instance.

**Why do I get an error about the instance?**

Some instances block automated access or have downtime. Try a different instance or retry later.

**Why are some fields empty?**

Lemmy posts can have optional fields like a URL or thumbnail. If a post does not have that data, the field will be empty.

### FAQ

| Question | Answer |
|---|---|
| Do I need a Lemmy account or API key? | No. The Actor reads public post feeds directly from the instance, so no login or key is required. |
| Which Lemmy instances does it work with? | Any instance that exposes the standard Lemmy API, including lemmy.world, beehaw.org, and self-hosted servers. |
| Can I scrape a single community? | Yes. Set the community name in the input, for example "programmer\_humor", and the Actor will only return posts from that community. |
| Can I scrape all communities on an instance? | Yes. Leave the community field blank and the Actor will return posts from all communities on the instance, sorted by your chosen order. |
| What sort orders are available? | Active, Hot, New, Top day, Top week, Top month, Top year, and Top all-time. |
| How many posts can I get in one run? | Up to 1,000,000 posts per run, controlled by the maxItems input. |
| What format is the output? | Each post is returned as a flat row with fields like title, score, comment count, and body. You can export to CSV, JSON, Excel, or XML. |
| Does it handle pagination? | Yes. The Actor automatically walks through pages of results until it reaches your maxItems limit or the feed ends. |
| Is the data real-time? | The Actor reads the live public feed at the moment you run it, so you get the current state of the instance. |
| Can I schedule this to run regularly? | Yes. Use Apify's scheduler to run the Actor daily, hourly, or on any cron schedule. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Lemmy. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

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

How many posts to collect per run.

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

Lemmy instance hostname.

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

Sort order of posts.

## `communityName` (type: `string`):

Community name (e.g. "programmer\_humor"). Leave blank for all.

## Actor input object example

```json
{
  "maxItems": 10,
  "instance": "lemmy.world",
  "sort": "Active"
}
```

# Actor output Schema

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

Scraped Lemmy Community Posts records

# 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 = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/lemmy-community-posts-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 = { "maxItems": 10 }

# Run the Actor and wait for it to finish
run = client.actor("parseforge/lemmy-community-posts-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 '{
  "maxItems": 10
}' |
apify call parseforge/lemmy-community-posts-scraper --silent --output-dataset

```

## MCP server setup

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