Skip to content

High-performance TikTok comment scraper — 667 comments/minute with hybrid API + scraping approach

License

Notifications You must be signed in to change notification settings

Edioff/tiktokscraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TikTok Scraper

Python Performance License

High-performance TikTok comment scraper capable of extracting 667 comments per minute using a hybrid API + scraping approach.

Overview

Extracts comments from TikTok videos at scale. Uses a hybrid approach combining TikTok's internal API endpoints with web scraping techniques to achieve high throughput while maintaining session stability.

Features

  • 667 comments/minute extraction speed
  • Hybrid approach — API endpoints + web scraping fallback
  • Session management — Automatic cookie refresh and rotation
  • Structured output — JSON and CSV export
  • Rate limiting — Configurable delays to avoid detection
  • Pagination — Handles cursor-based pagination automatically

Output Format

Exports to both JSON and CSV with fields including:

  • Comment text and timestamp
  • Author username and ID
  • Like count
  • Reply count
  • Parent comment reference (for threaded replies)

Tech Stack

Python

  • Python 3.10+
  • requests/httpx — HTTP client with session management
  • JSON/CSV — Dual output format

Installation

git clone https://github.com/Edioff/tiktokscraper.git
cd tiktokscraper
pip install -r requirements.txt

Usage

python tiktokscraper.py

Configure target videos and output settings in the script.

Performance

Metric Value
Extraction speed 667 comments/minute
Output formats JSON, CSV
Pagination Automatic cursor-based
Session recovery Automatic

Notes

  • For educational and research purposes
  • Respect TikTok's Terms of Service and rate limits
  • Requires valid session cookies for API access

Author

Johan Cruz — Data Engineer & Web Scraping Specialist

  • GitHub: @Edioff
  • Available for freelance projects

License

MIT

About

High-performance TikTok comment scraper — 667 comments/minute with hybrid API + scraping approach

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages