riyagoelrs/tiktok-scraper — explained in plain English
Analysis updated 2026-05-18
Collect public video metadata for a hashtag, such as view and like counts, into a JSON file.
Pull a specific TikTok user's videos along with their follower and verification status.
Gather the current trending video feed for analysis or archiving.
Search TikTok by keyword and export matching videos' details for research.
| riyagoelrs/tiktok-scraper | lbq110/weread-exporter | murphylmf/unish | |
|---|---|---|---|
| Stars | 145 | 145 | 145 |
| Language | Python | Python | Python |
| Setup difficulty | — | — | hard |
| Complexity | — | — | 5/5 |
| Audience | developer | developer | researcher |
Figures from each repo's GitHub metadata at analysis time.
This is a Python script for pulling public video data from TikTok, using an unofficial library called TikTokApi rather than TikTok's own official API. It can gather videos in four ways: by hashtag, by a specific username, from the trending feed, or by a search keyword. For each video it finds, it extracts details like view count, like count, comment count, share count, the caption text, hashtags used, information about the video's author such as username, display name, follower count, and verification status, along with the video's direct URL, thumbnail image, length in seconds, and the name of the audio track used. All of this gets saved as a JSON file with a name that includes the mode used, the search query, and a timestamp, placed in an output folder. To set it up, you need Python 3.9 or newer, plus the TikTokApi library and a Chromium browser installed through Playwright. Running it is done through the command line, specifying a mode such as hashtag, user, trending, or search, along with a query and how many results to fetch. The README recommends supplying an optional session token called msToken to reduce the chance of TikTok blocking the requests as bot activity. It explains how to get this token by opening TikTok in a browser, checking the cookies through developer tools, and copying the msToken value, which can then be passed either as a command line flag or as an environment variable. The README warns that because this relies on an unofficial library, TikTok can change its internal systems at any time and break the scraper, and that video download links expire after a few hours. It also notes plainly that scraping TikTok without permission may go against TikTok's terms of service, and that the tool should be used responsibly. The project is released under the MIT license.
A Python script that scrapes public TikTok video data by hashtag, user, trending feed, or search keyword into JSON files.
Mainly Python. The stack also includes Python, TikTokApi, Playwright.
MIT license: use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.