Tiktok Profile Scraper avatar

Tiktok Profile Scraper

Pricing

from $10.00 / 1,000 tiktok profiles

Go to Apify Store
Tiktok Profile Scraper

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

Gim Scraper

Maintained by Community

Actor 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 already
apify push

Input

FieldTypeDescription
usersarray (required)TikTok usernames (e.g. @tiktok or tiktok) or full profile URLs. Duplicates are removed automatically.
useTorFallbackbooleanRetry 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:

FieldDescription
idTikTok user ID
uniqueIdUsername
nicknameDisplay name
secUidSecure user ID
signatureBio text
verifiedWhether the account is verified
createTimeAccount creation time (Unix timestamp)
followersNumber of followers
followingNumber of accounts followed
likesTotal likes received
videosNumber of videos
avatarLarger, avatarMedium, avatarThumbAvatar 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

  1. main.py reads 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.
  2. For each profile, headless Chrome opens the profile page and reads the embedded __UNIVERSAL_DATA_FOR_REHYDRATION__ JSON to extract the account data.
  3. 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_RETRIES in tiktok_scraper.py (default: 3).
  4. 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 definition
my_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 container
Dockerfile # apify/actor-python-selenium image + Tor
requirements.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-server instead.
  • 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

Documentation reference

To learn more about Apify and Actors, take a look at the following resources: