Lemmy Post API
One post with its link, text, votes, cross-posts and the community's moderators, by post id or comment id.
GET /v1/lemmy/post1 credit Failed requests are free
About this endpoint
GET /v1/lemmy/post?instance=lemmy.world&id=53910627 returns data.post with title, body, url, urlContentType, thumbnailUrl, image, embed, altText, publishedAt, updatedAt, score, upvotes, downvotes, commentCount, newestCommentAt, featuredInCommunity, featuredOnInstance, isAdmin, isModerator, bannedFromCommunity, community, author, crossPosts and moderators.
Give exactly one of id or commentId; the comment id finds the post that comment belongs to. A removed or deleted post still carries its flags, and a missing post returns lookupStatus: not_found. Cross-posts and moderators are only carried on this single-post route; list rows do not include them.
Lemmy Post API FAQ
Can I find a post from a comment?
Yes. Pass commentId instead of id, and the answer is the post that comment belongs to.
Are cross-posts included?
Yes on this route. post.crossPosts lists the same link posted in other communities, and post.moderators lists the community's moderators. List rows leave both null.
Does a removed post still come back?
A post the instance still serves comes back with removed or deleted set. If the instance no longer serves it, the answer is lookupStatus: not_found, and the moderation log may still hold the removal with its title and body.
How many credits does a post lookup 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.