Tiktok Profile Scraper
Pricing
from $10.00 / 1,000 tiktok profiles
Tiktok Profile Scraper
Extract public TikTok profile data from usernames or profile URLs: user ID, secUid, nickname, bio, verified status, creation time and avatar links. No cookies, login or proxy needed. Pay only for successfully scraped profiles.
Pricing
from $10.00 / 1,000 tiktok profiles
Rating
0.0
(0)
Developer
Gim Scraper
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
5 days ago
Last modified
Categories
Share
TikTok Profile Scraper with Tor Fallback
An Apify Actor that collects public profile data from TikTok accounts using Selenium (headless Chrome). If a profile fails with a direct connection, the Actor automatically retries it through the Tor network with a fresh identity.
Quick Start
Install the Apify CLI, then run the Actor locally:
$apify run
Push it to the Apify Console:
apify login # first, log in if you haven't alreadyapify push
Input
| Field | Type | Description |
|---|---|---|
users | array (required) | TikTok usernames (e.g. @tiktok or tiktok) or full profile URLs. Duplicates are removed automatically. |
useTorFallback | boolean | Retry failed profiles through Tor. Default: true. |
Example:
{"users": ["@tiktok", "https://www.tiktok.com/@charlidamelio"],"useTorFallback": true}
Output
Each profile is stored as one item in the dataset:
| Field | Description |
|---|---|
id | TikTok user ID |
uniqueId | Username |
nickname | Display name |
secUid | Secure user ID |
signature | Bio text |
verified | Whether the account is verified |
createTime | Account creation time (Unix timestamp) |
followers | Number of followers |
following | Number of accounts followed |
likes | Total likes received |
videos | Number of videos |
avatarLarger, avatarMedium, avatarThumb | Avatar image URLs |
Profiles that fail on every attempt are skipped and logged; the run status message shows how many succeeded (for example, "8 of 10 profiles scraped").
How it works
main.pyreads and normalizes the input, then starts Tor in the background (unless disabled) and waits until it is fully bootstrapped. If Tor cannot start, the Actor continues with direct connections only.- For each profile, headless Chrome opens the profile page and reads the embedded
__UNIVERSAL_DATA_FOR_REHYDRATION__JSON to extract the account data. - If the direct attempt fails (timeout, empty data, browser error), the profile is retried through Tor. Each Tor attempt uses a new browser and a new Tor identity (via the control port). The number of attempts is set by
TOR_MAX_RETRIESintiktok_scraper.py(default: 3). - Results are pushed to the dataset with
Actor.push_data.
Project Structure
.actor/├── actor.json # Actor config: name, version, schema paths├── dataset_schema.json # Structure and table view of the output data└── input_schema.json # Input validation & Console form definitionmy_actor/├── __init__.py├── __main__.py # Entry point (python -m my_actor)├── main.py # Actor orchestrator├── tiktok_scraper.py # Selenium scraping logic with Tor fallback└── tor_runner.py # Starts Tor inside the containerDockerfile # apify/actor-python-selenium image + Torrequirements.txt # apify, selenium, stem
What's included
- Apify SDK - toolkit for building Actors
- Selenium - headless Chrome automation (Chrome and chromedriver come with the base image)
- Tor - fallback network for failed profiles
- Stem - Tor control library used to request a new identity
- Input schema and Dataset schema - validated input and a readable output table
Notes
- Tor exit nodes are often blocked by TikTok, so the fallback may not always succeed. For higher reliability you can pass an Apify Proxy to Chrome through
--proxy-serverinstead. - TikTok may change its page structure at any time, which can break data extraction.
- Only public profile data is collected. Make sure your use complies with TikTok's terms and with the laws that apply to you.
Resources
-
Quick Start guide for building your first Actor
-
Actor definition documentation
-
Python tutorials in Academy directory on your local machine.
$apify pull <ActorId>
Documentation reference
To learn more about Apify and Actors, take a look at the following resources: