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

Telegram Post

GET https://scrappa.co/api/telegram/posts/{username}/{post_id}

A single post with its reactions, views, media, poll and document metadata.

Existence is decided by the post itself, never by the response status: an unknown or future post id answers 200 with found: false. Add context=1 to also receive the surrounding post window.

Telegram Post 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/telegram/posts/{username}/{post_id}
Auth header
x-api-key
Cost
1 credit/request
username = example post_id = 1234567890
Response preview
200 OK
{
    "data": {
        "post": {
            "id": 459,
            "date": "2026-07-16T20:45:25+00:00",
            "channel": "telegram",
            "post_key": "telegram/459"
        },
        "found": true,
        "channel": {
            "username": "telegram"
        },
        "context_count": null,
        "context_posts": null,
...

Parameters

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

Runnable path

2 required parameters needed before sending a request.

1 optional filter available.

username string Required

Public channel handle. A bare handle or an @handle also works in the path; use this parameter for the host forms, which contain a slash: t.me/telegram, t.me/s/telegram, https://t.me/s/telegram, https://telegram.me/telegram, https://telegram.dog/telegram. Every form normalises to the bare lowercase handle, because Telegram usernames are case-insensitive, and no request is ever issued to a mirror host.

When this parameter is present it is the handle that is used; the path segment is only the fallback for the forms that fit there.

Example value example
post_id integer Required

Numeric post id.

Example value 1234567890
context boolean Optional

Also return the surrounding post window.

Example value true

Response Schema

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

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "post": {
            "id": 459,
            "date": "2026-07-16T20:45:25+00:00",
            "channel": "telegram",
            "post_key": "telegram/459"
        },
        "found": true,
        "channel": {
            "username": "telegram"
        },
        "context_count": null,
        "context_posts": null,
        "target_position": 0
    },
    "meta": {
        "attempts": 1,
        "duration_ms": 401
    },
    "success": true
}

Errors

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

422

Validation Error

The username, post id or search query failed validation. A 422 carries a message and an errors map, and no error code.

{
    "errors": {
        "username": [
            "The username may only contain letters, digits and underscores."
        ]
    },
    "message": "The request validation failed"
}
503

Upstream Unavailable

No usable page came back. The request did not consume a credit. The code varies by failure type: UPSTREAM_HTTP_ERROR when the target answered with a non-successful status, TELEGRAM_DISABLED while the surface is switched off, TRANSPORT_ERROR when every gateway failed to connect, and a generic upstream_unavailable when no connection was available at all.

{
    "error": {
        "code": "UPSTREAM_HTTP_ERROR",
        "message": "Telegram did not return usable data. 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.