TikTokApi
The Unofficial TikTok API Wrapper in Python 3.
Decision gist · record as of 2026-08-14
Yes, if you need to retrieve public TikTok data and can manage the post-install playwright setup and potential bot-detection workarounds. The package is actively maintained, has no known vulnerabilities, and carries a permissive MIT license. Install it if data retrieval is your only goal; do not install if you need to post, upload, or access authenticated user content.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9+; playwright browser binaries must be installed via `python -m playwright install` after pip install; TikTok may block requests and require a proxy or valid ms_token from TikTok cookies.
- Low friction installation with a pure Python wheel, though playwright browser installation is a required post-install step.
- The package is actively maintained with recent commits and a healthy repository signal.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both personal and commercial projects.
last release 2026-04-01 (135 days) · last repo commit 2026-07-03 · 6,567 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 147,018 downloads/mo, #11,083 on PyPI
Alternatives
Verify before relying
pip install TikTokApi
python -m playwright install
from TikTokApi import TikTokApi
import asyncio
async def get_trending():
async with TikTokApi() as api:
await api.create_sessions(ms_tokens=[None], num_sessions=1)
async for video in api.trending.videos(count=10):
print(video.as_dict)
asyncio.run(get_trending())- Whether the package reliably handles TikTok's frequent API structure changes without breaking existing code
- Proxy requirements and success rates for different proxy tiers when facing bot detection
- Performance and rate-limiting behavior under sustained data retrieval workloads
What it is and what it does
TikTokApi is an unofficial Python client for fetching public data from TikTok without requiring user authentication. It uses playwright for browser automation and httpx/requests for HTTP calls to retrieve trending videos, user profiles, and related metadata. The package is designed strictly for data retrieval—it cannot post, upload, or access any authenticated user routes.
The library is async-first, requiring asyncio for most operations. Installation involves both pip and a separate playwright browser setup step. Common friction points include TikTok's bot detection (which may require proxies or valid session tokens) and the need to maintain compatibility as TikTok's internal API structure changes. The package is actively maintained and supports modern Python versions.
Use it for
- Fetch and analyze trending TikTok videos for research, trend monitoring, or content discovery
- Retrieve public user profile data and statistics for influencer analysis or audience research
- Build a local cache or database of TikTok metadata for offline analysis or reporting
- Monitor specific TikTok trends or hashtags by periodically scraping public data
- Integrate TikTok data into a dashboard or analytics tool that does not require user posting
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to retrieve public TikTok data and can manage the post-install playwright setup and potential bot-detection workarounds.
The package is actively maintained, has no known vulnerabilities, and carries a permissive MIT license. Install it if data retrieval is your only goal; do not install if you need to post, upload, or access authenticated user content.
Install
tiktokapi on PyPI
Before you install
Low friction installation with a pure Python wheel, though playwright browser installation is a required post-install step. The package is actively maintained with recent commits and a healthy repository signal.
Requires Python 3.9+; playwright browser binaries must be installed via `python -m playwright install` after pip install; TikTok may block requests and require a proxy or valid ms_token from TikTok cookies.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both personal and commercial projects.
Quickstart
pip install TikTokApi
python -m playwright install
from TikTokApi import TikTokApi
import asyncio
async def get_trending():
async with TikTokApi() as api:
await api.create_sessions(ms_tokens=[None], num_sessions=1)
async for video in api.trending.videos(count=10):
print(video.as_dict)
asyncio.run(get_trending())
Verify before relying
- Whether the package reliably handles TikTok's frequent API structure changes without breaking existing code
- Proxy requirements and success rates for different proxy tiers when facing bot detection
- Performance and rate-limiting behavior under sustained data retrieval workloads
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesrequestsplaywrighthttpxproxyproviders |
| Maintenance | Actively maintained 135 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 147,018 / month, #11,083 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: Build Tools |
Evidence: tiktokapi-7.3.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “tiktok data scraping python”
- TikTokApiUnofficial Python wrapper for retrieving public TikTok data—trending…
- tiktok-business-api-sdk-officialProvides Python client libraries for the TikTok Business API,…
- TikTokLiveConnect to TikTok livestreams and receive real-time events (chats,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also shortzy · TikTokLive · instaloader · twikit · pytrends · trendspy · instagrapi · Scweet · oxylabs · tiktok-business-api-sdk-official