Lemmy API
Read Lemmy posts, communities and comments by keyword, community or instance as JSON with one EveryInfra API key, from $1.39 per 1,000 calls.
All you need is one API key, no Lemmy account or cookie. It also works as an MCP tool in Claude and Cursor. Star our two GitHub repositories to claim $1 in trial credit and try it first. The credit is valid for 24 hours after you claim it.
- 4 endpoints, one key.
- Failed calls and empty results are not charged.
- It reads what the chosen instance shows and does not promise to cover the whole federation.
Real sample values for one community
POST /api/v1/social params {"community":"[email protected]"}
Platform availability
- 24h health
- Normal
Last 30 days
Available capabilities
Retrieve Lemmy posts and nested comments by keyword, community, or instance timeline.
Set the target instance domain for each query. Full coverage across all federated instances is not guaranteed.
Posts
- SearchNormal
Search Lemmy posts on one instance by
keyword, with community, author, score, upvotes and downvotes, comment count, external link and NSFW, locked and featured flags.search$1.39 per 1,000 callsEvery 20 rows count as one call - CommunityNormal
Read the posts of a Lemmy community, by name or name@instance.
community$1.39 per 1,000 callsEvery 20 rows count as one call - News feedNormal
Browse the post feed of a Lemmy instance, lemmy.world by default.
feed$1.39 per 1,000 callsEvery 20 rows count as one call
Comments
- CommentsNormal
Fetch comments from posts in a Lemmy community, with score, votes, depth, parent comment ID, deletion flag and the post each belongs to.
comments$1.39 per 1,000 callsEvery 10 rows count as one call
5 questions to ask before choosing a data API for Lemmy
Do I need to log in to Lemmy or provide a cookie to make calls?
No. Send Authorization: Bearer with your API key in the request header, and put platform, action and the capability parameters in the request body. There is no QR-code login, no login state to maintain and no browser to run.
How is it billed? Are failed requests charged? Is there a free trial?
Billing is per request, $1.39 per 1,000 requests. Failed requests, empty results, invalid parameters and authentication failures are not charged. Star both everyinfra/everyinfra-agent-plugins and everyinfra/seo-skills on GitHub, then claim $1 under Balance & top-ups in the console. It is valid for 24 hours after you claim it, and no credit card is needed.
Can I connect this Lemmy API to Claude or Cursor?
Yes. The remote MCP URL is https://api.everyinfra.com/mcp. Add Authorization: Bearer and your API key as a request header; there is no local program to install. Setup for Claude, Cursor, ChatGPT and Claude Code is on https://everyinfra.com/en/mcp-server.
What compliance points apply when using Lemmy data?
The EveryInfra Terms of Service require you to make sure your use of the data complies with applicable law and the platform's terms. They prohibit unlawful use, violating privacy or intellectual property, and bulk scraping for harassment, fraud or other malicious purposes. If you use personal information such as nicknames and avatars, keep only the fields your business needs.
What Lemmy data can I get?
Available Lemmy capabilities (4): Search, Community, News feed, Comments. The parameters and response fields of each capability are in the API reference on this page.
Use cases
Find talk by keyword
Use
searchto find posts by keyword and see which communities discuss a topic.Usessearch
Follow one community
Use
communityto read the posts of a community, andcommentsto read the comments under them.Scan the topics on an instance
Use
feedto see what an instance talks about now, then pick a community and read it withcommunity.Analyze community comments
Use
commentsto read the text, score and level of each comment.Usescomments
Lemmy user documentation vs EveryInfra
The Getting Started page of the Lemmy user documentation explains how to choose an instance and how to register an account. It is a set of steps for new users, not a description of an interface that reads posts and comments by keyword, community or instance, so this table has no comparison row.
| Compared | Lemmy user documentation | EveryInfra |
|---|
This section is empty on the endpoint pages too, and each page gives its own reason. Official sources:
What does each Lemmy action accept?
Parameter table for all 4 actions
Sync delivery for every action.
| Action | Required | Optional | Limit | Per 1,000 | Response fields |
|---|---|---|---|---|---|
searchSearch Search Lemmy posts on one instance by | keyword | instance, sort, top_range | Catalog values: defaultLimit=20, maxLimit=200. For some actions a limit controls pages or per-parent expansion, so it is not always the final row count. | $1.39 per 1,000 requestsEvery 20 rows count as one call | id · title · body · url · external_url · community · community_url · instance · author_username · author_url · score · upvote_count · downvote_count · comment_count · thumbnail_url · embed_title · is_nsfw · is_locked · is_featured · posted_at · updated_at · platform |
communityCommunity Read the posts of a Lemmy community, by name or name@instance. Get score, votes, comment count, links and post flags, sorted hot by default. Same-named communities on other instances are not merged. | community | instance, sort, top_range | Catalog values: defaultLimit=20, maxLimit=200. For some actions a limit controls pages or per-parent expansion, so it is not always the final row count. | $1.39 per 1,000 requestsEvery 20 rows count as one call | id · title · body · url · external_url · community · community_url · instance · author_username · author_url · score · upvote_count · downvote_count · comment_count · thumbnail_url · embed_title · is_nsfw · is_locked · is_featured · posted_at · updated_at · platform |
feedNews feed Browse the post feed of a Lemmy instance, lemmy.world by default. Each post has community, score, votes, comment count and flags, sorted by activity by default. It is neither a personalized timeline nor a complete view of the fediverse. | instance, sort, top_range | Catalog values: defaultLimit=20, maxLimit=100. For some actions a limit controls pages or per-parent expansion, so it is not always the final row count. | $1.39 per 1,000 requestsEvery 20 rows count as one call | id · title · body · url · external_url · community · community_url · instance · author_username · author_url · score · upvote_count · downvote_count · comment_count · thumbnail_url · embed_title · is_nsfw · is_locked · is_featured · posted_at · updated_at · platform | |
commentsComments Fetch comments from posts in a Lemmy community, with score, votes, depth, parent comment ID, deletion flag and the post each belongs to. | community | instance, max_comments, sort, top_range | Catalog values: defaultLimit=10, maxLimit=200. For some actions a limit controls pages or per-parent expansion, so it is not always the final row count. | $1.39 per 1,000 requestsEvery 10 rows count as one call | id · text · author_username · author_url · score · upvote_count · downvote_count · depth · parent_comment_id · is_deleted · post_url · post_title · community · posted_at · platform |
What each action's parameters mean (4 actions)
Each answer below pairs one callable action with its real inputs. Parameter meanings and allowed values are action-specific; a familiar name does not carry the same meaning across every platform.
Official sources are linked only to clarify the platform term beside them. They do not imply platform authorization or endorsement, and features of the official site are not part of the EveryInfra API unless this page lists them.
What do the Lemmy search parameters mean?
Search Lemmy posts on one instance by keyword, with community, author, score, upvotes and downvotes, comment count, external link and NSFW, locked and featured flags. The search runs on the chosen instance, lemmy.world by default, and does not cover the whole fediverse.
keywordRequired- Specifies the search term for the Lemmy search action, which executes on the designated instance rather than guaranteeing a complete search across all federated instances.Lemmy: Instance Visibility Does Not Equal the Entire Fediverse — Official onboarding guides explain that instances are managed by distinct operators; standard browsing displays only communities known to the local instance, while cross-instance objects must be resolved separately. This context explains instance perspectives and post objects, without mirroring full web search functionality into gateway parameters. · Checked
instanceOptional- Selects the Lemmy instance domain, such as lemmy.world, which is also the default. A full instance URL is accepted but reduced to its hostname. This chooses the query entry point, not a community name.
sortOptional- Sorts posts as hot, active, new, top, most_comments, or new_comments. Search and community default to hot, feed defaults to active, and comments defaults to most_comments.Allowed values:
activehotmost_commentsnewnew_commentstop top_rangeOptional- Sets the score window only when sort is top: hour, sixhour, twelvehour, day, week (default), month, threemonths, sixmonths, ninemonths, year, or all. It is not a comment publication-date filter.Allowed values:
alldayhourmonthninemonthssixhoursixmonthsthreemonthstwelvehourweekyear
What do the Lemmy community parameters mean?
Read the posts of a Lemmy community, by name or name@instance. Get score, votes, comment count, links and post flags, sorted hot by default. Same-named communities on other instances are not merged. top_range applies only when you sort by top.
communityRequired- Specifies the community name or the cross-instance identifier in name@instance format. In the community action, it lists community posts; in the comments action, it fetches posts from the community and expands their comments rather than querying a single post URL directly.Lemmy: Community Identifiers and Cross-Instance Access — Official guides present community URLs and the !name@instance identifier format while distinguishing between local and federated communities. EveryInfra specifies this parameter as name or name@instance; the ! prefix and URL formats from the official UI are not automatically supported by this interface. · Checked
instanceOptional- Selects the Lemmy instance domain, such as lemmy.world, which is also the default. A full instance URL is accepted but reduced to its hostname. This chooses the query entry point, not a community name.
sortOptional- Sorts posts as hot, active, new, top, most_comments, or new_comments. Search and community default to hot, feed defaults to active, and comments defaults to most_comments.Allowed values:
activehotmost_commentsnewnew_commentstop top_rangeOptional- Sets the score window only when sort is top: hour, sixhour, twelvehour, day, week (default), month, threemonths, sixmonths, ninemonths, year, or all. It is not a comment publication-date filter.Allowed values:
alldayhourmonthninemonthssixhoursixmonthsthreemonthstwelvehourweekyear
What do the Lemmy feed parameters mean?
Browse the post feed of a Lemmy instance, lemmy.world by default. Each post has community, score, votes, comment count and flags, sorted by activity by default. It is neither a personalized timeline nor a complete view of the fediverse.
Full API reference: parameters, code samples, response example and healthinstanceOptional- Selects the Lemmy instance domain, such as lemmy.world, which is also the default. A full instance URL is accepted but reduced to its hostname. This chooses the query entry point, not a community name.
sortOptional- Sorts posts as hot, active, new, top, most_comments, or new_comments. Search and community default to hot, feed defaults to active, and comments defaults to most_comments.Allowed values:
activehotmost_commentsnewnew_commentstop top_rangeOptional- Sets the score window only when sort is top: hour, sixhour, twelvehour, day, week (default), month, threemonths, sixmonths, ninemonths, year, or all. It is not a comment publication-date filter.Allowed values:
alldayhourmonthninemonthssixhoursixmonthsthreemonthstwelvehourweekyear
What do the Lemmy comments parameters mean?
Fetch comments from posts in a Lemmy community, with score, votes, depth, parent comment ID, deletion flag and the post each belongs to. max_comments caps comments per post, from 1 to 200 with a default of 50, not the request total.
communityRequired- Specifies the community name or the cross-instance identifier in name@instance format. In the community action, it lists community posts; in the comments action, it fetches posts from the community and expands their comments rather than querying a single post URL directly.
instanceOptional- Selects the Lemmy instance domain, such as lemmy.world, which is also the default. A full instance URL is accepted but reduced to its hostname. This chooses the query entry point, not a community name.
max_commentsOptional- Sets the maximum number of comments to fetch per post in the comments action, defaulting to 50 with an allowed range of 1 to 200. It limits comments per post rather than total posts or total comments for the request and automatically clamps values outside the allowed range.Lemmy: Nested Comment Hierarchies and Limit Boundaries — Official documentation explains top-level comments, nested reply hierarchies, and score calculations (upvotes minus downvotes). EveryInfra's per-post comment limits are our own setting, not official sorting options; hitting a limit does not guarantee complete inclusion of all parent and child nodes. · Checked
sortOptional- Sorts posts as hot, active, new, top, most_comments, or new_comments. Search and community default to hot, feed defaults to active, and comments defaults to most_comments.Allowed values:
activehotmost_commentsnewnew_commentstop top_rangeOptional- Sets the score window only when sort is top: hour, sixhour, twelvehour, day, week (default), month, threemonths, sixmonths, ninemonths, year, or all. It is not a comment publication-date filter.Allowed values:
alldayhourmonthninemonthssixhoursixmonthsthreemonthstwelvehourweekyear
How to use the Lemmy API
- 01Choose a platform action from the public catalog.
- 02Send the platform, action, and required parameters to POST /api/v1/social.
- 03Read the result from the response. For an asynchronous action, poll the returned job ID.
- 04Store the response fields that your application needs.
curl -X POST https://api.everyinfra.com/api/v1/social \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"platform":"lemmy","action":"search","params":{"keyword":"<keyword>"}}'
Lemmy API questions
What can I retrieve with the Lemmy API?
Set platform to lemmy. The current catalog lists search, community, news feed, and comments. These action names identify different Lemmy objects or views; they are not interchangeable search modes.
Which input starts the Lemmy search request?
Specifies the search term for the Lemmy search action, which executes on the designated instance rather than guaranteeing a complete search across all federated instances. Send it as keyword inside params.
Which fields can Lemmy search return?
Its declared schema includes title, body, external_url, and community. A declared field can still be absent from an individual record, and every other action has its own field list.
Does every Lemmy action return immediately?
Actions labeled asynchronous return a job ID you poll. Every other action can also run asynchronously: add "mode": "async" to the request body to receive a job ID immediately, useful for slow tasks or large limits. The current catalog contains sync delivery.