How to Scrape TikTok Profiles and Posts: 5 Proven Methods for 2026

How to scrape TikTok profiles and posts with 5 tools: 1. BrowserAct 2. TikTok Research API 3. TikTokApi (Python) 4. BeautifulSoup + requests 5. Selenium --- Ever wondered how marketing agencies build databases of thousands of TikTok creators overnight? Or how competitor analysis tools track viral trends before they hit the mainstream? TikTok has become the world's most downloaded app, with over 1.5 billion monthly active users. For marketers, researchers, and brands, the platform is a goldmine o
- 1BrowserAct's TikTok Influencer Scraper template extracts both creator profiles and video analytics in a single run using AI-powered extraction—no CSS selectors needed.
- 2TikTok's Research API is fully compliant but restricted to academic researchers with strict daily rate limits and no creator profile data.
- 3TikTokApi is a popular Python library that reverse-engineers TikTok's internal API but breaks frequently when TikTok updates its endpoints.
- 4BeautifulSoup can extract embedded JSON from TikTok's HTML but cannot handle JavaScript-rendered content like video feeds.
- 5Selenium provides full browser control for infinite scrolling and video data but is very slow and resource-intensive.
Method 1: BrowserAct — The No-Code TikTok Scraper (Best for Beginners)
BrowserAct is a no-code browser automation platform that lets you scrape TikTok profiles, posts, and engagement data without writing a single line of code. Its pre-built TikTok Influencer Scraper template extracts comprehensive creator and video data using AI-powered extraction—just describe what you need in plain English.
What makes BrowserAct different from traditional scrapers is its real-browser infrastructure. Instead of sending HTTP requests that TikTok's anti-bot systems easily detect, BrowserAct runs actual browser sessions with stealth browsing, built-in residential proxies, and CAPTCHA handling. This means you can access TikTok pages that block conventional scrapers, and the AI automatically adapts when page structures change—no selector maintenance required.
Steps to Scrape TikTok with BrowserAct
Follow this quick start guide to scrape TikTok profiles and posts:
- Sign up and access the template: Create a free account at BrowserAct, then navigate to the TikTok Influencer Scraper template in the template library. Click "Use this template" to load it into your workspace.
- Configure input parameters: Set
tiktok_linkto a TikTok search results URL (e.g.,https://www.tiktok.com/search/user?q=fitness) or a direct profile URL (e.g.,https://www.tiktok.com/@username). Setmax_resultsto the number of profiles or videos you want to extract (e.g., 20, 50, or 100).
- Run the workflow: Click "Start" to execute. BrowserAct initializes a real browser session, navigates to your target page, and begins extracting data. The AI-powered extraction engine identifies creator profiles and video cards automatically—you don't need to specify CSS selectors or XPath.
- Review and export data: Once the run completes, review the extracted data in the results panel. Export in your preferred format: CSV for Excel analysis, JSON for API integration, Google Sheets for team collaboration, or via Webhook for real-time processing.
- Automate and integrate (optional): Schedule recurring runs (daily, weekly, monthly) for continuous monitoring. Connect BrowserAct to Make, n8n, or Zapier to automatically push TikTok data into your CRM, Slack, or data warehouse.
For advanced builds, you can customize the workflow by adding Loop nodes for infinite scrolling, Extract Data nodes with custom field prompts, or login-aware nodes that handle TikTok's age-gate and CAPTCHA challenges. The platform's visual workflow builder makes it easy to adapt the template to your specific needs.
What Data Can You Extract?
The TikTok Influencer Scraper template extracts both creator profile data and video analytics in a single run:
- Creator Profiles: Username, handle, profile URL, real-time follower count, following count, total likes, bio description, verification status (✓), account type (Personal/Business/Creator), external links (Instagram, YouTube, website), and privacy status (Public/Private).
- Video Analytics: View count, likes, comments, shares, video title, description, hashtags, posted date, video duration, sound/music information, user mentions, engagement rate, and Duet/Stitch availability.
Outputs are available in formats like JSON, CSV, XML, or Markdown, making it easy to integrate scraped data into existing analytics pipelines, CRM systems, or AI model training workflows.
Pros
- No coding required—describe what you need in plain English
- Real browser sessions with stealth browsing and residential proxies
- AI-powered extraction that adapts to page changes automatically
- Pre-built template ready in minutes (30-60 credits per run)
- Flexible export formats: CSV, JSON, Google Sheets, Webhook
- Built-in scheduling and integration with Make, n8n, Zapier
Cons
- Credit-based pricing may add up for very large-scale extraction (10,000+ profiles)
- Cloud-based—no offline execution
Ready to try it? Sign up for BrowserAct's free trial and start scraping TikTok profiles today!
Method 2: TikTok Research API (Official and Compliant)
TikTok offers a Research API for academic researchers who need structured access to public TikTok data. This is the most compliant method available, but it comes with strict eligibility requirements and rate limits.
Steps to Scrape TikTok with the Research API
- Check eligibility: The Research API is currently limited to academic researchers affiliated with accredited universities. You'll need to submit an application describing your research objectives, institutional affiliation, and data handling practices.
- Apply for access: Visit the TikTok Research API portal and submit your application. Approval typically takes 1-2 weeks, and not all applications are accepted.
- Set up authentication: Once approved, register your application to receive client credentials. Implement OAuth 2.0 authentication to obtain access tokens for API calls.
- Query the API: Use the API endpoints to search for videos by hashtag, username, or keyword. Each endpoint returns structured JSON with fields like video ID, view count, like count, comment count, share count, and creator username.
- Handle rate limits and pagination: The Research API enforces strict rate limits (typically 1,000 requests per day for most endpoints). Implement proper pagination using cursors and respect the daily quota to avoid being throttled.
import requests
# Authenticate
auth_response = requests.post(
"https://open.tiktokapis.com/v2/oauth/token/",
data={
"client_key": "YOUR_CLIENT_KEY",
"client_secret": "YOUR_CLIENT_SECRET",
"grant_type": "client_credentials",
}
)
access_token = auth_response.json()["access_token"]
# Search for videos by hashtag
headers = {"Authorization": f"Bearer {access_token}"}
response = requests.post(
"https://open.tiktokapis.com/v2/research/video/query/",
headers=headers,
json={
"query": {
"and": [
{"operation": "IN", "field_name": "hashtag_name", "field_values": ["ai"]}
]
},
"max_count": 20,
"fields": ["id", "view_count", "like_count", "comment_count", "share_count", "username"]
}
)
videos = response.json()["data"]["videos"]
for video in videos:
print(f"@{video['username']}: {video['view_count']} views, {video['like_count']} likes")
Pros
- Fully compliant with TikTok's terms of service
- Structured, reliable JSON responses
- No risk of IP bans or CAPTCHAs
- Official documentation and support
- Access to engagement metrics not available via web scraping
Cons
- Restricted to academic researchers—commercial use not permitted
- Strict daily rate limits (1,000 requests/day)
- Limited to video data; no creator profile fields (follower count, bio, etc.)
- Application approval process takes 1-2 weeks
Method 3: TikTokApi Python Library (Open-Source)
TikTokApi is an unofficial Python library that reverse-engineers TikTok's internal API endpoints to extract data. It's popular among developers who need more flexibility than the official API offers but don't want to build a scraper from scratch.
Steps to Scrape TikTok with TikTokApi
- Install the library: Run
pip install TikTokApito install the package. You'll also need a Playwright browser installation:python -m playwright install chromium.
- Configure browser context: TikTokApi uses Playwright to generate the necessary headers and tokens for API requests. Initialize a browser context with appropriate user-agent and proxy settings.
- Scrape user profiles: Use the
usermodule to extract profile data including follower count, following count, total likes, bio, and verification status.
- Scrape user videos: Use the
user.videos()method to paginate through a creator's video posts, extracting view counts, likes, comments, and shares for each video.
- Handle anti-bot detection: Rotate proxies, add random delays between requests, and use the library's built-in verification token generation to avoid being blocked.
from TikTokApi import TikTokApi
import asyncio
import json
async def scrape_tiktok_profiles():
async with TikTokApi() as api:
await api.create_sessions(
num_sessions=1,
sleep_after=3,
headless=True,
browser="chromium",
proxy="http://user:pass@proxy:8080"
)
# Scrape a user profile
user = api.user("chefboyrc")
user_info = await user.info()
print(f"Username: @{user_info['userInfo']['user']['uniqueId']}")
print(f"Followers: {user_info['userInfo']['stats']['followerCount']}")
print(f"Total Likes: {user_info['userInfo']['stats']['heartCount']}")
print(f"Bio: {user_info['userInfo']['user']['signature']}")
# Scrape their videos
async for video in user.videos(count=10):
print(f"Video: {video.as_dict['desc']}")
print(f" Views: {video.as_dict['stats']['playCount']}")
print(f" Likes: {video.as_dict['stats']['diggCount']}")
print(f" Comments: {video.as_dict['stats']['commentCount']}")
asyncio.run(scrape_tiktok_profiles())
Pros
- Free and open-source (MIT license)
- Access to both profile data and video metrics
- Active community and regular updates
- Supports hashtag search, sound search, and trend discovery
- Built-in proxy and session management
Cons
- Breaks frequently when TikTok updates its internal API
- Requires proxy rotation to avoid IP bans
- Playwright dependency adds complexity to deployment
- No guarantee of data completeness or accuracy
Give your agent a real browser, then turn the workflow into a Skill.
- 1. Use browser-act when an agent needs to open, click, scroll, extract, or inspect a live site.
- 2. Use browser-act-skill-forge when the workflow should become reusable across runs and agents.
- 3. Keep the operational boundary simple: automate what the user can already do in the browser.
Method 4: BeautifulSoup + Requests (Lightweight and Customizable)
For developers who want maximum control over what data to extract, using Python's requests and BeautifulSoup libraries to parse TikTok's HTML is a lightweight approach. However, TikTok's heavy reliance on JavaScript rendering means this method has significant limitations.
Steps to Scrape TikTok with BeautifulSoup
- Install dependencies: Run
pip install requests beautifulsoup4 lxmlto install the required packages.
- Inspect TikTok's page structure: Open a TikTok profile page in your browser's developer tools. You'll notice that most data is loaded dynamically via JavaScript—initial HTML contains minimal structured data.
- Extract embedded JSON data: TikTok embeds some initial data in a
tag. Parse this JSON to access profile metadata, follower counts, and video lists.
- Build your extraction logic: Write custom parsing logic to navigate the JSON structure and extract the fields you need. Handle nested objects, optional fields, and data type conversions.
- Add anti-bot measures: Set realistic User-Agent headers, implement rate limiting with
time.sleep(), and rotate IPs using a proxy pool to avoid being blocked.
import requests
from bs4 import BeautifulSoup
import json
import time
def scrape_tiktok_profile(username):
url = f"https://www.tiktok.com/@{username}"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"Accept-Language": "en-US,en;q=0.9",
}
response = requests.get(url, headers=headers)
soup = BeautifulSoup(response.text, "html.parser")
# Extract embedded JSON data
script_tag = soup.find("script", id="__UNIVERSAL_DATA_FOR_REHYDRATION__")
if script_tag:
data = json.loads(script_tag.string)
user_info = data.get("__DEFAULT_SCOPE__", {}).get("webapp.user-detail", {}).get("userInfo", {})
user = user_info.get("user", {})
stats = user_info.get("stats", {})
profile_data = {
"username": user.get("uniqueId"),
"nickname": user.get("nickname"),
"bio": user.get("signature"),
"verified": user.get("verified"),
"followers": stats.get("followerCount"),
"following": stats.get("followingCount"),
"total_likes": stats.get("heartCount"),
"profile_url": url,
}
print(json.dumps(profile_data, indent=2))
return profile_data
print("Could not find embedded data—TikTok may have updated its page structure.")
return None
# Scrape multiple profiles with rate limiting
usernames = ["chefboyrc", "danielwellington", "gordonramsayofficial"]
for username in usernames:
scrape_tiktok_profile(username)
time.sleep(3) # Be respectful
Pros
- Full control over which fields to extract and how to process them
- No third-party dependencies beyond requests and BeautifulSoup
- Lightweight and fast for single-page extraction
- Easy to customize and extend for specific use cases
- Works well for profile data extraction (embedded JSON)
Cons
- Cannot handle JavaScript-rendered content (video feeds, search results)
- Breaks when TikTok changes its embedded JSON structure
- No built-in anti-bot handling—easy to get IP-banned
- Missing video engagement metrics (views, likes, comments) without additional API calls
Method 5: Selenium (Full Browser Automation)
Selenium gives you complete control over a real browser, making it the most flexible method for scraping TikTok. It can handle JavaScript rendering, infinite scrolling, and login walls—but it's also the slowest and most resource-intensive approach.
Steps to Scrape TikTok with Selenium
- Install Selenium and a WebDriver: Run
pip install seleniumand download the appropriate ChromeDriver for your browser version. Alternatively, useselenium-webdriverwith undetected-chromedriver for anti-bot evasion.
- Configure stealth options: Set up Chrome with anti-detection flags: disable automation indicators, use a realistic User-Agent, and configure proxy settings if needed.
- Navigate and scroll: Open TikTok profile pages or search results, then implement scroll logic to load content via lazy loading. Wait for elements to appear using explicit waits.
- Extract data with CSS selectors: Use Selenium's
find_elementsmethods to locate and extract profile metadata, video cards, and engagement metrics. Parse the DOM directly or extract embedded JSON.
- Handle CAPTCHAs and login walls: Implement retry logic for CAPTCHAs, use cookie persistence for login sessions, and add random delays to mimic human behavior.
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time
import json
def scrape_tiktok_with_selenium(username):
options = webdriver.ChromeOptions()
options.add_argument("--disable-blink-features=AutomationControlled")
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_argument("--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36")
driver = webdriver.Chrome(options=options)
try:
url = f"https://www.tiktok.com/@{username}"
driver.get(url)
# Wait for profile to load
WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.CSS_SELECTOR, "[data-e2e='following-count']"))
)
# Extract profile stats
followers = driver.find_element(By.CSS_SELECTOR, "[data-e2e='followers-count']").text
following = driver.find_element(By.CSS_SELECTOR, "[data-e2e='following-count']").text
likes = driver.find_element(By.CSS_SELECTOR, "[data-e2e='likes-count']").text
bio = driver.find_element(By.CSS_SELECTOR, "[data-e2e='user-bio']").text
print(f"Username: @{username}")
print(f"Followers: {followers}")
print(f"Following: {following}")
print(f"Total Likes: {likes}")
print(f"Bio: {bio}")
# Scroll to load videos
video_data = []
last_height = driver.execute_script("return document.body.scrollHeight")
for _ in range(5): # Scroll 5 times
driver.execute_script("window.scrollTo(0, document.body.scrollHeight)")
time.sleep(2)
# Extract video elements
videos = driver.find_elements(By.CSS_SELECTOR, "[data-e2e='user-post-item']")
for video in videos:
try:
views = video.find_element(By.CSS_SELECTOR, "[data-e2e='video-views']").text
link = video.find_element(By.TAG_NAME, "a").get_attribute("href")
video_data.append({"views": views, "url": link})
except:
continue
new_height = driver.execute_script("return document.body.scrollHeight")
if new_height == last_height:
break
last_height = new_height
print(f"\nExtracted {len(video_data)} videos")
for v in video_data[:5]:
print(f" {v['views']} views - {v['url']}")
finally:
driver.quit()
scrape_tiktok_with_selenium("chefboyrc")
Pros
- Handles JavaScript rendering, infinite scrolling, and dynamic content
- Can navigate login walls and CAPTCHAs with the right configuration
- Full DOM access for extracting any visible element
- Works with any TikTok page type (profiles, search, hashtags, sounds)
- Can be combined with proxy rotation services for large-scale scraping
Cons
- Very slow—each profile takes 10-30 seconds including scrolling
- High resource usage (RAM, CPU) per browser instance
- Requires constant maintenance when TikTok updates its DOM structure
- Easily detected by TikTok's anti-bot systems without stealth configuration
- Not suitable for scraping more than a few hundred profiles
Comparison of 5 Effective TikTok Scraping Methods
For most users, no-code tools like the BrowserAct TikTok Influencer Scraper offer the best balance of ease, data coverage, and reliability.
Conclusion
We've covered 5 powerful methods for how to scrape TikTok profiles and posts, from the official Research API to no-code automation, each unlocking the platform's creator and video data for influencer marketing, competitor analysis, and trend research. Pick the one that best fits your skills and goals to get started efficiently.
- For marketers and agencies: Go with BrowserAct's TikTok Influencer Scraper—it's no-code, extracts both profiles and video metrics, and integrates with your existing marketing stack via Make, n8n, or Zapier.
- For academic researchers: Apply for the TikTok Research API—it's the only fully compliant method, though it's limited to video data and has strict daily quotas.
- For developers building custom pipelines: TikTokApi (Python) gives you the most flexibility for free, but be prepared to maintain your code when TikTok updates its internal APIs.
- For quick one-off profile lookups: BeautifulSoup + requests is lightweight and sufficient for extracting basic profile metadata from embedded JSON.
- For complex scraping with login walls: Selenium provides full browser control, but expect slow performance and significant maintenance overhead.
For most users, starting with BrowserAct or the TikTokApi library provides a strong balance of ease, compliance, and effectiveness.
Whether you're an influencer marketing agency building creator databases or a brand tracking competitor content, mastering how to scrape TikTok with the right TikTok scraper can supercharge your projects.
Two Skills, One Repeatable Browser Workflow
Start with live browser execution when the agent needs to understand a page. Move to Skill Forge when the same scraper should run again without re-exploring the site.
Run once with browser-act
Give Codex, Claude Code, Cursor, Windsurf, or another agent a real browser for rendered pages, clicks, scrolling, screenshots, DOM extraction, and network inspection.
Open browser-act SkillPackage with Skill Forge
Explore the site once, verify the extraction path, then generate a callable Skill package that other agents can reuse for batch jobs or scheduled workflows.
Open Skill ForgeRelative Resources

Is Twitter / X Scraping Legal or Safe?

Twitter Scraper Troubleshooting: 429, Login Wall, Empty Results

Twitter Data for Sentiment Analysis and AI Workflows

Twitter Profile and Follower Research Workflow: Fields, Samples, and Limits
Latest Resources

How to Scrape Facebook Groups: Posts and Comments: 5 Proven Methods for 2026

How to Scrape Instagram Profiles and Followers: 5 Proven Methods for 2026

How to Scrape X Followers: 5 Proven Methods for 2026

