跳到正文
DEV Community· Monkey.D.Scraping·· 12 天前AI 評分51

我如何在沒有 Telegram 帳戶或電話號碼的情況下監測品牌提及

How I monitor brand mentions on Telegram (no account, no phone number)

AI 導讀

Monkey.D.Scraping 示範如何用自製工具 Telegram Keyword Search 搜尋 Telegram 公開頻道中的品牌提及,毋須 Telegram 帳戶或電話號碼;私密羣組不在支援範圍內。

正文

A lot of stuff hits Telegram before it hits X or the news: crypto launches, leaks, product complaints, regional news. If you do OSINT, PR or brand monitoring, you want to know when a name shows up in public channels.

Two problems:

  1. Telegram has no public "search all channels" page.
  2. The official API wants a phone number and an account.

So I built a tool for it: Telegram Keyword Search. Disclosure up front: it's mine, it runs on Apify and it's pay-per-result. A first test costs about one cent.

What we want

For a keyword (your brand, a product, a competitor), a table with:

  • post text
  • publication date
  • channel name
  • a direct link to the original post
  • views, reactions and media when the channel shows them

…as CSV or JSON, without logging in to Telegram.

Step 1: run a tiny search

Open the five-post starter of Telegram Keyword Search, swap bitcoin for your brand and hit Start. (Or open the Actor page and start from the prefilled input.)

Price, no surprises:

  • $0.001 per saved post
  • $0.005 per search page checked
  • $0.00005 start fee

One search page + five posts = $0.01005. A search that finds nothing costs only the start fee.

Step 2: write a query that isn't dumb

One line = one topic. Inside a line you can combine terms:

nike AND sneakers OR shoes NOT giveaway
"air max" -resale

A post matches only if the terms are literally in the post text. So you don't get random posts from a channel that just happens to have your brand in its name.

Step 3: filter the noise

Under Quality filters you can keep only:

  • posts with at least N views (minViews)
  • channels with at least N subscribers (minSubscribers)
  • original posts, no forwards (excludeForwards)
  • given languages (postLanguages, e.g. en, ru, zh)
  • posts with or without media (mediaFilter)

Also set Maximum cost per run in the run options. The run stops there whatever happens. Boring, but it's the setting that lets you sleep.

Step 4: get the data

Each row looks like this:

{
  "channelUsername": "bitcoinnews",
  "messageUrl": "https://t.me/bitcoinnews/16412",
  "publishedAt": "2026-11-09T19:03:02.000Z",
  "views": "36",
  "matchedKeywords": ["bitcoin"],
  "text": "..."
}

Download CSV, Excel or JSON from the run page, or do it from Python (pip install apify-client):

import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("monkey.d.scraping/telegram-keyword-search-channel-scraper").call(
    run_input={"keywords": ["your brand"], "maxResults": 20, "afterDate": "7 days"},
    max_total_charge_usd=0.10,
    logger=None,
)
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item["publishedAt"], item["channelUsername"], item["messageUrl"])

I ran the same input with bitcoin and 3 posts while writing this: done in 8 seconds, all three posts from the same day, total cost $0.00805.

Step 5: make it a monitor

Once you know which channels talk about you, watch those instead of all of Telegram. Fresher results, no search fee, and only posts you haven't seen yet.

I put the whole thing in a small open repo, telegram-brand-monitor. It remembers what it already reported, runs every day for free on GitHub Actions and can ping Slack:

python monitor.py "your brand" --channels channel_one,channel_two --days 2

Watching 30 new mentions a day costs about 3 cents. Days with nothing new cost basically nothing.

Prefer no code? Telegram New Posts Monitor does the same on a schedule inside Apify, and n8n, Make or Zapier can forward the results wherever you want.

Already know the channels and want their full history? That's Telegram Channel Scraper.

TL;DR

  • No Telegram account, no phone number.
  • Literal matches, with a link to every original post.
  • Pay per result. First test ≈ one cent.
  • Public channels only: private groups are out of scope, on purpose.

Got a use case I didn't cover, or something broke? Tell me in the comments, I actually read them.

Written with some help from an AI assistant. Code, prices and the test run were checked by me.

來源:DEV Community · dev.to