Lemmy

List Lemmy communities

List Lemmy communities, local or federated, in the order asked for.

GET/v1/lemmy/communities
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
7
instancestringrequiredquery

The Lemmy instance, e.g. `lemmy.world`. A URL on the instance is also accepted. Ids and counts belong to this instance.

scopestringoptionalquery

`local` reads only this instance's own items; `all` includes federated items the instance has seen. Default: the endpoint's own listing.

one of: local, all

sortstringoptionalquery

Order. `Scaled` and `Controversial` are refused by 0.18 instances.

one of: Active, Hot, New, Old, TopHour, TopSixHour, TopTwelveHour, TopDay, TopWeek, TopMonth, TopThreeMonths, TopSixMonths, TopNineMonths, TopYear, TopAll, MostComments, NewComments, Controversial, Scaled

nsfwbooleanoptionalquery

Include NSFW communities. Default: false, as on the instance.

pageintegeroptionalquery

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`.

≥ 1 · ≤ 100

cursorstringoptionalquery

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`.

min 1 chars · max 2048 chars

limitintegeroptionalquery

Rows per page, 1 to 50. Default: 10.

≥ 1 · ≤ 50

Response fields
64

Endpoint-specific response payload.

datalookupStatus
string

`found`, `not_found` (the entity is missing, or the host name does not resolve), `private` (the instance does not allow public lists) or `not_compatible` (the host is not a Lemmy instance, or its version does not serve this operation). See `reason`.

one of: found, not_found, private, not_compatible

datainstance
string

The instance that was asked.

Why `lookupStatus` is not `found`, or null when it is `found`.

datareasoncode
string

Machine-readable reason.

one of: instance_private, not_a_lemmy_instance, not_available, deleted, host_not_found

datareasonmessage
string

Plain-language explanation.

Communities, in the order asked for.

datacommunities[]id
integer

Community id on this instance.

datacommunities[]name
string

Community name without the host.

datacommunities[]title
stringnullable

Display title.

datacommunities[]actorId
stringnullable

Canonical ActivityPub id.

datacommunities[]host
stringnullable

Host the community lives on.

datacommunities[]handle
stringnullable

`name@host`.

datacommunities[]icon
stringnullable

Community icon URL.

datacommunities[]nsfw
booleannullable

Whether the community is NSFW.

datacommunities[]isLocal
booleannullable

Whether the community lives on the instance asked.

datacommunities[]description
stringnullable

Description as Markdown.

datacommunities[]banner
stringnullable

Banner URL.

datacommunities[]publishedAt
stringnullable

When the community was created.

datacommunities[]updatedAt
stringnullable

When the community last changed.

datacommunities[]removed
booleannullable

Whether a moderator removed the community.

datacommunities[]deleted
booleannullable

Whether the community was deleted.

datacommunities[]hidden
booleannullable

Whether the community is hidden.

datacommunities[]postingRestrictedToMods
booleannullable

Whether only moderators may post.

datacommunities[]visibility
stringnullable

`Public` or another visibility the instance reports.

datacommunities[]subscriberCount
integernullable

Subscribers.

datacommunities[]localSubscriberCount
integernullable

Subscribers on the community's own instance.

datacommunities[]postCount
integernullable

Posts in the community.

datacommunities[]commentCount
integernullable

Comments in the community.

Active users in the community.

datacommunities[]activeUsersday
integernullable

Active users today.

datacommunities[]activeUsersweek
integernullable

Active users this week.

datacommunities[]activeUsersmonth
integernullable

Active users this month.

datacommunities[]activeUsershalfYear
integernullable

Active users in the last six months.

Moderators; null on list rows, which do not carry them.

datacommunities[]moderators[]id
integer

User id on this instance.

datacommunities[]moderators[]name
string

Username without the host.

datacommunities[]moderators[]displayName
stringnullable

Display name.

datacommunities[]moderators[]bio
stringnullable

Profile text as Markdown.

datacommunities[]moderators[]avatar
stringnullable

Avatar URL.

datacommunities[]moderators[]banner
stringnullable

Banner URL.

datacommunities[]moderators[]actorId
stringnullable

Canonical ActivityPub id.

datacommunities[]moderators[]host
stringnullable

Host the account lives on.

datacommunities[]moderators[]handle
stringnullable

`user@host`.

datacommunities[]moderators[]publishedAt
stringnullable

When the account was created.

datacommunities[]moderators[]updatedAt
stringnullable

When the profile last changed.

datacommunities[]moderators[]banned
booleannullable

Whether the account is banned.

datacommunities[]moderators[]banExpiresAt
stringnullable

When the ban ends.

datacommunities[]moderators[]deleted
booleannullable

Whether the account was deleted.

datacommunities[]moderators[]isBot
booleannullable

Whether the account is a bot.

datacommunities[]moderators[]isLocal
booleannullable

Whether the account lives on the instance asked.

datacommunities[]moderators[]matrixUserId
stringnullable

Matrix id the user chose to publish.

Discussion language ids; null on rows that do not carry them. The instance endpoint maps ids to language codes.

datacommunities[]languageIds[]
integeroptional

Pagination state for the current page.

datapagepage
integer

Current page number. 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`.

≥ 0

datapagehasMore
boolean

Whether a full page came back, so another page may exist. A last page that exactly fills the limit still sets true, and the next page is then empty.

datapagenextPage
integernullable

Next page number; null when this page was short, so the list ended.

≥ 0

datapagenextCursor
stringnullable

Cursor to pass in the next request; null when this page was short. It only works with the same filters.

datapagelimitReached
boolean

True when a full page stopped at the instance's 100-page ceiling and rows may remain. False when the list ended because it ran out.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/lemmy/communities?instance=lemmy.world" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Community list.