Lemmy Communities API
Every community an instance knows, with counts and active users, so you can choose where to read posts next.
GET /v1/lemmy/communities1 credit Failed requests are free
About this endpoint
GET /v1/lemmy/communities?instance=lemmy.world&scope=local&sort=TopAll returns data.communities, each with id, name, title, handle, host, icon, nsfw, isLocal, description, subscriberCount, localSubscriberCount, postCount, commentCount, activeUsers, visibility and the removed or deleted flags. scope=local reads only the instance's own communities; scope=all includes communities it has seen from elsewhere.
The instance does not return a total, so page.hasMore follows from a full page and page.nextCursor continues the same sort and scope. nsfw=true adds NSFW communities, which are left out by default as on the instance. Counts are most accurate on a community's home instance.
Lemmy Communities API FAQ
What is the difference between local and all?
local reads communities that live on the instance you name. all includes federated communities the instance has seen. Counts for a remote community are its copy on this instance, not necessarily its home counts.
Why is there no total?
The instance does not return a community total. A full page means there may be more, and page.nextCursor continues the list; page.limitReached says a numbered list stopped at the 100-page ceiling.
How do I include NSFW communities?
Pass nsfw=true. Without it the list follows the instance default and leaves NSFW communities out.
How many credits does a community page cost?
Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth. Each paginated page is a separate billed request.