# Social Fetch API - Lemmy endpoints # Base URL: https://api.socialfetch.dev # Auth: x-api-key header (sfk_...) # Full catalog: https://www.socialfetch.dev/llms-endpoints.txt | JSON: https://www.socialfetch.dev/llms.json # Docs hub: https://www.socialfetch.dev/docs/api | OpenAPI: https://www.socialfetch.dev/openapi.json 14 documented Lemmy operations. Do not invent paths - only the routes below (and their linked markdown pages) are supported. ## GET /v1/lemmy/instance Get Lemmy instance Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/lemmy/instance/get.mdx SDK: client.lemmy.getInstance({ instance: "lemmy.world" }) Parameters: - instance (required, string) - The Lemmy instance, e.g. `lemmy.world`. A URL on the instance is also accepted. Ids and counts belong to this instance. - include (optional, array) - Extra heavy parts to return: `emoji`, `blockedUrls`, `taglines`, comma-separated. Default: none; the site object can be megabytes of custom emoji. Outcome field: `data.lookupStatus` in `found`, `not_found`, `private`, `not_compatible` curl "https://api.socialfetch.dev/v1/lemmy/instance?instance=lemmy.world" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/lemmy/instances List Lemmy federated instances Credit cost: 2 credits. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/lemmy/instances/get.mdx SDK: client.lemmy.listInstances({ source: "lemmy.world", software: "all" }) Parameters: - source (required, string) - The Lemmy instance whose federation table to return, e.g. `fed.dyne.org`. A URL on the instance is also accepted. - software (optional, string) - Software to keep, matched case-insensitively; `all` keeps every domain. Default: `lemmy`. - activeSince (optional, string) - Only domains whose last successful federation delivery is at or after this time, as an ISO 8601 date or time (such as `2026-01-31`) or epoch seconds. A time with no zone is UTC. - blocked (optional, boolean) - `true` returns the instance's block list; `false` (default) returns the domains it federates with. - page (optional, integer) - Page number. Default: 1. The federated directory has no 100-page ceiling. - cursor (optional, string) - Pass `page.nextCursor` from the previous response to get the next page. It only works with the same filters; do not send it with `page`. - limit (optional, integer) - Rows per page, 1 to 50. Default: 10. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found`, `private`, `not_compatible` curl "https://api.socialfetch.dev/v1/lemmy/instances?source=lemmy.world" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/lemmy/communities List Lemmy communities Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/lemmy/communities/get.mdx SDK: client.lemmy.listCommunities({ instance: "lemmy.world", scope: "local", sort: "TopAll" }) Parameters: - instance (required, string) - The Lemmy instance, e.g. `lemmy.world`. A URL on the instance is also accepted. Ids and counts belong to this instance. - scope (optional, string, enum: local | all) - `local` reads only this instance's own items; `all` includes federated items the instance has seen. Default: the endpoint's own listing. - sort (optional, string, enum: Active | Hot | New | Old | TopHour | TopSixHour | TopTwelveHour | TopDay | TopWeek | TopMonth | TopThreeMonths | TopSixMonths | TopNineMonths | TopYear | TopAll | MostComments | NewComments | Controversial | Scaled) - Order. `Scaled` and `Controversial` are refused by 0.18 instances. - nsfw (optional, boolean) - Include NSFW communities. Default: false, as on the instance. - page (optional, integer) - Page number, 1 to 100. Default: 1. An instance refuses pages past 100. Lemmy pages by number over a live order, so new or re-ranked items can shift a row onto the next page. Remove repeats by `id`. - cursor (optional, string) - Pass `page.nextCursor` from the previous response to get the next page. It only works with the same filters; do not send it with `page`. - limit (optional, integer) - Rows per page, 1 to 50. Default: 10. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found`, `private`, `not_compatible` curl "https://api.socialfetch.dev/v1/lemmy/communities?instance=lemmy.world" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/lemmy/community Get Lemmy community Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/lemmy/community/get.mdx SDK: client.lemmy.getCommunity({ instance: "lemmy.world", name: "technology" }) Parameters: - instance (required, string) - The Lemmy instance, e.g. `lemmy.world`. A URL on the instance is also accepted. Ids and counts belong to this instance. - name (optional, string) - Community name, e.g. `technology`, or `technology@lemmy.world` to resolve a community on another instance. Prefer the community's home instance for counts. - id (optional, integer) - Community id on the chosen instance, e.g. `2478`. Outcome field: `data.lookupStatus` in `found`, `not_found`, `private`, `not_compatible` curl "https://api.socialfetch.dev/v1/lemmy/community?instance=lemmy.world&name=technology" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/lemmy/posts List Lemmy posts Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/lemmy/posts/get.mdx SDK: client.lemmy.listPosts({ instance: "lemmy.world", community: "technology", sort: "New" }) Parameters: - instance (required, string) - The Lemmy instance, e.g. `lemmy.world`. A URL on the instance is also accepted. Ids and counts belong to this instance. - community (optional, string) - The community whose posts to list, e.g. `technology` or `canada@lemmy.ca`. - scope (optional, string, enum: local | all) - `local` reads only this instance's own items; `all` includes federated items the instance has seen. Default: the endpoint's own listing. - sort (optional, string, enum: Active | Hot | New | Old | TopHour | TopSixHour | TopTwelveHour | TopDay | TopWeek | TopMonth | TopThreeMonths | TopSixMonths | TopNineMonths | TopYear | TopAll | MostComments | NewComments | Controversial | Scaled) - Order. `Scaled` and `Controversial` are refused by 0.18 instances. - nsfw (optional, boolean) - Include NSFW posts. Default: false, as on the instance. - page (optional, integer) - Page number, 1 to 100. Default: 1. An instance refuses pages past 100. Lemmy pages by number over a live order, so new or re-ranked items can shift a row onto the next page. Remove repeats by `id`. - cursor (optional, string) - Pass `page.nextCursor` from the previous response to get the next page. It only works with the same filters; do not send it with `page`. - limit (optional, integer) - Rows per page, 1 to 50. Default: 10. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found`, `private`, `not_compatible` curl "https://api.socialfetch.dev/v1/lemmy/posts?instance=lemmy.world" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/lemmy/post Get Lemmy post Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/lemmy/post/get.mdx SDK: client.lemmy.getPost({ instance: "lemmy.world", id: 53910627 }) Parameters: - instance (required, string) - The Lemmy instance, e.g. `lemmy.world`. A URL on the instance is also accepted. Ids and counts belong to this instance. - id (optional, integer) - Post id on the chosen instance, e.g. `53910627`. - commentId (optional, integer) - Find the post a comment belongs to. Outcome field: `data.lookupStatus` in `found`, `not_found`, `private`, `not_compatible` curl "https://api.socialfetch.dev/v1/lemmy/post?instance=lemmy.world&id=53910627" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/lemmy/post/comments List Lemmy post comments Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/lemmy/post/comments/get.mdx SDK: client.lemmy.listPostComments({ instance: "lemmy.world", postId: 53910627, sort: "Top" }) Parameters: - instance (required, string) - The Lemmy instance, e.g. `lemmy.world`. A URL on the instance is also accepted. Ids and counts belong to this instance. - postId (optional, integer) - Post id on the chosen instance, e.g. `53910627`. - parentId (optional, integer) - List this comment and its replies instead of the whole post. Walk a deeper branch by passing one of its reply ids here. - sort (optional, string, enum: Hot | Top | New | Old | Controversial) - Order. `Controversial` is refused by 0.18 instances. - page (optional, integer) - Page number, 1 to 100. Default: 1. An instance refuses pages past 100. Lemmy pages by number over a live order, so new or re-ranked items can shift a row onto the next page. Remove repeats by `id`. - cursor (optional, string) - Pass `page.nextCursor` from the previous response to get the next page. It only works with the same filters; do not send it with `page`. - limit (optional, integer) - Rows per page, 1 to 50. Default: 10. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found`, `private`, `not_compatible` curl "https://api.socialfetch.dev/v1/lemmy/post/comments?instance=lemmy.world&postId=53910627" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/lemmy/comments List latest Lemmy comments Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/lemmy/comments/get.mdx SDK: client.lemmy.listComments({ instance: "lemmy.world", scope: "local", sort: "New" }) Parameters: - instance (required, string) - The Lemmy instance, e.g. `lemmy.world`. A URL on the instance is also accepted. Ids and counts belong to this instance. - community (optional, string) - Community name, e.g. `technology`, or `technology@lemmy.world` to resolve a community on another instance. Prefer the community's home instance for counts. - scope (optional, string, enum: local | all) - `local` reads only this instance's own items; `all` includes federated items the instance has seen. Default: the endpoint's own listing. - sort (optional, string, enum: Hot | Top | New | Old | Controversial) - Order. `Controversial` is refused by 0.18 instances. - page (optional, integer) - Page number, 1 to 100. Default: 1. An instance refuses pages past 100. Lemmy pages by number over a live order, so new or re-ranked items can shift a row onto the next page. Remove repeats by `id`. - cursor (optional, string) - Pass `page.nextCursor` from the previous response to get the next page. It only works with the same filters; do not send it with `page`. - limit (optional, integer) - Rows per page, 1 to 50. Default: 10. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found`, `private`, `not_compatible` curl "https://api.socialfetch.dev/v1/lemmy/comments?instance=lemmy.world" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/lemmy/comment Get Lemmy comment Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/lemmy/comment/get.mdx SDK: client.lemmy.getComment({ instance: "lemmy.world", id: 26697841 }) Parameters: - instance (required, string) - The Lemmy instance, e.g. `lemmy.world`. A URL on the instance is also accepted. Ids and counts belong to this instance. - id (required, integer) - Comment id on the chosen instance, e.g. `1000`. Outcome field: `data.lookupStatus` in `found`, `not_found`, `private`, `not_compatible` curl "https://api.socialfetch.dev/v1/lemmy/comment?instance=lemmy.world&id=26697841" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/lemmy/user Get Lemmy user Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/lemmy/user/get.mdx SDK: client.lemmy.getUser({ instance: "lemmy.world", username: "dessalines@lemmy.ml" }) Parameters: - instance (required, string) - The Lemmy instance, e.g. `lemmy.world`. A URL on the instance is also accepted. Ids and counts belong to this instance. - username (optional, string) - Username, e.g. `dessalines`, or `user@lemmy.ml` to resolve a user on another instance. - id (optional, integer) - User id on the chosen instance, e.g. `34`. Outcome field: `data.lookupStatus` in `found`, `not_found`, `private`, `not_compatible` curl "https://api.socialfetch.dev/v1/lemmy/user?instance=lemmy.world&username=dessalines@lemmy.ml" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/lemmy/user/posts List Lemmy user posts Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/lemmy/user/posts/get.mdx SDK: client.lemmy.listUserPosts({ instance: "lemmy.world", username: "dessalines@lemmy.ml", sort: "New" }) Parameters: - instance (required, string) - The Lemmy instance, e.g. `lemmy.world`. A URL on the instance is also accepted. Ids and counts belong to this instance. - username (required, string) - Username, e.g. `dessalines`, or `user@lemmy.ml` to resolve a user on another instance. - sort (optional, string, enum: New | Old | TopHour | TopSixHour | TopTwelveHour | TopDay | TopWeek | TopMonth | TopThreeMonths | TopSixMonths | TopNineMonths | TopYear) - Order. Only `New`, `Old` and the time-window tops; `TopAll` and `Hot` are not offered. - page (optional, integer) - Page number, 1 to 100. Default: 1. An instance refuses pages past 100. Lemmy pages by number over a live order, so new or re-ranked items can shift a row onto the next page. Remove repeats by `id`. - cursor (optional, string) - Pass `page.nextCursor` from the previous response to get the next page. It only works with the same filters; do not send it with `page`. - limit (optional, integer) - Rows per page, 1 to 50. Default: 10. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found`, `private`, `not_compatible` curl "https://api.socialfetch.dev/v1/lemmy/user/posts?instance=lemmy.world&username=dessalines@lemmy.ml" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/lemmy/user/comments List Lemmy user comments Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/lemmy/user/comments/get.mdx SDK: client.lemmy.listUserComments({ instance: "lemmy.world", username: "dessalines@lemmy.ml", sort: "New" }) Parameters: - instance (required, string) - The Lemmy instance, e.g. `lemmy.world`. A URL on the instance is also accepted. Ids and counts belong to this instance. - username (required, string) - Username, e.g. `dessalines`, or `user@lemmy.ml` to resolve a user on another instance. - sort (optional, string, enum: New | Old | TopHour | TopSixHour | TopTwelveHour | TopDay | TopWeek | TopMonth | TopThreeMonths | TopSixMonths | TopNineMonths | TopYear) - Order. Only `New`, `Old` and the time-window tops; `TopAll` and `Hot` are not offered. - page (optional, integer) - Page number, 1 to 100. Default: 1. An instance refuses pages past 100. Lemmy pages by number over a live order, so new or re-ranked items can shift a row onto the next page. Remove repeats by `id`. - cursor (optional, string) - Pass `page.nextCursor` from the previous response to get the next page. It only works with the same filters; do not send it with `page`. - limit (optional, integer) - Rows per page, 1 to 50. Default: 10. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found`, `private`, `not_compatible` curl "https://api.socialfetch.dev/v1/lemmy/user/comments?instance=lemmy.world&username=dessalines@lemmy.ml" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/lemmy/search Search Lemmy instance Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/lemmy/search/get.mdx SDK: client.lemmy.search({ instance: "lemmy.world", query: "linux", type: "Posts" }) Parameters: - instance (required, string) - The Lemmy instance, e.g. `lemmy.world`. A URL on the instance is also accepted. Ids and counts belong to this instance. - query (required, string) - Search term, 1 to 300 characters, in any language. Required, never empty and no control characters. - type (optional, string, enum: All | Comments | Posts | Communities | Users | Url) - `Posts` (default), `All` (every kind), `Comments` (comment text), `Communities`, `Users` or `Url` (posts linking to an exact URL). `All` and `Comments` can take much longer than the other kinds. - sort (optional, string, enum: Active | Hot | New | Old | TopHour | TopSixHour | TopTwelveHour | TopDay | TopWeek | TopMonth | TopThreeMonths | TopSixMonths | TopNineMonths | TopYear | TopAll | MostComments | NewComments | Controversial | Scaled) - Order. `Scaled` and `Controversial` are refused by 0.18 instances. - community (optional, string) - Community name, e.g. `technology`, or `technology@lemmy.world` to resolve a community on another instance. Prefer the community's home instance for counts. - author (optional, string) - Restrict to one author, by username. - scope (optional, string, enum: local | all) - `local` reads only this instance's own items; `all` includes federated items the instance has seen. Default: the endpoint's own listing. - page (optional, integer) - Page number, 1 to 100. Default: 1. An instance refuses pages past 100. Lemmy pages by number over a live order, so new or re-ranked items can shift a row onto the next page. Remove repeats by `id`. - cursor (optional, string) - Pass `page.nextCursor` from the previous response to get the next page. It only works with the same filters; do not send it with `page`. - limit (optional, integer) - Rows per page, 1 to 50. Default: 10. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found`, `private`, `not_compatible` curl "https://api.socialfetch.dev/v1/lemmy/search?instance=lemmy.world&query=linux" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/lemmy/modlog List Lemmy instance moderation log Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/lemmy/modlog/get.mdx SDK: client.lemmy.listModlog({ instance: "lemmy.world", kind: "ModRemovePost" }) Parameters: - instance (required, string) - The Lemmy instance, e.g. `lemmy.world`. A URL on the instance is also accepted. Ids and counts belong to this instance. - kind (optional, string, enum: all | ModRemovePost | ModLockPost | ModFeaturePost | ModRemoveComment | ModRemoveCommunity | ModBanFromCommunity | ModBan | ModAddCommunity | ModTransferCommunity | ModAdd | AdminPurgePerson | AdminPurgeCommunity | AdminPurgePost | AdminPurgeComment | ModHideCommunity) - Kind of moderation action. `all` returns every kind in one answer; with it, `limit` applies to each kind and is at most 10. Omit it with `community` to get every kind for that community, up to 20 each. - communityId (optional, integer) - Only this community's moderation log, by its numeric id. - modPersonId (optional, integer) - Only actions taken by this moderator or administrator. - otherPersonId (optional, integer) - Only actions whose subject is this person. - page (optional, integer) - Page number, 1 to 100. Default: 1. An instance refuses pages past 100. Lemmy pages by number over a live order, so new or re-ranked items can shift a row onto the next page. Remove repeats by `id`. - cursor (optional, string) - Pass `page.nextCursor` from the previous response to get the next page. It only works with the same filters; do not send it with `page`. - limit (optional, integer) - Rows per kind, 1 to 50. Default: 10. With `kind=all`, or with no kind or community, at most 10; with a community but no kind, at most 20. One page can carry up to 15 times the limit across the kinds. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found`, `private`, `not_compatible` curl "https://api.socialfetch.dev/v1/lemmy/modlog?instance=lemmy.world" \ -H "x-api-key: YOUR_API_KEY"