Skip to Content
DocumentationExplore conversations

Find the useful part

Read a channel, look through a project discussion, or inspect a handful of useful links. Sign in first; the same session works for every command. These examples use fx to make the output immediately explorable.

Open a conversation

indexit -q telegram fetch messages \ --dialog @example_channel --limit 200 | fx

Replace @example_channel with your channel or group. https://t.me/example_channel works too. A public username can resolve without a populated peer cache.

Messages arrive newest first, with text, dates, available sender information, replies, forwards, and media descriptions. In fx, press / to search the contents or @ to find a field. Try the browser demos.

Remove --limit to walk all available history, or add --timeout 5m to bound the operation. Service events such as “member joined” or “topic created” are skipped.

Each message ID is emitted at most once per run, including for forum topics. Repeated IDs do not consume --limit; distinct messages with the same text remain separate. If a nonempty page provides no older IDs, the command exits with an error rather than reporting an incomplete export as successful.

Find a private conversation

indexit -q telegram fetch dialogs | fx

Find the conversation’s title and copy its uid into --dialog. Listing dialogs populates the peer cache required by numeric IDs and private links. For selection by name, use the fzf workflow.

Look through a particular month

indexit -q telegram fetch messages \ --dialog @example_channel \ --from 2026-08-01T00:00:00Z \ --to 2026-09-01T00:00:00Z | fx

Dates use RFC3339, including Z for UTC or an offset such as +03:00. --from supplies the lower time bound; --to supplies the upper date cursor. These are history windows, not a live snapshot.

For ID-based windows, --min-id 500 requests IDs above 500 and --max-id 1000 requests IDs below 1000. Both ID bounds are exclusive, following Telegram’s history API .

Fetch only the messages you picked

Use singular message when you have exact links:

indexit -q telegram fetch message \ https://t.me/example_channel/11 \ https://t.me/example_channel/46 | fx

Or supply IDs directly:

indexit -q telegram fetch message \ --dialog @example_channel --id 11 --id 46,47 | fx

Links are grouped by dialog and topic in first-seen order. IDs keep their order within each group; duplicates in that group are fetched once. --limit caps the total output across groups. History date/ID windows and --page-size do not apply here.

Missing, inaccessible, service, and out-of-scope messages are skipped. A successful command can return fewer records than requested. Omit -q when you want to see the skip warnings.

Get an album post whole

A post with several photos or videos is an album: Telegram keeps it as one message per photo or video, and a link points to one of them. A link to any of them gives the whole album, in message order, each message as a record of its own with its text and media. The author’s text is on one of them, not necessarily the linked one. Each message is emitted once per run, also when several links point into the same album. A member missing between two others, such as a deleted one, is named in a warning, and the others are still emitted.

indexit -q telegram fetch message https://t.me/example_channel/12 | jq -c '{id, grouped_id, text, media: .media.type}'
InputMeaning
@example_channelA public dialog
https://t.me/example_channelThe same dialog by link
https://t.me/example_channel/46Dialog plus message 46
https://t.me/example_forum/42/46Public forum, topic 42, message 46

messages explores history; message selects exact messages. For history, a link identifies the dialog and any explicit topic; its final message number is not applied as a cursor. Use window flags to restrict history.

Continue with topics and media to bring photos home, or jq filters to extract just the fields you need.

Local photograph URLs

Both message commands include media.preview_url by default for ordinary cloud photographs of channel and supergroup posts, the posts you can copy a message link to. URLs point to http://indexit.localhost:17840/ and name the channel, the post and the exact Telegram photo: /preview/telegram/v1/c<channel>/<message>/p<photo>.jpg. Nothing in them identifies your account, so another computer can show them too. Producing a URL writes nothing, needs no running service and downloads nothing. Photographs of private chats and basic groups get no URL; fetch media downloads them. A photograph that cannot be kept, such as one that expires, gets media.preview_error instead.

The local service downloads the largest available Telegram JPEG on first GET, using your existing Telegram authorization and MTProto proxy. It does not scrape Telegram web pages or use temporary public CDN links. Saved bytes survive source post deletion, edits, logout, account changes and service upgrades. An uncached URL answers 410 if the original photo has disappeared or was replaced; it never returns a replacement.

See Local image service for explicit setup and lifecycle.