GroundsocialDocs

API · Telegram

GET /telegram/channels/{handle}/posts

A page of a public channel’s posts (20, newest first), or posts matching words.

RequestGET /v1/telegram/channels/{handle}/posts
Operation idtelegram.channel.posts
Cost1 credit, refunded if the call fails
AuthAPI key: Authorization: Bearer <key> or x-api-key.

A page of a public channel’s posts (20, newest first), or posts matching words.

Path parameters

NameTypeRequiredDescription
handlestringyesChannel username, with or without the @, or a t.me link. Example: durov.

Query parameters

NameTypeRequiredDescription
qstringnoWords to search for inside the channel.
sincestringnoOnly posts on or after this date (YYYY-MM-DD or ISO 8601).
untilstringnoOnly posts on or before this date (that whole UTC day for YYYY-MM-DD).
afterstringnoCursor: the previous page’s pagination.next_cursor.

Responses

StatusMeaningSchema
200A page of posts.TelegramMessagesResponse
400Invalid input. Nothing was charged.Error
401Missing or invalid API key.Error
402Not enough credits, a spend cap was reached, or payment is required.Error
403The target is private, or the account is suspended.Error
404No public Telegram chat or post by that name.Error
429Too many requests. Wait for Retry-After seconds.Error
503Telegram is temporarily unavailable. Retryable; nothing was charged.Error

TelegramMessagesResponse fields

FieldTypeDescription
chatTelegramChatRef
messagesTelegramMessage[]Newest first.
paginationTelegramPaginationolderPosts

Errors use one shape everywhere; see Errors for every code and what to do.