TGSpyder is an Open-Source Telegram OSINT CLI Tool by Darksight Analytics.
- Scrape members list from both public and private groups to CSV
- Scrape chat messages from both public and private groups to CSV
- Extract t.me invite links from chat history (public and private groups)
- Look up a Telegram user by username or (limited) numeric ID
- Identify sticker pack creator ID (inferred via sticker set ID) Credits to: https://hackernoon.com/whats-wrong-with-stickers-in-telegram-deanonymize-anonymous-channels-in-two-clicks
- Proxy support:
- Save proxy (
--set-proxy) - Remove proxy (
--remove-proxy) - One-off proxy override (
--proxy)
- Save proxy (
- Python 3.10+
git clone https://github.com/Darksight-Analytics/tgspyder.git
cd tgspyder
pip install -r requirements.txt
pip install -e .Telegram OSINT CLI Tool Built for investigators, analysts, journalists, and researchers.
TGSpyder is a command-line OSINT tool for structured collection and analysis of Telegram data. It enables scraping of members, messages, invite links, users, and metadata from public and private Telegram groups and channels β exporting everything into investigator-friendly CSV files.
- π Scrape member lists (where Telegram allows)
- π¬ Crawl chat messages
- π Extract and de-duplicate Telegram invite links
- π§ Lookup users by ID or username
- π Identify sticker pack creators
- π SOCKS proxy support (Tor / VPN)
- π Clean CSV output for OSINT workflows
- π¦ Output Structure
All collected data is stored in a single runtime folder:
TGSpyder Output/
βββ members/
β βββ members_<target>_<timestamp>.csv
βββ chats/
β βββ messages_<target>_<timestamp>.csv
βββ crawled_links/
βββ crawled_links_<target>_<timestamp>.csv1οΈβ£ Clone the repository
git clone https://github.com/Darksight-Analytics/tgspyder.git
cd tgspyder2οΈβ£ Create & activate a virtual environment
python3 -m venv venv
source venv/bin/activate3οΈβ£ Install dependencies
pip install -r requirements.txt4οΈβ£ Install TGSpyder as a CLI
pip install -e .Verify installation:
tgspyder --help- Head over to https://my.telegram.org and log in with your Telegram account.
- Navigate to API development tools to generate your API ID and API Hash, which are required to authenticate TGSpyder with Telegram.
Scrape members and chats
tgspyder https://t.me/examplegroup --members --chatsExtract invite links only
tgspyder https://t.me/examplegroup --crawl-invitesUser lookup
tgspyder --user 123456789
tgspyder --user @usernameSticker pack creator lookup
tgspyder --sticker-pack https://t.me/addstickers/packnameTGSpyder supports SOCKS proxies (Tor / VPN-friendly).
tgspyder --proxy socks5://127.0.0.1:9050 <target> --chatsSave proxy for future runs
tgspyder --set-proxy socks5://127.0.0.1:9050Remove saved proxy
tgspyder --remove-proxyOn first run, TGSpyder will prompt for:
- Telegram API ID
- Telegram API Hash
- User account or bot token
Credentials are stored locally in: ~/.tgspyder.conf
Session files are reused automatically.
- Some groups do not expose member lists
- Private groups require valid invite links
- Sticker creator attribution is not always guaranteed
- Subject to Telegram API limits
TGSpyder is intended for:
- OSINT investigations
- Academic research
- Journalism
- Threat & network analysis
Users are responsible for compliance with:
- Local laws
- Platform terms of service
- Ethical research standards
MIT License See LICENSE for details.
- Valdemar Balle
- Founder of Darksight Analytics
TGSpyder is provided for open-source intelligence (OSINT), research, investigative, and educational purposes only.
Users are solely responsible for ensuring that their use of this tool complies with:
- Applicable laws and regulations
- Platform terms of service
- Ethical research and investigative standards
The author and contributors assume no liability for misuse of this tool or for any consequences arising from its use.

