Telegram Public Data API | SandBase

Choose Telegram channel info or a small recent-message sample with one SandBase key. Understand channel inputs, response shapes, display counts and cursor limits.

Dark cinematic render of Telegram channel, post, and comment data flowing through one API conduit into an agent core

A public Telegram channel can be a source of announcements without becoming an account-integration project. The first decision is whether you need the channel’s metadata or a few recent messages. A profile helps identify the source; a message sample helps you inspect its content. Calling both and every comment thread automatically creates a larger workload than either question requires.

This 2026-11-08 repair checks channel-info and channel-posts through free inspect and saved public reference material. It makes no new business call. The original 2026-09-27 UTC profile excerpt remains below; comments, search and similar-channel routes are historical catalog navigation, not an end-to-end flow re-tested in this revision.

Key takeaway

  • Both selected requests use the key channel. A returned username field does not rename that input.
  • Choose profile metadata or recent messages independently. The posts example requests limit 3 and sends no continuation cursor.
  • Read outputs[0].data directly as the profile or messages/pagination object; do not impose another provider’s nested data or status_code pattern.
  • Subscriber and view labels can be abbreviated strings. They do not establish exact audience growth or unique readers.

The retained cover is conceptual artwork. Its identities, cards, counts and channel-to-comment chain are illustrative, not verified results or actions performed for this revision.

Choose the interface for the task

The selected SandBase reads use a SandBase key without a Telegram login, Bot token or MTProto session in the request. They do not act as a Telegram member or provide private-chat access. SandBase supplies an access layer and does not own or operate Telegram; this guide is not a claim of an official partnership.

Bot actions and account-authorized operations belong to a different integration decision. Do not treat a public profile response as an account credential or assume that a readable channel grants access to every related group or discussion. This page focuses on two public reads and leaves those other actions outside the workflow.

Your first questionExact destinationRequestBusiness shape
Is this the channel I intended?Channel info{"channel":"telegram"}title, username and other profile fields
What does a short recent sample contain?Channel posts{"channel":"telegram","limit":3}channel, messages, pagination

The info schema accepts a bare name, @handle or t.me link and describes automatic normalization. Posts documents a channel username, so the shared tutorial uses the bare name telegram for both. Its stricter local input check does not remove the info API’s documented link support. The actual body key remains channel even though the profile response uses username.

Historical Telegram catalog Historical Telegram catalog screenshot. The old endpoint count and catalog GET labels are navigation, not a new availability check or the execution method of the POST examples.

Hand your agent a bounded first task

Already have a key? Keep SANDBASE_API_KEY in the runtime or secret manager. An agent that is already connected should reuse it. A new project can start from SKILL.md, quickstart.md and the human quickstart, together with one selected result. Do not send the secret in chat.

For example, ask the agent to inspect a public channel profile and return its field names, leaving unavailable values unknown. That is enough to check the first integration without creating a monitoring schedule, fetching posts or analyzing comments. The Python first-request tutorial also offers a separate three-message task and performs explicit transport and business-shape checks.

Shell
curl --fail-with-body --connect-timeout 10 --max-time 90 \
  -X POST https://api.sandbase.ai/v1/api/telegram/web/channel-info \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"channel":"telegram"}'

This curl prints one response. Its HTTP handling does not validate the business payload for you. Check completed status and an object at outputs[0].data; for the selected profile reference, inspect title and username strings. The tutorial rejects missing identity fields rather than presenting an empty object as a successfully identified channel. It also handles JSON errors, timeouts and redirects without exposing response bodies or credentials.

For a separate posts task, choose the posts URL and {"channel":"telegram","limit":3}. Require a response channel, a messages array of objects and a pagination object. Empty messages is different from a missing array. There is no extra business data layer, and these references do not define an integer status_code that must be zero. Reusing a parser from a different platform would read the wrong shape.

What the original profile excerpt shows

This trimmed result belongs to the original 2026-09-27 UTC record, run b7159c20-ae57-47cb-bf5d-e34ab1020d10. The subscriber display is historical, not an up-to-date audience measurement:

JSON
{
  "id": "b7159c20-ae57-47cb-bf5d-e34ab1020d10",
  "status": "completed",
  "model": "telegram/web/channel-info",
  "outputs": [
    {
      "data": {
        "title": "Telegram News",
        "username": "telegram",
        "subscribers": "9.46M",
        "verified": true,
        "counters": { "photos": "16", "videos": "228", "links": "378" }
      }
    }
  ]
}

Independent saved public examples have created_at 2026-10-07T17:37:02.535Z for channel info and 2026-10-07T17:37:14.205Z for posts. The saved requests use channel telegram; posts explicitly requests limit 3. Those saved business objects are direct profile fields or messages/pagination and support the current parser. Reading them on November 8 does not make them new executions.

The short README profile sample and full saved record show different abbreviated subscriber strings. Keep each tied to its own source. This repair does not infer a growth rate from their difference or pretend that both represent synchronized observations. The companion tutorial also preserves an older shared-run-ID ambiguity rather than inventing a corrected execution history.

Historical channel-info parameter reference Historical channel-info parameter and envelope reference. The current example sends channel; the image does not make the old subscriber label current or establish exact audience size.

Count labels need context

Subscribers and counters are returned as strings in the selected references, sometimes abbreviated with M. Views can be abbreviated too. Preserve the raw display alongside the channel, source and retrieval time. A conversion into a numeric estimate may be useful later, but it cannot restore hidden precision, and it should not be presented as an exact number of people.

A message view label does not establish unique readers, engagement quality or conversion. Comparing it with a channel’s rounded subscriber label does not yield an exact engagement rate. Missing views remain unknown; an empty reactions list is not evidence of zero interaction on every surface. False flags and null values should retain their distinct meanings rather than being replaced with a convenient zero.

Metadata and activity also belong to different scopes. The profile title identifies a displayed channel, while a message author or forwarded_from field gives context for an individual post. Keep channel plus message ID for later storage across channels. An ID-only table can collide between unrelated channels, and a forwarded message is not an instruction to expand into its source channel automatically.

A small sample is not an archive

The posts schema allows integer limit 1–100, with default 20. It explicitly says that values above 20 cause the server to page toward older posts. Requesting 100 is therefore not just a larger local print limit: it changes the retrieval workload inside the request. The first-request example fixes the value at 3, omits before and after, and makes no claim of complete coverage or an exact returned count.

The contract describes after and before as integer cursors for newer and older posts respectively, using pagination.after_cursor or pagination.before_cursor from a previous response. Defaults are zero. The saved sample includes other pagination observations such as has_more_before, count and pages_fetched. Preserve them when returned instead of manufacturing a cursor from an ID or a count from an expected limit.

This revision did not test continuation. It does not guarantee duplicate-free alerts, exhaustive history or recovery after a failed poll. A recurring system still needs storage, error handling, cursor-persistence rules and a separately approved workload. The current helper stops after one response and leaves those decisions visible.

Historical channel-posts parameter reference Historical channel-posts parameter reference, not an endpoint-list screenshot. Its pagination inputs describe possible requests; this repair has not executed another page or a monitoring schedule.

Wider capabilities remain separate tasks

The Telegram catalog can help locate a next question. These routes are historical navigation rather than responses revalidated here:

CapabilityRepresentative routeCheck before using it
Single posttelegram/web/post-detailChannel context, post identifier and response shape
Commentstelegram/web/post-commentsCurrent inputs and availability of that thread
Search in channeltelegram/web/channel-searchCurrent search inputs and its own result structure
Related channelstelegram/web/similar-channelsCurrent contract and limits of recommendations

Shared authentication does not make their business fields interchangeable. A successful profile does not validate a comment endpoint, and a returned link preview does not authorize an automatic fetch of its target. The selected task does not render text_html, download photo/video URLs or query all messages for replies. HTML, media completeness and displayed attribution need their own handling in an application.

Price and next decision

Free inspect on 2026-11-08 lists each selected endpoint at $0.001 with eligibility for the organization’s 100 daily calls shared across eligible APIs, resetting at 00:00 UTC. Eligibility is not remaining quota, balance or proof of a free successful request. No actual charge or live business result was measured in this repair.

One selected read lists at $0.001; independently choosing info and posts lists at $0.002 before quota effects. Retries, polling and per-message comment calls add requests. An above-20 posts limit also means HTTP call count alone does not describe underlying pages fetched. Define the next result you need before expanding the workload.

FAQ

Do I send username or channel? Send channel. Username is a field observed in the profile response. For the shared example, use a bare handle; info’s documented normalization support remains separate.

Does this implement a Telegram monitor? It supplies a bounded first response. No new polling, continuation, scheduling or comment traversal was executed or claimed in this revision.

Can abbreviated counts prove exact growth? No. Preserve the original labels and dates; don’t turn rounded displays into exact audience changes or unique-reader totals.

Where is the earlier Python? The historical archive preserves it verbatim with hashes. Use the current tutorial for the checked first request; the original snippets remain evidence rather than current instructions.

Found this useful? Share it