Lemmy Scraper - Posts, Comments, Communities & Monitor avatar

Lemmy Scraper - Posts, Comments, Communities & Monitor

Pricing

from $0.18 / 1,000 results

Go to Apify Store
Lemmy Scraper - Posts, Comments, Communities & Monitor

Lemmy Scraper - Posts, Comments, Communities & Monitor

Scrape Lemmy posts, comments, community stats and keyword search from lemmy.world, lemmy.ml and any other instance. No API key, no login, no proxy: official open Lemmy API, so it does not break. Only-new mode for keyword alerts. $0.25 per 1000 results.

Pricing

from $0.18 / 1,000 results

Rating

0.0

(0)

Developer

Martin Petrov

Martin Petrov

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Features

Limited permissions

Share

Scrape Lemmy posts, comments and community stats from lemmy.world, lemmy.ml or any other Lemmy instance, using the official open Lemmy HTTP API. Search keywords across several instances and, with the only-new mode, get a Lemmy keyword monitor that returns each post once.

No login, no API key, no proxy. $0.25 per 1000 results, no start fee.

What you get

  • Community posts (New, Hot, Active, Top day / week / month / all time) with title, text, link, author, score, up/down votes, comment count, date and NSFW flag.
  • Keyword search over posts, on one or many instances at once.
  • Single post URLs, with their comments if you want them.
  • Comments with author, score, date and nesting depth.
  • Community list with subscribers, posts, comments, active users per month, NSFW flag and URL, useful to find where to post or monitor.
  • Only-new mode with a monitor ID: schedule the actor and every run returns only items you have not received before.

Input

FieldTypeDescription
instancesarrayLemmy domains to read. Default ["lemmy.world"]. Searches and plain community names run on every instance listed.
communitiesarraytechnology, technology@lemmy.world or https://lemmy.world/c/technology.
searchQueriesarrayKeywords to search in posts.
postUrlsarraySingle post URLs such as https://lemmy.world/post/12345.
sortstringNew, Hot, Active, TopDay, TopWeek, TopMonth, TopAll. Default New.
includeCommentsbooleanAlso save comments. Default false.
maxCommentsPerPostintegerComments per post. Default 20.
listCommunitiesbooleanOutput community rows (the busiest communities of each instance, or the communities you entered).
maxItemsintegerHard limit on rows saved in total, and the most you pay for. Default 50.
onlyNewbooleanMonitoring mode: only items not returned in earlier runs.
monitorIdstringSeparate memory for each monitor. Default default.

With the default input (community technology on lemmy.world) you get 50 posts in a few seconds.

Example: keyword monitor across instances

{
"instances": ["lemmy.world", "lemmy.ml", "sh.itjust.works"],
"searchQueries": ["my product", "competitor name"],
"sort": "New",
"onlyNew": true,
"monitorId": "brand-mentions",
"maxItems": 200
}

Save it as a task and add a schedule (for example every hour). The first run returns the current matches, later runs only new ones.

Example: posts with comments

{
"communities": ["selfhosted@lemmy.world"],
"sort": "TopWeek",
"includeComments": true,
"maxCommentsPerPost": 50,
"maxItems": 500
}

Example: find communities

{
"instances": ["lemmy.world", "lemmy.ml"],
"listCommunities": true,
"maxItems": 100
}

Output

Every row has a type: post, comment or community. A post:

{
"type": "post",
"id": 54074897,
"title": "FAA to finally ditch floppy disks in what it calls historic tech upgrade",
"url": "https://lemmy.world/post/54074897",
"linkUrl": "https://arstechnica.com/tech-policy/2026/11/faa-to-finally-ditch-floppy-disks/",
"body": null,
"community": "technology",
"communityUrl": "https://lemmy.world/c/technology",
"author": "return2ozma",
"score": 12,
"upvotes": 13,
"downvotes": 1,
"commentsCount": 3,
"publishedAt": "2026-11-06T19:28:52Z",
"nsfw": false,
"instance": "lemmy.world",
"scrapedAt": "2026-11-06T19:59:33Z"
}

A comment has id, postId, postUrl, url, body, author, score, publishedAt, depth (0 = top level) and instance. A community has name, title, subscribers, postsCount, commentsTotal, activeUsersMonth, nsfw and url. Values above are illustrative.

The RUN_SUMMARY record in the key-value store lists posts, comments and errors per source, plus lastError.

Call it from code

curl -X POST "https://api.apify.com/v2/acts/martin10291~lemmy-posts-comments-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"communities": ["technology@lemmy.world"], "searchQueries": ["your brand"], "onlyNew": true, "monitorId": "my-brand", "maxItems": 50}'
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("martin10291/lemmy-posts-comments-scraper").call(run_input={"communities": ["technology@lemmy.world"], "searchQueries": ["your brand"], "onlyNew": True, "monitorId": "my-brand", "maxItems": 50})
items = client.dataset(run["defaultDatasetId"]).list_items().items

Schedule it hourly or daily in Apify Console (Schedules) with onlyNew to get only new items each time, or use it as a tool for AI agents through the Apify MCP server.

Pricing

$0.25 per 1000 results (posts, comments or communities), no start fee. Use maxItems to cap the cost of a run.

Good to know

  • The actor uses the official Lemmy API v3 with a small number of parallel requests and waits when an instance answers with 429 or 5xx. Some instances limit or close their API; those sources are reported in the run summary and the others continue.
  • Search and plain community names run on every instance in instances. The same federated post seen through two instances is saved once.
  • Only-new mode remembers posts and comments by their federated ID, so a post found through two instances is not repeated. Community rows are snapshots of the current stats and are returned on every run.
  • Comments are a flat list with a depth field, up to 8 levels deep.
  • Authors are the public display names shown on Lemmy. No profile pages are scraped.
  • Scores can differ slightly between instances because of federation delay.

The actor reads public Lemmy content without logging in. Scraped content may include personal data such as usernames; process it in line with GDPR and other applicable laws and the terms of each instance. Do not use it for spam or harassment.

FAQ

How fresh is the data? Live: every run reads the Lemmy API of each instance at run time.

Which instances work? Any public Lemmy instance with the v3 API (lemmy.world, lemmy.ml, sh.itjust.works, programming.dev ...). If one instance is down, the run continues with the others and the error is in RUN_SUMMARY.lastError.

Does it need a login, key or proxy? No. It uses the official open Lemmy API with a normal, honest client.

What are the limits? Lemmy pages hold up to 50 posts; very large maxItems values take longer. Private or deleted posts are not returned.

Can AI agents use it? Yes. Add it as a tool through the Apify MCP server (mcp.apify.com) and your AI agent can search Lemmy and watch keywords.