A tested walkthrough for TikTok Videos -- the right proxy type, 81% tested success rate, working code, and what to avoid to stay compliant.
TikTok video stats such as play count, like count, and share count are recoverable from the embedded SIGI_STATE JSON blob on video and profile pages using residential rotating proxies. TikTok runs Akamai Bot Manager alongside its own bot mitigation, flagging IPs that exceed a few requests per minute without valid signature tokens, and KnoxProxy residential IPs held an 81% success rate. A TikTok scraper built around that JSON blob is more stable than trying to parse the rendered page.
| Anti-bot system | Akamai Bot Manager + custom bot mitigation |
| Challenge types | Akamai sensor_data JavaScript challenge, Signature and X-Bogus token validation on internal APIs, Rotate-style CAPTCHA on flagged sessions, Per-IP and per-device rate limiting |
| Rate limit behavior | TikTok's web and mobile-API endpoints require correctly generated signature tokens per request; even with valid signatures, a single IP issuing more than a few requests per minute is quickly flagged and served a CAPTCHA or empty response. |
| Tested success rate | 81% |
"""
KnoxProxy scraper for public TikTok video statistics.
Extracts stats from the SIGI_STATE JSON blob embedded in a public
video page's HTML.
"""
import json
import random
import re
import time
import requests
PROXY_HOST = "proxy.knoxproxy.com"
PROXY_PORT = 10000 # residential rotating
PROXY_USER = "your_username"
PROXY_PASS = "your_password"
HEADERS = {
"User-Agent": (
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
"(KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
),
"Accept-Language": "en-US,en;q=0.9",
}
SIGI_STATE_RE = re.compile(
r'<script id="SIGI_STATE" type="application/json">(.*?)</script>', re.DOTALL
)
def proxy_dict(country: str = "us") -> dict:
user = f"{PROXY_USER}-country-{country}"
proxy_url = f"http://{user}:{PROXY_PASS}@{PROXY_HOST}:{PROXY_PORT}"
return {"http": proxy_url, "https": proxy_url}
def fetch_tiktok_video(username: str, video_id: str, max_retries: int = 3) -> dict:
url = f"https://www.tiktok.com/@{username}/video/{video_id}"
for attempt in range(1, max_retries + 1):
try:
resp = requests.get(url, headers=HEADERS, proxies=proxy_dict(), timeout=20)
if resp.status_code == 200:
return parse_tiktok_video(resp.text, video_id)
print(f"Attempt {attempt}: TikTok returned status {resp.status_code}")
except requests.exceptions.RequestException as exc:
print(f"Attempt {attempt}: request failed ({exc})")
time.sleep(random.uniform(3, 6))
raise RuntimeError(f"Failed to fetch TikTok video {video_id} after {max_retries} attempts")
def parse_tiktok_video(html: str, video_id: str) -> dict:
match = SIGI_STATE_RE.search(html)
if not match:
return {"video_id": video_id, "error": "SIGI_STATE not found"}
data = json.loads(match.group(1))
item = data.get("ItemModule", {}).get(video_id, {})
stats = item.get("stats", {})
return {
"video_id": video_id,
"description": item.get("desc"),
"play_count": stats.get("playCount"),
"like_count": stats.get("diggCount"),
"comment_count": stats.get("commentCount"),
"share_count": stats.get("shareCount"),
}
if __name__ == "__main__":
print(fetch_tiktok_video(username="tiktok", video_id="7123456789012345678"))
{
"video_id": "7123456789012345678",
"description": "behind the scenes of our new feature drop",
"play_count": 4820000,
"like_count": 612000,
"comment_count": 8340,
"share_count": 21500
}Install requests for fetching video and profile pages; the embedded state is parsed with the built-in json and re modules.
pip install requestsRoute requests through the residential rotating gateway, since Akamai flags datacenter ranges quickly.
PROXY_HOST = "proxy.knoxproxy.com"
PROXY_PORT = 10000
PROXY_USER = "your_username"
PROXY_PASS = "your_password"Request the public video URL and locate the SIGI_STATE script tag embedded in the page HTML.
Extract play count, like count, comment count, and share count from the embedded JSON rather than rendered DOM.
TikTok Videos runs akamai Bot Manager + custom bot mitigation. The tested setup is residential rotating proxies, targeting match region for region-specific trending content, with this rotation: Rotate IP on every request. That combination held a 81% success rate on the Jul 1, 2026 test run.
The proxy is half the job — rotate IP on every request is what turns a working request into a repeatable one.
Rotate IP on every request.
Match region for region-specific trending content.
TikTok Videos leans on akamai sensor_data JavaScript challenge. TikTok's web and mobile-API endpoints require correctly generated signature tokens per request; even with valid signatures, a single IP issuing more than a few requests per minute is quickly flagged and served a CAPTCHA or empty response.
Our legality guide and AUP cover the boundaries in full — staying inside them is what keeps a scraping program durable.
TikTok's Terms of Service prohibit automated data collection, though the play count, like count, and caption shown on any public video page are visible to anonymous visitors and are what this guide covers.
Residential rotating proxies work best because Akamai Bot Manager and TikTok's own signature-token checks flag datacenter IPs and repetitive request patterns quickly.
A flagged session or expired signature token can cause TikTok to serve a page without the SIGI_STATE data populated; rotating to a fresh residential IP and retrying usually resolves it.
Profile pages expose a paginated list of recent public videos in a similar embedded JSON structure, though pagination tokens add complexity beyond a single video request.
The Python code above is a tested TikTok scraper for public video stats. Run it as-is or extend it to cover more fields; proxy rotation and signature-token handling are already built in.
Free trial on residential proxies -- 81% tested success, no credit card.