# Lemmy Comments Scraper (`bigibyte/lemmy-comments-scraper`) Actor

Collect public Lemmy comments from any instance like lemmy.world. Filter by post ID, sort by hot or new, set your limit, and instantly export clean discussion datasets to JSON, CSV, or Excel.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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 Comments Scraper

![Lemmy Comments Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/lemmy-comments-scraper-cover.png)

Collect public comments from Lemmy communities and discussions across different instances. Extract comment text, usernames, community names, publication dates, scores, and post IDs. Choose your preferred sorting order, filter comments by a specific post, and organize your results into structured datasets. Export your collected data in JSON, CSV, or Excel formats.

### What It Does

Lemmy Comments Scraper makes it easier to discover and collect comments from Lemmy communities and discussions.

Choose a Lemmy instance, select how comments should be sorted, and optionally provide a post ID to focus on a particular discussion. The scraper collects available comments and organizes their information into structured dataset records.

Whether you're researching community discussions, monitoring conversations, or analyzing user engagement, this tool helps you turn public Lemmy comments into useful research data.

### Key Features

- **Multiple Lemmy Instances:** Collect comments from different Lemmy instances, including lemmy.world.
- **Flexible Sorting:** Retrieve comments using Hot, New, Old, or Top sorting options.
- **Post-Specific Collection:** Filter comments by post ID to focus on a particular discussion.
- **Comment Details:** Extract comment IDs, text content, publication dates, and scores.
- **Creator Information:** Collect usernames associated with individual comments.
- **Community Information:** Identify the communities where discussions take place.
- **Pagination Support:** Collect comments across multiple result pages until your configured limit is reached.
- **Duplicate Prevention:** Identify duplicate comments using their unique comment IDs.
- **Configurable Collection Limits:** Control the maximum number of successful comment records collected per run, up to 1,000.
- **Request Management:** Configure request delays and timeout settings to manage your collection runs.
- **Optional Proxy Support:** Configure proxy settings when required for your collection environment.
- **Multiple Export Formats:** Download collected comments in JSON, CSV, Excel, and other supported Apify dataset formats.

### Input Example

Configure your scraper with a Lemmy instance, sorting preference, and the maximum number of comments you want to collect.

```json id="lmc821"
{
    "instance": "lemmy.world",
    "sort": "Hot",
    "maxItems": 50,
    "requestDelayMs": 1000
}
```

#### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `instance` | string | `lemmy.world` | Lemmy instance hostname without the URL scheme. |
| `sort` | string | `Hot` | Choose the comment sorting order: Hot, New, Old, or Top. |
| `postId` | integer | — | Optional post ID to collect comments from a specific discussion. |
| `maxItems` | integer | `100` | Maximum number of successful comment records to collect per run. Hard maximum: 1,000. |
| `requestDelayMs` | integer | `1000` | Delay between requests in milliseconds. |
| `userAgent` | string | `ActorResearch/1.0` | User-Agent value used for collection requests. |
| `timeoutSecs` | integer | `300` | Overall run timeout in seconds. |
| `requestTimeoutSecs` | integer | `30` | Maximum waiting time for an individual request, in seconds. |
| `proxyConfiguration` | object | Proxy off | Optional proxy configuration. |

### Output Example

Each collected comment is saved as an individual dataset record containing its discussion, creator, community, and engagement information.

```json id="lmc822"
{
    "commentId": 26289840,
    "content": "Take the W, OP.",
    "published": "2026-10-12T04:38:22.788315Z",
    "creator": "TootSweet",
    "postId": 53018627,
    "community": "greentext",
    "score": 18,
    "scrapedAt": "2026-10-12T05:30:00+00:00"
}
```

**Note:** The dataset also includes source information for each collected comment. Some fields may vary depending on the information available from the selected Lemmy instance.

### Use Cases

- **Community Discussion Research:** Explore public conversations and understand what people are discussing across different Lemmy communities.
- **Trending Comment Monitoring:** Collect Hot or New comments to identify active discussions and emerging topics.
- **Post-Level Analysis:** Focus on a particular discussion using its post ID and examine the comments associated with it.
- **Sentiment and Opinion Research:** Analyze publicly available comment text to understand community opinions, feedback, and reactions.
- **Community Engagement Analysis:** Examine comment scores, publication dates, and creator activity to study engagement patterns.
- **Content Research:** Gather discussion samples for topic classification, text analysis, and natural language processing projects.
- **Dataset Building:** Create structured collections of public comments for reporting, research, and further analysis.
- **Multi-Instance Research:** Compare discussions and community activity across different Lemmy instances.

### Limits and Fair Use

Lemmy is a decentralized platform made up of independently operated instances. Each instance may have its own rules, availability, and usage policies.

- Collection results depend on the comments available from the selected instance.
- The maximum collection limit is 1,000 successful comment records per run.
- If an instance responds with rate-limit errors, consider increasing `requestDelayMs`.
- Some instances may restrict access or have different collection limits.
- Comments are user-generated content. Respect applicable privacy laws, copyright requirements, and community policies when storing, analyzing, or reusing collected information.

### Frequently Asked Questions

**1. What is Lemmy Comments Scraper?**

Lemmy Comments Scraper is a data collection tool that helps you gather public comments from Lemmy instances. It extracts comment content, creator names, community information, scores, and related post details.

**2. Can I collect comments from different Lemmy instances?**

Yes. You can specify the instance hostname you want to collect comments from. For example, you can use `lemmy.world` or another accessible Lemmy instance.

**3. Can I collect comments from a specific post?**

Yes. Provide the post ID using the `postId` parameter to focus your collection on comments associated with a particular discussion.

**4. Which sorting options are available?**

You can choose from four sorting options: Hot, New, Old, and Top. This allows you to collect comments based on your preferred discussion order.

**5. What information does the scraper collect?**

The scraper collects comment IDs, comment text, publication dates, creator usernames, post IDs, community names, and comment scores. It also provides source and collection timestamps.

**6. How many comments can I collect in one run?**

You can configure `maxItems` to collect up to 1,000 successful comment records per run. The actual number may be lower if the selected instance has fewer available comments.

**7. Does the scraper support multiple pages of comments?**

Yes. The scraper supports pagination and continues collecting available comments across multiple pages until it reaches your configured result limit or the available results are exhausted.

**8. What happens if the selected Lemmy instance is temporarily unavailable?**

The scraper handles individual request failures and records relevant error information. However, collection results depend on the availability and response behavior of the selected instance.

**9. Can I export the collected comments to Excel or CSV?**

Yes. You can export your dataset in JSON, CSV, Excel, and other formats supported by Apify.

**10. Can I schedule automatic comment collection?**

Yes. You can use Apify Schedules to run the scraper automatically at your preferred intervals and maintain regularly updated comment datasets.

**11. Do I need to configure a proxy?**

No. Proxy configuration is optional and disabled by default. You can enable it when your collection environment requires additional proxy support.

### Related Tools

If you're researching online communities and user-generated content, you may also find these tools useful:

- **Reddit Comments Scrapers:** Collect public discussion comments, usernames, scores, and post information for community research.
- **Reddit Posts Scrapers:** Discover posts, titles, publication dates, scores, and subreddit information for topic analysis.
- **Discourse Forum Scrapers:** Collect public forum topics, replies, and discussion information for research and analysis.

Need comments from another community platform, automated discussion monitoring, or a custom data collection solution? BigiByte develops custom scrapers and APIs to support your business needs.

Explore more at <https://bigibyte.com>.

### Trademark Notice

Lemmy and its associated names, logos, and trademarks belong to their respective owners. They are mentioned in this documentation solely to identify the platform and the source of the collected information. Their use does not imply any affiliation, sponsorship, endorsement, or partnership with Lemmy or its developers.

### Disclaimer

Lemmy Comments Scraper is an independently developed data collection tool. It is not affiliated with, endorsed by, sponsored by, or officially associated with Lemmy or its developers. Users are responsible for ensuring that their data collection and usage comply with applicable laws, intellectual property rights, instance policies, and community guidelines.

### Is Web Scraping Legal?

This actor extracts publicly accessible comments and discussion information without bypassing login screens, paywalls, or technical security layers. While collecting publicly available data is widely permitted, compliance depends on how the data is gathered and used.

- **Personal Data:** Comments may contain usernames, profile references, or other identifying information. When collecting personal identifiers, ensure compliance with applicable data protection laws such as GDPR or CCPA.
- **Copyrighted Content:** User comments and other community contributions may be protected by copyright. Avoid directly duplicating or redistributing complete creative works without appropriate permission.
- **Platform Terms & Rate Limits:** Practice responsible data collection by avoiding aggressive traffic spikes, respecting applicable rate limits, and reviewing the policies of the selected Lemmy instance.
- **Disclaimer:** This information is provided for general educational purposes and does not constitute formal legal advice. Consult a qualified legal professional for specific compliance questions.

For a more detailed explanation, read Apify's guide: [Is Web Scraping Legal?](https://blog.apify.com/is-web-scraping-legal/)

# Actor input Schema

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

Lemmy instance host (no scheme), for example lemmy.world.

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

Comment list sort order passed to the Lemmy API.

## `postId` (type: `integer`):

Optional Lemmy post id. When set, only comments for that post are listed.

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

Stop after this many successful rows. Hard max is 1000.

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

Milliseconds to wait between requests. Raise if you see 429.

## `userAgent` (type: `string`):

User-Agent header sent with each request.

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

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

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "instance": "lemmy.world",
  "sort": "Hot",
  "maxItems": 100,
  "requestDelayMs": 1000,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# 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",
    "sort": "Hot"
};

// Run the Actor and wait for it to finish
const run = await client.actor("bigibyte/lemmy-comments-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",
    "sort": "Hot",
}

# Run the Actor and wait for it to finish
run = client.actor("bigibyte/lemmy-comments-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",
  "sort": "Hot"
}' |
apify call bigibyte/lemmy-comments-scraper --silent --output-dataset

```

## MCP server setup

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