Lemmy

List Lemmy post comments

List comments on one Lemmy post, or the replies to one comment.

GET/v1/lemmy/post/comments
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.

postIdintegeroptionalquery

Post id on the chosen instance, e.g. `53910627`.

≥ 1 · ≤ 2147483647

parentIdintegeroptionalquery

List this comment and its replies instead of the whole post. Walk a deeper branch by passing one of its reply ids here.

≥ 1 · ≤ 2147483647

sortstringoptionalquery

Order. `Controversial` is refused by 0.18 instances.

one of: Hot, Top, New, Old, Controversial

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
113

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.

Comments, in the order asked for.

datacomments[]id
integer

Comment id on this instance.

datacomments[]apId
stringnullable

Canonical ActivityPub id.

datacomments[]content
stringnullable

Comment text as Markdown; empty when a moderator removed it or its author deleted it.

datacomments[]postId
integernullable

The post it belongs to.

datacomments[]path
stringnullable

The dotted ancestor chain, from the root post (`0.1234.5678`).

datacomments[]depth
integernullable

Depth in the tree, from `path`.

datacomments[]parentId
integernullable

The comment it replies to; null for a top-level comment.

datacomments[]distinguished
booleannullable

Whether a moderator marked it as a moderator comment.

datacomments[]languageId
integernullable

Discussion language id.

datacomments[]isLocal
booleannullable

Whether it was written on the instance asked.

datacomments[]removed
booleannullable

Whether a moderator removed it.

datacomments[]deleted
booleannullable

Whether its author deleted it.

datacomments[]publishedAt
stringnullable

When it was written.

datacomments[]updatedAt
stringnullable

When it last changed.

datacomments[]score
integernullable

Votes up minus votes down.

datacomments[]upvotes
integernullable

Upvotes.

datacomments[]downvotes
integernullable

Downvotes.

datacomments[]replyCount
integernullable

Direct replies.

datacomments[]isAdmin
booleannullable

Whether the author is an instance administrator.

datacomments[]isModerator
booleannullable

Whether the author moderates the community.

datacomments[]bannedFromCommunity
booleannullable

Whether the author is banned from the community.

The post it belongs to.

datacomments[]postid
integer

Post id on this instance.

datacomments[]postapId
stringnullable

Canonical ActivityPub id.

datacomments[]posttitle
stringnullable

Post title.

datacomments[]posturl
stringnullable

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

datacomments[]posturlContentType
stringnullable

Content type of the link.

datacomments[]postthumbnailUrl
stringnullable

Thumbnail URL.

datacomments[]postnsfw
booleannullable

Whether the post is NSFW.

datacomments[]postlocked
booleannullable

Whether the post is locked.

datacomments[]postremoved
booleannullable

Whether a moderator removed it.

datacomments[]postdeleted
booleannullable

Whether it was deleted.

datacomments[]postpublishedAt
stringnullable

When it was posted.

datacomments[]postupdatedAt
stringnullable

When it last changed.

datacomments[]postlanguageId
integernullable

Discussion language id.

datacomments[]postisLocal
booleannullable

Whether it was posted on the instance asked.

datacomments[]postscore
integernullable

Votes up minus votes down.

datacomments[]postupvotes
integernullable

Upvotes.

datacomments[]postdownvotes
integernullable

Downvotes.

datacomments[]postcommentCount
integernullable

Comments on the post.

The community it was posted in.

datacomments[]postcommunityid
integer

Community id on this instance.

datacomments[]postcommunityname
string

Community name without the host.

datacomments[]postcommunitytitle
stringnullable

Display title.

datacomments[]postcommunityactorId
stringnullable

Canonical ActivityPub id.

datacomments[]postcommunityhost
stringnullable

Host the community lives on.

datacomments[]postcommunityhandle
stringnullable

`name@host`.

datacomments[]postcommunityicon
stringnullable

Community icon URL.

datacomments[]postcommunitynsfw
booleannullable

Whether the community is NSFW.

datacomments[]postcommunityisLocal
booleannullable

Whether the community lives on the instance asked.

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

datacomments[]postauthorid
integer

User id on this instance.

datacomments[]postauthorname
string

Username without the host.

datacomments[]postauthordisplayName
stringnullable

Display name.

datacomments[]postauthorbio
stringnullable

Profile text as Markdown.

datacomments[]postauthoravatar
stringnullable

Avatar URL.

datacomments[]postauthorbanner
stringnullable

Banner URL.

datacomments[]postauthoractorId
stringnullable

Canonical ActivityPub id.

datacomments[]postauthorhost
stringnullable

Host the account lives on.

datacomments[]postauthorhandle
stringnullable

`user@host`.

datacomments[]postauthorpublishedAt
stringnullable

When the account was created.

datacomments[]postauthorupdatedAt
stringnullable

When the profile last changed.

datacomments[]postauthorbanned
booleannullable

Whether the account is banned.

datacomments[]postauthorbanExpiresAt
stringnullable

When the ban ends.

datacomments[]postauthordeleted
booleannullable

Whether the account was deleted.

datacomments[]postauthorisBot
booleannullable

Whether the account is a bot.

datacomments[]postauthorisLocal
booleannullable

Whether the account lives on the instance asked.

datacomments[]postauthormatrixUserId
stringnullable

Matrix id the user chose to publish.

The community of the post.

datacomments[]communityid
integer

Community id on this instance.

datacomments[]communityname
string

Community name without the host.

datacomments[]communitytitle
stringnullable

Display title.

datacomments[]communityactorId
stringnullable

Canonical ActivityPub id.

datacomments[]communityhost
stringnullable

Host the community lives on.

datacomments[]communityhandle
stringnullable

`name@host`.

datacomments[]communityicon
stringnullable

Community icon URL.

datacomments[]communitynsfw
booleannullable

Whether the community is NSFW.

datacomments[]communityisLocal
booleannullable

Whether the community lives on the instance asked.

Who wrote it.

datacomments[]authorid
integer

User id on this instance.

datacomments[]authorname
string

Username without the host.

datacomments[]authordisplayName
stringnullable

Display name.

datacomments[]authorbio
stringnullable

Profile text as Markdown.

datacomments[]authoravatar
stringnullable

Avatar URL.

datacomments[]authorbanner
stringnullable

Banner URL.

datacomments[]authoractorId
stringnullable

Canonical ActivityPub id.

datacomments[]authorhost
stringnullable

Host the account lives on.

datacomments[]authorhandle
stringnullable

`user@host`.

datacomments[]authorpublishedAt
stringnullable

When the account was created.

datacomments[]authorupdatedAt
stringnullable

When the profile last changed.

datacomments[]authorbanned
booleannullable

Whether the account is banned.

datacomments[]authorbanExpiresAt
stringnullable

When the ban ends.

datacomments[]authordeleted
booleannullable

Whether the account was deleted.

datacomments[]authorisBot
booleannullable

Whether the account is a bot.

datacomments[]authorisLocal
booleannullable

Whether the account lives on the instance asked.

datacomments[]authormatrixUserId
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/post/comments?instance=lemmy.world&postId=53910627" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Comment list.