Telegram Keyword Scraper: Search Posts in Public Channels avatar

Telegram Keyword Scraper: Search Posts in Public Channels

Pricing

from $1.34 / 1,000 items

Go to Apify Store
Telegram Keyword Scraper: Search Posts in Public Channels

Telegram Keyword Scraper: Search Posts in Public Channels

Scrape telegram keyword matches in public channels you supply. Export post text, dates, views, reactions and media URLs with bounded history scanning. No account required.

Pricing

from $1.34 / 1,000 items

Rating

0.0

(0)

Developer

GoFetch

GoFetch

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

4 days ago

Last modified

Features

Limited permissions

Share

This scraper for telegram keyword searches returns matching posts from public channels you supply. Enter channel usernames or URLs and literal keywords to export post text, dates, views, reactions and visible media links. It is channel-scoped: there is no Telegram-wide search without an account, and this actor does not provide one. No Telegram account, Bot API, MTProto, search engines or third-party catalogues are used.

What data you get

One saved row represents one public channel post whose own text body or media caption contains at least one requested phrase. Each row includes every matching phrase in matchedKeywords, even when several keywords find the same post. Media-only posts, stickers and service notices (such as pinned-message or channel-rename notices) are excluded. Canonical messageUrl identifies a post, and id contains channel/messageId for downstream joins.

The output includes channel title, description, visible subscriber count and avatar; post text and HTML; publication date; visible view and reaction counts; forwarded source, reply context, links and media URLs. The author field contains only the name shown on the public post. Missing optional values are null or empty arrays. The actor does not fetch phone numbers, channel members or personal contact profiles. textHtml retains the published message markup, including line breaks. Plain text and channelDescription decode HTML entities, convert <br> elements to newlines and trim surrounding whitespace; other text labels are extracted as plain text with surrounding whitespace trimmed.

Use the data to follow announcements in channels you already know, compare discussion of a topic across selected publications, or feed matching posts into an internal report. This is a bounded public-preview export; it cannot establish complete coverage of Telegram.

How to use it

In Apify Console, open the actor, enter channels and keywords, choose a result limit, and select Start. The prefilled example uses two large official channels, telegram and durov, the evergreen phrase telegram, and ten results. Results appear in the default dataset; download JSON, CSV, Excel or other supported dataset exports.

Call the API with your Apify token in an authorization header:

const response = await fetch(
'https://api.apify.com/v2/acts/xmolodtsov~telegram-keyword-scraper/run-sync-get-dataset-items?timeout=120',
{
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.APIFY_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
channels: ['telegram', 'durov'],
keywords: ['telegram'],
maxItems: 10,
maxScanPagesPerChannel: 10,
}),
},
);
if (!response.ok) throw new Error(`Run failed: ${response.status}`);
const posts = await response.json();

For longer scans, start an asynchronous run and retrieve its dataset after completion. An Apify MCP client can also call this actor using the same JSON input. Supply channels explicitly when asking an MCP assistant to search: a keyword alone is insufficient. See Apify API documentation for runs and dataset access.

Pricing

The saved-post event is the only actor charge. Duplicate discoveries, unmatched posts and failed requests produce no saved-post events.

Apify planPrice per 1,000 saved posts
FREE$1.92
BRONZE$1.73
SILVER$1.54
GOLD$1.34

Platinum and Diamond use the Gold rate. For example, ten saved posts correspond to $0.0192 at the listed Free tier or $0.0134 at Gold; 200 posts correspond to $0.384 or $0.268 respectively. Apify's treatment of free-plan event charges follows its platform billing rules. The plan name in this table does not remove the developer's free quota.

Sparse phrases still require source requests. By default the actor reads up to ten history pages per channel and up to three additional native search pages for each keyword. Most history pages contain about twenty visible posts, but this varies. Increasing the history bound increases work even if it yields no rows. A result cap and the user's charge budget stop further work.

Is it free?

On the Apify free plan, this developer allows 100 results per run and 20 runs per month per user. The monthly allowance resets on the first day of each UTC calendar month. After twenty admitted runs, another run succeeds with zero results and makes no source requests. The quota uses developer-owned storage and cannot be reset by changing input or caller storage. Paid plans have no developer free quota. The developer owner and platform TEST runs are exempt.

Input

channels and keywords are both required. Channels accept public usernames, optional @, or HTTP(S) channel URLs on t.me, telegram.me and telegram.dog, including optional www and /s/. URL query parameters and fragments are ignored. Supply channel links rather than post, invite or internal /c/ links. At most 100 channels and twenty phrases are accepted, with each phrase limited to 200 characters. Duplicate channels and case-equivalent phrases are combined.

Matching is a literal substring check on post text after Unicode NFC normalization and Unicode lowercase conversion. It is case-insensitive, supports non-ASCII text and treats punctuation literally. It does not interpret regular expressions, transliterate text or apply language-specific stemming. A phrase may match inside a longer word. text, textHtml and links come only from the post's own body or caption. Quoted reply parents, forwarded-source headers, link preview cards, polls and edited markers do not enter those fields or qualify a post. replyTo and forwardedFrom retain their separate context fields. Linked text and blockquotes published within the own body do qualify; album captions are retained once per post.

maxItems is a global saved-post limit, default 100, maximum 100,000. The Console prefill is ten. maxScanPagesPerChannel defaults to ten, from 1 to 1,000. Each channel's chronological history is scanned once, matching all phrases locally. Native ?q= searches add older matches beyond that scan; Telegram's native search often stops after about 22 hits. It is not an exhaustive keyword index.

Optional dateFrom and dateTo accept inclusive YYYY-MM-DD dates in UTC; empty values disable the bound. History stops when a whole page is older than dateFrom. A dateTo filter does not jump over newer pages, which still consume the scan bound. Results are not globally sorted across channels.

proxyConfiguration defaults to Apify datacenter. Residential groups are rejected through both SDK aliases, groups and apifyProxyGroups, including mixed-case values; supported groups are automatic selection, BUYPROXIES94952 and SHADER. Country, subdivision, tiered routes and unknown routing options are unsupported. Paid callers may supply HTTP(S) proxy URLs or explicitly disable Apify Proxy. SOCKS and other proxy protocols are rejected as invalid: before quota admission or source requests. Free runs ignore valid caller proxies and always use Apify datacenter. The resolved proxy class is recorded in STATISTICS. Memory defaults to 256 MB with a 512 MB maximum.

Output

This example uses values from a real public-source run:

{
"id": "telegram/334",
"channel": "telegram",
"channelTitle": "Telegram News",
"channelDescription": "The official Telegram on Telegram. Much recursion. Very Telegram. Wow.",
"subscriberCount": 9090000,
"subscriberCountLabel": "9.09M",
"channelAvatarUrl": "https://cdn1.telesco.pe/file/nbSZNqRLY0v-sEAhdqB1GSbRgjI7dXcd44juoiLx2URFFOycwLB1_gPBD2FTgQ9guvpAVM5tm9ZTSR_Hw_f3VJoxJOdwVfreiLPRPyKDsvPm-MZHq4Ih1g7BCiVpZadIXjM0LhbCaeTkGq_UhsbdFvgWYaI8PUqZ0cFyzIQmr_VgPTCWycxaRf3r33HCYVvNUmyCajjk3OR3K_k7pgioIDqdir7Zhuy0CALHkqxeAM6JOxYa5m21J33mu1h37fE18tZPpzNDCna-FGVtO_1JV58b9sUwRkJqdTONH6GF1sinxlEPpOqzecaUo--VbkpQsLIAjkz332vp_AhQU5Kn4w.jpg",
"isVerified": true,
"messageId": 334,
"messageUrl": "https://t.me/telegram/334",
"text": "Due to the recent events in the Middle East, particularly in Israel, Lebanon, and Iran, Telegram experienced unprecedented loads. In the past few days, some users may have faced temporary connection issues and difficulties accessing media. Thanks to our technical team's efforts, Telegram remained available in most countries, and all issues are now fully resolved. We apologize for any inconvenience.",
"textHtml": "Due to the recent events in the Middle East, particularly in Israel, Lebanon, and Iran, Telegram experienced unprecedented loads. In the past few days, some users may have faced temporary connection issues and difficulties accessing media. Thanks to our technical team's efforts, Telegram remained available in most countries, and all issues are now fully resolved. We apologize for any inconvenience.",
"date": "2024-10-04T15:57:08+00:00",
"views": 4900000,
"viewsLabel": "4.9M",
"author": null,
"reactions": [],
"forwards": null,
"forwardedFrom": null,
"forwardedFromUrl": null,
"replyTo": null,
"links": [],
"media": [],
"matchedKeywords": [
"telegram"
]
}

Matching public channel posts output preview

Counts reflect the public preview at collection time. Abbreviated view, subscriber and reaction counts are converted to numbers and remain approximate. viewsLabel and subscriberCountLabel retain the displayed labels. Reactions retain custom emoji IDs and a paid-reaction flag where present. Media links point to the visible source asset; no files are downloaded, and CDN links may expire. textHtml is untrusted source HTML: sanitize it before rendering.

Guarantees and failure semantics

Every saved post matches at least one requested phrase. Rows are deduplicated by canonical message URL before persistence. On restart, saved dataset URLs seed deduplication through an empty dataset page. A pending uncertain append stops further source work instead of retrying an append that might already have saved rows. Saved rows remain available after later failures; such runs succeed with partial results and record the incomplete channel in STATISTICS.

With zero saved rows, a run is FAILED if any channel could not return a usable public preview or complete within its documented bounds. Status messages begin with blocked:, network:, timeout:, invalid: or outdated:. Invalid covers missing usernames, private/no-preview channels, accounts, bots and groups; these receive input-level notes. If all channels are invalid, the run fails invalid: rather than claiming no results. Mixed valid and invalid channels can produce a successful partial dataset when rows were saved.

A zero-row “No results” success requires every supplied channel to return a valid public preview and every search/scan to complete or reach its documented page/date bound without matches. Quota refusal and a user charge-limit stop have separate explicit messages. HTTP status and challenge layout determine blocks; words such as captcha in a post do not.

STATISTICS contains per-channel history and search page counts, exhausted, limited, stop reasons, next cursors and input notes. A page, date, time, result or charge cap means bounded coverage, never history exhaustion. completedInputs counts only fully exhausted units; native-search completion alone says nothing about the entire history. Partial failures are visible even when other channels produce rows. Requests have bounded timeouts, one fresh-session retry and strictly decreasing, unrepeated cursors. Work stops before the run deadline.

Integrations

Use Apify integrations to send dataset rows to your existing workflow. Schedules can repeat the same known-channel scan; webhooks can notify your application when a run finishes. Dataset exports work with spreadsheets and BI tools. For incremental collection across separate runs, keep messageUrl as the unique key in your destination: this actor deduplicates within a run and its restarts, not across independent runs.

More scrapers from this developer

TikTok: TikTok Search Scraper: videos and creators for any keyword, pay per result · TikTok Profile Scraper (Pay Per Result): profiles, followers and latest posts by username · TikTok Comments Scraper: comments and full reply threads from any video · TikTok Hashtag Scraper: videos for any hashtag, with views, likes and music · TikTok Sound & Music Scraper: videos that use a sound or song · TikTok Top Ads Scraper: public Creative Center ad rankings, engagement, media and landing pages

Social & news: Reddit Search Scraper: posts by keyword, subreddit or author · Google News Scraper: google News results as clean full-text articles · Threads Replies Scraper: public post replies, likes, authors and inline nested replies · Threads Posts Scraper: public profile timelines with likes, replies and reposts · Pinterest Videos Scraper: public Pinterest videos by keyword or board, with MP4 links and stats

Instagram: Instagram Reel Scraper: public profile reels, plays, captions, music and media URLs · Instagram Comment Scraper: public post and reel comments, likes, timestamps and usernames · Instagram Post Scraper: public profile posts, likes, captions, locations and media URLs

E-commerce: Prom.ua Product Search Scraper: prom.ua product search results, no browser needed · Amazon Product Search & Bestsellers Scraper: search results, product details from Amazon · AliExpress Search Scraper: aliExpress products by keyword with prices, orders and shipping · AliExpress Product Reviews Scraper: public product reviews, ratings, buyer photos and follow-up feedback

Maps & leads: Google Maps Scraper: places, leads and emails from Google Maps

Ads: Facebook Ad Library Scraper (Meta Ads Library): ads from the Meta Ad Library, with EU reach and payers · Google Ads Transparency Scraper: google ad creatives by advertiser or domain, with regional details

Video: YouTube Transcript Scraper: transcripts, subtitles and captions from YouTube videos · YouTube Shorts Scraper: shorts of any channel with exact views, likes and duration · YouTube Channel Scraper: every video of a channel, with channel stats · YouTube Search Scraper: search results and videos for any keyword · YouTube Comments Scraper: comments, replies and likes from any video · Bilibili Comments Scraper: public hot comments and reply threads by video or keyword

Jobs: SEEK Job Listings Scraper: public AU/NZ job listings, salaries and redacted descriptions

FAQ

Does it search all Telegram channels?

No. You must supply public channel usernames or URLs in channels and phrases in keywords. There is no anonymous Telegram-wide search here, and the actor does not discover channels or use an account. Accounts, bots, private channels and groups do not qualify as broadcast-channel previews.

Why are older matching posts missing?

The default history scan is bounded, and Telegram's native keyword search exposes a small subset. Raise maxScanPagesPerChannel if deeper coverage justifies additional work. Read each channel's STATISTICS coverage before treating a dataset as complete. Deleted, restricted or preview-hidden posts cannot be recovered.

This actor accesses public data without authentication. Public availability does not remove your responsibilities: choose a lawful purpose, minimize retained information and respect applicable terms, copyright, GDPR and CCPA obligations. Do not use the output for personal-contact enrichment or to bypass access restrictions.

Does a zero-result run prove the keyword never appeared?

Only within the accessible preview and documented bounds. A successful empty run records its coverage; a channel error produces a failure or a partial-result note. A limited history is not a complete absence claim.

Support

Open the actor's Issues tab on Apify with the run ID, requested public channel, expected message URL and coverage notes. Never include tokens, cookies or private channel content. For platform API and export help, use Apify documentation.