Skip to content
Scrappa Get API key
Lemmy API 1 credit / request

Lemmy Post Detail API Documentation

GET https://scrappa.co/api/lemmy/post

Lemmy Post Detail API returns a single Lemmy post by its numeric id as JSON: id, title, url, body (markdown plus plain-text), community, creator, score, upvotes, downvotes, comment count, publish date, thumbnail, cross-posts and moderators. The response also includes the comment tree rebuilt from the dotted path, with content (markdown plus plain-text), score, child count and creator per comment. Comments are best-effort within the same billable request.

Lemmy Post Detail API Documentation 1 credit / request

Endpoint

Request preview
GET
https://scrappa.co/api/lemmy/post
Auth header
x-api-key
Cost
1 credit / request
id = 1234567890
Response preview
200 OK
{
    "data": {
        "post": {
            "id": 53070436,
            "url": "https://lemmy.world/pictrs/image/def456.jpeg",
            "body": "Post body markdown content",
            "score": 42,
            "title": "A technology post title",
            "creator": {
                "id": 3100864,
                "name": "EatingPies"
            },
            "upvotes": 45,
            "community": {
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

4 optional filters available.

id integer Required

Lemmy post numeric id. Example: 53070436.

Example value 1234567890
comment_sort string Optional

Comment sort order. One of: Top, New, Old, Hot. Defaults to Top.

Example value example
comment_limit integer Optional

Comments per page. Server caps at 50. Defaults to 5.

Example value 10
max_depth integer Optional

Maximum comment tree depth to return. Omit for full depth.

Example value 10
instance string Optional

Lemmy instance hostname. Defaults to lemmy.world. The hostname must resolve to a public address; private, loopback and unresolvable hosts are rejected without charge.

Example value example

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Response fields

38 fields
Field Type
data.post.id integer
data.post.url string
data.post.body string
data.post.score integer
data.post.title string
data.post.creator.id integer
data.post.creator.name string
data.post.upvotes integer
data.post.community.id integer
data.post.community.name string
data.post.community.title string
data.post.downvotes integer
data.post.published string
data.post.body_plain string
data.post.moderators array
data.post.moderators[].id integer
data.post.moderators[].name string
data.post.cross_posts array
data.post.thumbnail_url string
data.post.comments_count integer
data.comments array
data.comments[].id integer
data.comments[].path string
data.comments[].score integer
data.comments[].content string
data.comments[].creator.id integer
data.comments[].creator.name string
data.comments[].replies array
data.comments[].upvotes integer
data.comments[].downvotes integer
data.comments[].published string
data.comments[].child_count integer
data.comments[].content_plain string
data.comments[].distinguished boolean
data.comments_has_more boolean
meta.billable boolean
meta.endpoint_family string
success boolean
JSON Response
200 OK
{
    "data": {
        "post": {
            "id": 53070436,
            "url": "https://lemmy.world/pictrs/image/def456.jpeg",
            "body": "Post body markdown content",
            "score": 42,
            "title": "A technology post title",
            "creator": {
                "id": 3100864,
                "name": "EatingPies"
            },
            "upvotes": 45,
            "community": {
                "id": 2478,
                "name": "technology",
                "title": "Technology"
            },
            "downvotes": 3,
            "published": "2026-10-10T14:30:00.000000Z",
            "body_plain": "Post body plain text",
            "moderators": [
                {
                    "id": 1,
                    "name": "admin"
                }
            ],
            "cross_posts": [],
            "thumbnail_url": "https://lemmy.world/pictrs/image/ghi789.jpeg",
            "comments_count": 167
        },
        "comments": [
            {
                "id": 26295573,
                "path": "0.26295573",
                "score": 12,
                "content": "Comment content",
                "creator": {
                    "id": 3100864,
                    "name": "EatingPies"
                },
                "replies": [],
                "upvotes": 12,
                "downvotes": 0,
                "published": "2026-10-10T15:00:00.000000Z",
                "child_count": 34,
                "content_plain": "Comment content",
                "distinguished": false
            }
        ],
        "comments_has_more": true
    },
    "meta": {
        "billable": true,
        "endpoint_family": "post_detail"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

The id parameter is missing or not a positive integer. This response is not billable.

{
    "errors": {
        "id": [
            "The id field is required."
        ]
    },
    "message": "The request validation failed"
}
404

Post Not Found

The requested Lemmy post was not found. This response is not billable.

{
    "error": {
        "code": "NOT_FOUND",
        "message": "The requested Lemmy resource was not found."
    },
    "success": false
}
503

Upstream Unavailable

The Lemmy API is temporarily unavailable. This response is not billable.

{
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "The Lemmy API is temporarily unavailable. Please retry."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.