Lemmy API

Retrieve Lemmy posts and nested comments by keyword, community, or instance timeline.

Specify the target instance domain for queries; full federated scope across all instances is not guaranteed.

Platform availability

24h health
Normal
Normal

Last 30 days

Available capabilities

Each Lemmy action, what it does, its price and its health over the last 24 hours. Open an action for its parameters, response fields and code samples.

CapabilityWhat it doesPer 1,00024-hour health
SearchsearchSearch Lemmy posts on one instance by keyword, with community, author, score, upvotes and downvotes, comment count, external link and NSFW, locked and featured flags.$1.39 per 1,000 requestsNormal
CommunitycommunityRead the posts of a Lemmy community, by name or name@instance, with score, votes, comment count, links and post flags, sorted hot by default.$1.39 per 1,000 requestsNormal
FeedfeedBrowse the post feed of a Lemmy instance, lemmy.world by default, with each post's community, score, votes, comment count and flags, sorted by activity unless set otherwise.$1.39 per 1,000 requestsNormal
CommentscommentsFetch comments from posts in a Lemmy community, with score, votes, depth, parent comment ID, deletion flag and the post each belongs to.$1.39 per 1,000 requestsNormal

Open a capability for its parameters, response fields, code samples and trial.

What does each Lemmy action accept?

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 they do not add official-site features to the EveryInfra API contract.

ActionRequiredOptionalDeliveryLimitPer 1,000Response fields
search

Search

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.

keywordinstance, sort, top_rangeSync deliveryCatalog values: defaultLimit=20, maxLimit=200. A limit can control pages or per-parent expansion for some actions, so it is not always a final row count.$1.39 per 1,000 requestsid · 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
community

Community

Read the posts of a Lemmy community, by name or name@instance, with score, votes, comment count, links and post flags, sorted hot by default. Same-named communities on other instances are not merged, and top_range only applies when sorting by top.

communityinstance, sort, top_rangeSync deliveryCatalog values: defaultLimit=20, maxLimit=200. A limit can control pages or per-parent expansion for some actions, so it is not always a final row count.$1.39 per 1,000 requestsid · 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
feed

Feed

Browse the post feed of a Lemmy instance, lemmy.world by default, with each post's community, score, votes, comment count and flags, sorted by activity unless set otherwise. It is neither a personalized timeline nor a complete view of the fediverse.

instance, sort, top_rangeSync deliveryCatalog values: defaultLimit=20, maxLimit=100. A limit can control pages or per-parent expansion for some actions, so it is not always a final row count.$1.39 per 1,000 requestsid · 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
comments

Comments

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.

communityinstance, max_comments, sort, top_rangeSync deliveryCatalog values: defaultLimit=10, maxLimit=200. A limit can control pages or per-parent expansion for some actions, so it is not always a final row count.$1.39 per 1,000 requestsid · 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 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.

Full API reference: parameters, code samples, response example and health →
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, with score, votes, comment count, links and post flags, sorted hot by default. Same-named communities on other instances are not merged, and top_range only applies when sorting by top.

Full API reference: parameters, code samples, response example and health →
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, with each post's community, score, votes, comment count and flags, sorted by activity unless set otherwise. It is neither a personalized timeline nor a complete view of the fediverse.

Full API reference: parameters, code samples, response example and health →
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 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.

Full API reference: parameters, code samples, response example and health →
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 per-post comment limits represent an independent contract, 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

  1. 01Read the public catalog and choose a platform action.
  2. 02Send the platform, action, and required parameters to POST /api/v1/social.
  3. 03Handle a synchronous result, or poll the returned job ID when the action runs asynchronously.
  4. 04Store the structured response fields needed by your application.
lemmy_search.sh
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, feed, and comments. These action names identify different Lemmy objects or views; they are not interchangeable search modes.

Which input starts a 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.