Lemmy

List Lemmy posts

List Lemmy posts, optionally for one community, in the order asked for.

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

API key (`sfk_...`)

Parameters
8
instancestringrequiredquery

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

communitystringoptionalquery

The community whose posts to list, e.g. `technology` or `canada@lemmy.ca`.

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 posts. 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
183

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.

Posts, in the order asked for.

dataposts[]id
integer

Post id on this instance.

dataposts[]apId
stringnullable

Canonical ActivityPub id.

dataposts[]title
stringnullable

Post title.

dataposts[]url
stringnullable

Link the post points at; null for a text post.

dataposts[]urlContentType
stringnullable

Content type of the link.

dataposts[]thumbnailUrl
stringnullable

Thumbnail URL.

dataposts[]nsfw
booleannullable

Whether the post is NSFW.

dataposts[]locked
booleannullable

Whether the post is locked.

dataposts[]removed
booleannullable

Whether a moderator removed it.

dataposts[]deleted
booleannullable

Whether it was deleted.

dataposts[]publishedAt
stringnullable

When it was posted.

dataposts[]updatedAt
stringnullable

When it last changed.

dataposts[]languageId
integernullable

Discussion language id.

dataposts[]isLocal
booleannullable

Whether it was posted on the instance asked.

dataposts[]score
integernullable

Votes up minus votes down.

dataposts[]upvotes
integernullable

Upvotes.

dataposts[]downvotes
integernullable

Downvotes.

dataposts[]commentCount
integernullable

Comments on the post.

The community it was posted in, with the counts the single-post answer carries.

dataposts[]communityid
integer

Community id on this instance.

dataposts[]communityname
string

Community name without the host.

dataposts[]communitytitle
stringnullable

Display title.

dataposts[]communityactorId
stringnullable

Canonical ActivityPub id.

dataposts[]communityhost
stringnullable

Host the community lives on.

dataposts[]communityhandle
stringnullable

`name@host`.

dataposts[]communityicon
stringnullable

Community icon URL.

dataposts[]communitynsfw
booleannullable

Whether the community is NSFW.

dataposts[]communityisLocal
booleannullable

Whether the community lives on the instance asked.

dataposts[]communitydescription
stringnullable

Description as Markdown.

dataposts[]communitybanner
stringnullable

Banner URL.

dataposts[]communitypublishedAt
stringnullable

When the community was created.

dataposts[]communityupdatedAt
stringnullable

When the community last changed.

dataposts[]communityremoved
booleannullable

Whether a moderator removed the community.

dataposts[]communitydeleted
booleannullable

Whether the community was deleted.

dataposts[]communityhidden
booleannullable

Whether the community is hidden.

dataposts[]communitypostingRestrictedToMods
booleannullable

Whether only moderators may post.

dataposts[]communityvisibility
stringnullable

`Public` or another visibility the instance reports.

dataposts[]communitysubscriberCount
integernullable

Subscribers.

dataposts[]communitylocalSubscriberCount
integernullable

Subscribers on the community's own instance.

dataposts[]communitypostCount
integernullable

Posts in the community.

dataposts[]communitycommentCount
integernullable

Comments in the community.

Active users in the community.

dataposts[]communityactiveUsersday
integernullable

Active users today.

dataposts[]communityactiveUsersweek
integernullable

Active users this week.

dataposts[]communityactiveUsersmonth
integernullable

Active users this month.

dataposts[]communityactiveUsershalfYear
integernullable

Active users in the last six months.

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

dataposts[]communitymoderators[]id
integer

User id on this instance.

dataposts[]communitymoderators[]name
string

Username without the host.

dataposts[]communitymoderators[]displayName
stringnullable

Display name.

dataposts[]communitymoderators[]bio
stringnullable

Profile text as Markdown.

dataposts[]communitymoderators[]avatar
stringnullable

Avatar URL.

dataposts[]communitymoderators[]banner
stringnullable

Banner URL.

dataposts[]communitymoderators[]actorId
stringnullable

Canonical ActivityPub id.

dataposts[]communitymoderators[]host
stringnullable

Host the account lives on.

dataposts[]communitymoderators[]handle
stringnullable

`user@host`.

dataposts[]communitymoderators[]publishedAt
stringnullable

When the account was created.

dataposts[]communitymoderators[]updatedAt
stringnullable

When the profile last changed.

dataposts[]communitymoderators[]banned
booleannullable

Whether the account is banned.

dataposts[]communitymoderators[]banExpiresAt
stringnullable

When the ban ends.

dataposts[]communitymoderators[]deleted
booleannullable

Whether the account was deleted.

dataposts[]communitymoderators[]isBot
booleannullable

Whether the account is a bot.

dataposts[]communitymoderators[]isLocal
booleannullable

Whether the account lives on the instance asked.

dataposts[]communitymoderators[]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.

dataposts[]communitylanguageIds[]
integeroptional

Who posted it; null on a modlog row, which does not carry the creator.

dataposts[]authorid
integer

User id on this instance.

dataposts[]authorname
string

Username without the host.

dataposts[]authordisplayName
stringnullable

Display name.

dataposts[]authorbio
stringnullable

Profile text as Markdown.

dataposts[]authoravatar
stringnullable

Avatar URL.

dataposts[]authorbanner
stringnullable

Banner URL.

dataposts[]authoractorId
stringnullable

Canonical ActivityPub id.

dataposts[]authorhost
stringnullable

Host the account lives on.

dataposts[]authorhandle
stringnullable

`user@host`.

dataposts[]authorpublishedAt
stringnullable

When the account was created.

dataposts[]authorupdatedAt
stringnullable

When the profile last changed.

dataposts[]authorbanned
booleannullable

Whether the account is banned.

dataposts[]authorbanExpiresAt
stringnullable

When the ban ends.

dataposts[]authordeleted
booleannullable

Whether the account was deleted.

dataposts[]authorisBot
booleannullable

Whether the account is a bot.

dataposts[]authorisLocal
booleannullable

Whether the account lives on the instance asked.

dataposts[]authormatrixUserId
stringnullable

Matrix id the user chose to publish.

dataposts[]body
stringnullable

Post text as Markdown.

Link preview; null when the instance found none.

dataposts[]embedtitle
stringnullable

Embedded page title.

dataposts[]embeddescription
stringnullable

Embedded page description.

dataposts[]embedvideoUrl
stringnullable

Embedded video URL.

dataposts[]altText
stringnullable

Alt text for the image.

Image details; null when the post has no image.

dataposts[]imagelink
string

Image URL.

dataposts[]imagewidth
integernullable

Width in pixels.

dataposts[]imageheight
integernullable

Height in pixels.

dataposts[]imagecontentType
stringnullable

Media type.

dataposts[]featuredInCommunity
booleannullable

Whether it is featured in its community.

dataposts[]featuredOnInstance
booleannullable

Whether it is featured on the instance.

dataposts[]newestCommentAt
stringnullable

When the newest comment was made.

dataposts[]isAdmin
booleannullable

Whether the author is an instance administrator.

dataposts[]isModerator
booleannullable

Whether the author moderates the community.

dataposts[]bannedFromCommunity
booleannullable

Whether the author is banned from the community.

Posts of the same link in other communities; null on list rows.

dataposts[]crossPosts[]id
integer

Post id on this instance.

dataposts[]crossPosts[]apId
stringnullable

Canonical ActivityPub id.

dataposts[]crossPosts[]title
stringnullable

Post title.

dataposts[]crossPosts[]url
stringnullable

Link the post points at; null for a text post.

dataposts[]crossPosts[]urlContentType
stringnullable

Content type of the link.

dataposts[]crossPosts[]thumbnailUrl
stringnullable

Thumbnail URL.

dataposts[]crossPosts[]nsfw
booleannullable

Whether the post is NSFW.

dataposts[]crossPosts[]locked
booleannullable

Whether the post is locked.

dataposts[]crossPosts[]removed
booleannullable

Whether a moderator removed it.

dataposts[]crossPosts[]deleted
booleannullable

Whether it was deleted.

dataposts[]crossPosts[]publishedAt
stringnullable

When it was posted.

dataposts[]crossPosts[]updatedAt
stringnullable

When it last changed.

dataposts[]crossPosts[]languageId
integernullable

Discussion language id.

dataposts[]crossPosts[]isLocal
booleannullable

Whether it was posted on the instance asked.

dataposts[]crossPosts[]score
integernullable

Votes up minus votes down.

dataposts[]crossPosts[]upvotes
integernullable

Upvotes.

dataposts[]crossPosts[]downvotes
integernullable

Downvotes.

dataposts[]crossPosts[]commentCount
integernullable

Comments on the post.

The community it was posted in.

dataposts[]crossPosts[]communityid
integer

Community id on this instance.

dataposts[]crossPosts[]communityname
string

Community name without the host.

dataposts[]crossPosts[]communitytitle
stringnullable

Display title.

dataposts[]crossPosts[]communityactorId
stringnullable

Canonical ActivityPub id.

dataposts[]crossPosts[]communityhost
stringnullable

Host the community lives on.

dataposts[]crossPosts[]communityhandle
stringnullable

`name@host`.

dataposts[]crossPosts[]communityicon
stringnullable

Community icon URL.

dataposts[]crossPosts[]communitynsfw
booleannullable

Whether the community is NSFW.

dataposts[]crossPosts[]communityisLocal
booleannullable

Whether the community lives on the instance asked.

Who posted it; null on a modlog row, which does not carry the creator.

dataposts[]crossPosts[]authorid
integer

User id on this instance.

dataposts[]crossPosts[]authorname
string

Username without the host.

dataposts[]crossPosts[]authordisplayName
stringnullable

Display name.

dataposts[]crossPosts[]authorbio
stringnullable

Profile text as Markdown.

dataposts[]crossPosts[]authoravatar
stringnullable

Avatar URL.

dataposts[]crossPosts[]authorbanner
stringnullable

Banner URL.

dataposts[]crossPosts[]authoractorId
stringnullable

Canonical ActivityPub id.

dataposts[]crossPosts[]authorhost
stringnullable

Host the account lives on.

dataposts[]crossPosts[]authorhandle
stringnullable

`user@host`.

dataposts[]crossPosts[]authorpublishedAt
stringnullable

When the account was created.

dataposts[]crossPosts[]authorupdatedAt
stringnullable

When the profile last changed.

dataposts[]crossPosts[]authorbanned
booleannullable

Whether the account is banned.

dataposts[]crossPosts[]authorbanExpiresAt
stringnullable

When the ban ends.

dataposts[]crossPosts[]authordeleted
booleannullable

Whether the account was deleted.

dataposts[]crossPosts[]authorisBot
booleannullable

Whether the account is a bot.

dataposts[]crossPosts[]authorisLocal
booleannullable

Whether the account lives on the instance asked.

dataposts[]crossPosts[]authormatrixUserId
stringnullable

Matrix id the user chose to publish.

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

dataposts[]moderators[]id
integer

User id on this instance.

dataposts[]moderators[]name
string

Username without the host.

dataposts[]moderators[]displayName
stringnullable

Display name.

dataposts[]moderators[]bio
stringnullable

Profile text as Markdown.

dataposts[]moderators[]avatar
stringnullable

Avatar URL.

dataposts[]moderators[]banner
stringnullable

Banner URL.

dataposts[]moderators[]actorId
stringnullable

Canonical ActivityPub id.

dataposts[]moderators[]host
stringnullable

Host the account lives on.

dataposts[]moderators[]handle
stringnullable

`user@host`.

dataposts[]moderators[]publishedAt
stringnullable

When the account was created.

dataposts[]moderators[]updatedAt
stringnullable

When the profile last changed.

dataposts[]moderators[]banned
booleannullable

Whether the account is banned.

dataposts[]moderators[]banExpiresAt
stringnullable

When the ban ends.

dataposts[]moderators[]deleted
booleannullable

Whether the account was deleted.

dataposts[]moderators[]isBot
booleannullable

Whether the account is a bot.

dataposts[]moderators[]isLocal
booleannullable

Whether the account lives on the instance asked.

dataposts[]moderators[]matrixUserId
stringnullable

Matrix id the user chose to publish.

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/posts?instance=lemmy.world" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Post list.