High-performance TikTok comment scraper capable of extracting 667 comments per minute using a hybrid API + scraping approach.
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.
- 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
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)
- Python 3.10+
- requests/httpx — HTTP client with session management
- JSON/CSV — Dual output format
git clone https://github.com/Edioff/tiktokscraper.git
cd tiktokscraper
pip install -r requirements.txtpython tiktokscraper.pyConfigure target videos and output settings in the script.
| Metric | Value |
|---|---|
| Extraction speed | 667 comments/minute |
| Output formats | JSON, CSV |
| Pagination | Automatic cursor-based |
| Session recovery | Automatic |
- For educational and research purposes
- Respect TikTok's Terms of Service and rate limits
- Requires valid session cookies for API access
Johan Cruz — Data Engineer & Web Scraping Specialist
- GitHub: @Edioff
- Available for freelance projects
MIT