Tiktok data scraper:Scrape TikTok video detail, hashtag feed, and user profile (Videos, Reposts, Liked) with Playwright; outputs JSON and optional screenshots.
Learn how this template works and how to run it
Playwright-based TikTok extractor. Supports single video detail pages, hashtag pages, and user profiles (Videos / Reposts / Liked) for first-screen items. Produces human-readable Markdown, structured JSON, and a full-page screenshot.
Positioning and field coverage align with tools in the broader ecosystem. For external product context and typical fields, see: Apify TikTok Scraper.
maxItems) and best-effort hashtag viewsscreenshot@fullPage)Cost: 1 credits per call (see pricing.perCall in template.json)
Engine: Playwright. Extraction runs after a fixed delay for reliability.
https://www.tiktok.com/@USER/video/VIDEO_IDhttps://www.tiktok.com/tag/TAG_NAMEhttps://www.tiktok.com/@USERNotes:
url (required): TikTok page URL (video detail / hashtag / profile)variables.waitFor (optional, default 500): extra wait in milliseconds before extractionvariables.timeoutMs (optional, default 35000): page load and selector wait timeout in millisecondsvariables.maxItems (optional, default 30): maximum number of items to collect on list pagesvariables.profileSection (optional, default videos): profile tab, enum: videos | reposts | likedVideo detail:
{
"url": "https://www.tiktok.com/@USER/video/7298624334447299858",
"variables": {
"waitFor": 800,
"timeoutMs": 35000
}
}
Hashtag page:
{
"url": "https://www.tiktok.com/tag/bananas",
"variables": {
"maxItems": 20
}
}
Profile (Reposts tab):
{
"url": "https://www.tiktok.com/@funnyanimation242",
"variables": {
"profileSection": "reposts",
"maxItems": 24
}
}
This template produces:
screenshot@fullPage)id, text, createTimeISO, webVideoUrl, hashtags,
diggCount (likes), commentCount, collectCount (favorites), shareCountauthorMeta: name, profileUrl, nickName, avatar, signature (best‑effort)musicMeta: musicName (other music fields best‑effort)videoMeta: coverUrl, format, etc. (best‑effort)searchHashtag (e.g., { name, views }) describing the current hashtag and its views (best‑effort)[
{
"id": "7298624334447299858",
"webVideoUrl": "https://www.tiktok.com/@funnyanimation242/video/7298624334447299858",
"text": "banana bananana ...",
"createTimeISO": "2023-11-07T07:50:05.000Z",
"diggCount": 18400,
"shareCount": 1902,
"commentCount": 257,
"collectCount": 1912,
"musicMeta": { "musicName": "original sound" },
"authorMeta": {
"name": "funnyanimation242",
"profileUrl": "https://www.tiktok.com/@funnyanimation242",
"avatar": "https://.../avatar.jpg"
},
"hashtags": [{ "name": "bananas" }]
}
]
[
{
"id": "7298624334447299858",
"webVideoUrl": "https://www.tiktok.com/@user/video/7298624334447299858",
"text": "...",
"diggCount": 123,
"hashtags": [{ "name": "bananas" }],
"searchHashtag": { "name": "bananas", "views": 722300 }
}
]
Note: list pages include only first-screen items; scrolled-in content is not captured.
waitFor: fixed delay after navigation; increasing it can help with dynamic renderingtimeoutMs: overall timeout for page load and selector waitsmaxItems: maximum items collected on list pagesprofileSection: profile tab selection (videos / reposts / liked)waitFor or adjust selectors if neededwaitFor; ensure the URL is publicly accessible; check for DOM changesmaxItems or increasing waitEnsure your use complies with TikTok’s Terms of Service and applicable laws (e.g., GDPR). If unsure, consult legal counsel. See also Apify’s guidance on legal and ethical scraping: Apify TikTok Scraper.
Get the latest news and updates delivered to your inbox.
© 2026 AnyCrawl. All rights reserved.