Telegram Search Scraper API
Channels are discovered through a public web search index limited to t.me pages, so this finds what that index has already seen: it is not real time, a channel or message from the last few days may not appear yet, and private channels and invite-only groups never appear. author.ext.search_hit says how the channel was found: match is channel_page (the channel's own page) or post_in_channel (a message or the message preview), title and snippet are the hit as the index showed it, evidence_url is the first page that matched, and matched_urls lists every t.me page the search matched for that channel, so you can open the exact messages. The snippet is the index's text, not the channel's description, so author.bio stays null on a plain call, as do author.followers, author.avatar_url and author.verified. Words in query match loosely; put a phrase in double quotes to require it, and add -word to exclude a word.
GET /api/v1/data/telegram/search · 2 credits per page · The same call repeated within 2 minutes may get the same answer, so data can be up to 2 minutes old.
Inputs
query(required): Keywords describing the channels or messages to find, for example `byd spare parts`. Put a phrase in double quotes to require it.page: Page number, starting at 1. Forwarding `next_cursor` as `cursor` does the same.date_posted: Only pages the search index dates within this window: last-hour, last-day, last-week, last-month or last-year. Useful for monitoring new activity.region: Two-letter country code (US, AE, IN, KR) whose results to prefer.cursor: Leave it out for the first page. For the next page, send next_cursor from the previous answer.
What comes back
result_status(string): success, or not_available when the item does not exist, was removed or is not public.items[].author.avatar_url(string): URL to profile pictureitems[].author.bio(string): Profile biography or descriptionitems[].author.display_name(string): Display name or full nameitems[].author.ext.business_hours(array)items[].author.ext.products(array): Null when it lists none.items[].author.ext.search_hit.evidence_url(string): The exact URL the search hit.items[].author.ext.search_hit.match(string): What was hit: group_page, post_in_group, channel_page or post_in_channel.items[].author.ext.search_hit.matched_urls(array): Every distinct URL the search matched for this channel, in order. Telegram only.items[].author.ext.search_hit.snippet(string): The hit text as the search index showed it. It is not the account's own description.items[].author.ext.search_hit.title(string): The hit title as the search index showed it. It is not the account's own name.items[].author.followers(number): Follower or subscriber count as an integer. YouTube above 1,000 subscribers is YouTube's published three-significant-figure figure. When the integer is a published/rounded value, `author.ext.followers_approximate` is true.items[].author.id(string): Platform-specific user ID (always a string; platform-specific prefixes like `did:`, `spotify:artist:`, `t2_` are stripped)items[].author.url(string): Direct URL to the profile pageitems[].author.username(string): User handle or usernameitems[].author.verified(boolean): Whether the account is verifieditems[].computed.relevance(object)next_cursor(string): Send it as cursor to get the next page; null when there is none.has_more(boolean): Whether there is another page.source_data(object): Everything the platform sent for this call, as it came.
Good to know
- The price depends on what the call returns: from 2 credits to 16 credits.
- Each call returns one page. To get the next page, send next_cursor from the answer as cursor.
- The same call repeated within 2 minutes may get the same answer, so data can be up to 2 minutes old.
Example call
GET /api/v1/data/telegram/search?date_posted=last-hour&query=byd+spare+parts
Questions
How much does the Telegram Search API cost?
Each page costs 2 to 16 credits, depending on what it returns. A call that finds nothing, or fails, costs nothing.
What do I send?
You must send query. 3 more inputs are optional: page, date_posted and region. Inputs go in the query string of a GET, or as JSON in a POST, along with your API key.
How do I get the next page?
Each call returns one page. The answer carries next_cursor: send it back as cursor to get the page after. Each page is charged on its own, and an empty page is free.
How fresh is the data?
The same call repeated within 2 minutes may get the same answer, so data can be up to 2 minutes old.
Do I need a Telegram account or developer app?
No. You call SocialHz with your SocialHz API key, and the same key works for every platform.
Can I try it before paying?
Yes. Signing up gives you 10 free credits, with no card needed.