Telegram message scraping: contacts from chat history and finding people by words

The Messages parser reads chat history and pulls out what people wrote there themselves: phone numbers, usernames, links, emails, wallet addresses. In order below: what ends up in the dataset, what the parser cannot do, how to still find people by their words, and the form the result comes in.

  • Contacts from chat text
  • Finding people by words
  • Export as CSV, JSON, TXT
The Data parsing section in TeleTraff, Datasets tab: a list of four datasets with the type Channels or Members, the number of records and a date

In short

Telegram message scraping in TeleTraff is done by the Messages parser: it reads the history of the chats you pick and pulls phone numbers, usernames, private t.me links, emails, links and crypto wallet addresses out of the text. It has no search by words inside messages. To find people by what they write, use the Members parser with Only people who wrote in the chat and Must contain words.

TeleTraff editorial teamUpdated: Checked in the panel

Six kinds of finds

Phone numbers, usernames, private links, emails, any links and wallets are switched on one by one. The run does not start until at least one kind is selected.

A period that fits the task

All history, the last N messages (from 1 to 100,000 per source) or a date range. The Only since the last run switch continues from where the parser stopped last time.

A row without extras

A row holds the type, the value, the name next to a number and the wallet network. The full message text is added by a separate switch that is off by default.

What the Messages parser finds in a conversation

The parser opens a chat history, reads the text of every message and looks in it for the selected kinds of data. It is not a list of people: the dataset holds values that members wrote themselves. It does not see the phone number in a Telegram profile, only a number typed into a message. All six switches in the What to collect block are off by default and have to be turned on by hand.

SwitchWhat goes into the datasetHow it works
Phone numbersNumbers from message textThree spellings: with +, with country code without +, without country code. All three are on by default; Collect a nearby name adds the name that stands before the number in the text
Telegram usernamesUsernames from textOne username once per run, however many times it is repeated
Private Telegram linksInvite links to closed chatsThe t.me/+... and joinchat formats
EmailEmail addressesThe address is taken from the message text as it is
All linksAny links from messagesThe same link with a different letter case in the domain counts as one
Crypto walletsWallet addressesTON, Bitcoin, Tron, Solana and EVM networks; the row names the network

A number is recognised by the length of a digit string, so a figure that happens to look like a phone can end up in the list. General run settings, accounts and sources are described in the parsers guide.

How to find people by what they write

This takes a different parser, Members. It has a writers mode and word filters, and the result is a list of people, not of values.

  1. 01

    Choose the Members parser

    Add chats as sources: an @chat, a t.me link or a chat ID. For a channel the panel takes those who comment.

  2. 02

    Switch on Only people who wrote in the chat

    In the Wrote in the chat field pick a period: Within a day, Within 3 days, Within a week or Within a month. A week is the default.

  3. 03

    Enter words in Advanced settings

    In the Must contain words field type words separated by commas, for example usdt, exchange. In Exclude words enter what should be filtered out.

  4. 04

    Run it and open the dataset

    Each person's record will hold the text of their latest message, its date and the chat. It shows why the person passed the filter.

This route has two limits. The panel checks only each person's latest message in the period: someone who wrote about usdt yesterday and answered ok today will not pass. No more than 20,000 of the latest messages per source are scanned, newest first. A person needs only one of the words to appear in the message. Without Only people who wrote in the chat the words are checked against the name and username only. More on people fields and filters: the members scraper.

Run settings of the Messages parser

Message period

All history by default, Last N messages with a number from 1 to 100,000 for each source, or Date range. On a large chat the whole history takes long to read.

Only since the last run

The panel remembers the message it reached in each chat and next time takes only new ones. Handy when the same chat has to be checked every week.

Store the full message

Off by default. When on, the message text is added to the row, but only for messages where the selected kind of data was found.

If a source is a private invite link and the chosen account is not in that chat yet, it joins by the link before reading. Keep this in mind in advance if the account is needed for other work.

What the result holds and how to take it out

Row fieldWhat it holdsWhen it is filled
Data typePhone, username, private link, email, link or walletAlways
ValueThe number, address or link itselfAlways
NameThe name that stood next to the number in the textFor phones, if Collect a nearby name is on
Wallet networkTON, Bitcoin, Tron, Solana or EVMFor wallets
Message textThe whole messageIf Store the full message is on

Identical values do not repeat within a run: a pair of type and value goes into the dataset once. The file comes as CSV, JSON or TXT; this dataset has no xlsx. The dataset is visible in the Data parsing section next to the others.

The Datasets tab in Data parsing: four datasets with type, number of records, date and source. The frame shows channel and member datasets; a messages dataset sits in the same list.
The Datasets tab in Data parsing: four datasets with type, number of records, date and source. The frame shows channel and member datasets; a messages dataset sits in the same list. Demo data.

Where this comes in useful

Crypto

In exchange and trader chats people leave wallet addresses and the usernames of exchangers themselves. The Crypto wallets and Telegram usernames switches collect them in one pass, and the wallet network is named in the row.

Services and infoproducts

In threads like looking for a contractor and for sale people type a phone and a username right in the text. Phone numbers together with a nearby name gives a draft for manual contact.

Arbitrage and gambling

Private Telegram links pull out invites to closed chats that competitors and admins mention in conversation. These are new sources for chat scraping.

Look for the chats themselves in chat and group scraping: the chats found there then go as sources into the Messages parser.

Terms on this page

Questions and answers

Can I find messages with a word or phrase?

No, the Messages parser does not search by text. It takes the chats you named explicitly and pulls phones, usernames, links, emails and wallets out of the history. Words work only in the Members parser: the Must contain words filter picks people by their latest message in the period.

Which sources does the Messages parser accept?

An @chat, a t.me link or a numeric chat ID. The panel rejects a line of keywords, it does not look for chats by itself. For a private invite link the account joins the chat if it is not there yet.

How do I find out who wrote a number that was found?

From the result row you cannot. It has no author, chat or date, and with Store the full message on only the text is added. If you need who exactly wrote, use the Members parser with the writers mode: a person's record there holds their latest message.

How many messages does the parser read per run?

As many as the period sets. All history reads the whole chat, Last N messages takes from 1 to 100,000 per source, Date range limits by time. Telegram hands out history in portions, so large chats take long to read.

Do values repeat in the dataset?

Not within a run: a pair of type and value is written once. To avoid reading old messages again, switch on Only since the last run: the parser continues from the last message it read in each chat.

Can I pass a messages dataset to Mailing?

Not with a button: this dataset has no Use. Export a file as CSV, JSON or TXT and work with it yourself. People datasets from the Members parser go to the Inviter and Mailing directly.

Read next

More in this section

Other sections

Collect contacts from your first chat

Open Data parsing, pick the Messages parser, name a chat and switch on the kinds of data you need. To find people by words, take the Members parser instead.

Try it free