# TikTok-Api

> Unofficial Python wrapper that reads TikTok's public web data: user profiles, videos, comments, hashtags, sounds and trending.

Source: https://osinttools.io/tools/tiktok-api/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

- **Inputs:** Username, URL, Name
- **Category:** Social media intelligence
- **Pricing:** Free, open source
- **Footprint:** active (contacts the target or the services it checks)
- **Account required:** no
- **API:** no public API
- **Platforms:** Python library
- **Website:** https://github.com/davidteather/TikTok-Api
- **Docs:** https://davidteather.github.io/TikTok-Api/
- **Listed:** Nov 29
- **Last verified by an editor:** Nov 29, 2026

## What it does

TikTok-Api (the PyPI package TikTokApi) is an unofficial Python wrapper for TikTok.com by David Teather, released under the MIT licence. It is not TikTok's own API: it opens Playwright browser sessions and calls the endpoints TikTok's website uses, and it only reads data. It covers user profiles and their videos, single videos and their comments, hashtags, sounds, playlists, trending videos and user search.

An investigator installs it with pip, supplies an ms_token cookie value taken from tiktok.com in a browser, and calls async methods such as api.user(username=...).info() or api.video(url=...).info(); each object exposes the full dictionary TikTok returned. It supports no logged-in routes, so it reaches only what the site shows a signed-out visitor. The README warns that TikTok blocks requests it detects as a bot and that a proxy may be needed.

Footprint is active: it contacts the target or the services it is checking, which can be logged on the other side. No account is needed. There is no public API.

## Features

- User profile, videos and playlists by username
- Video details, comments and related videos by URL or ID
- Hashtag, sound and trending video feeds
- User search by term
- Video file download as bytes
- Several browser sessions with proxy support
- Dockerfile for running scripts in a container

## Pros

- No TikTok login is used
- Maintained, with a release in November 2026
- Returns TikTok's raw data dictionary for each object
- Hosted documentation and example scripts

## Cons

- Uses TikTok's private web endpoints, not an official API: TikTok's terms may not allow it, and the README says TikTok's changes break it from time to time
- TikTok blocks sessions it detects as a bot; the README suggests trying proxies
- Needs Playwright with a browser installed and an ms_token cookie from tiktok.com

## When to use it

- Use it when you need a TikTok user's profile data and video list in a Python script.
- Use it when you want the comments or metadata of a TikTok video from its URL.
- Use it when you want to collect the videos under a hashtag or sound for later review.

## Quick start

pip (Python 3.9+):

```
pip install TikTokApi
python -m playwright install
```

## Alternatives

- [DataXAPI](https://osinttools.io/tools/dataxapi/): Pay-per-call API for public posts, profiles, comments and ad library data on 21 platforms, including Douyin, WeChat and Weibo. (Paid · Name, Username, URL · passive)
- [GetYouTubeTranscript MCP](https://osinttools.io/tools/getyoutubetranscript-mcp/): Hosted MCP server for YouTube transcripts, video details, comments, channel uploads, playlists and community posts. (Freemium · URL, Username, Name · passive)
- [Jev Social](https://osinttools.io/tools/jev-social/): Open-source AI research agent that browses Instagram, TikTok and LinkedIn in your own Chrome and writes source-cited reports. (Open source · Username, URL, Name · active · 223 GitHub stars)
- [LinkedIn MCP Server (eliasbiondo)](https://osinttools.io/tools/linkedin-mcp-server/): Community MCP server that reads LinkedIn people, company and job pages through a browser logged in to your own account. (Open source · Name, URL, Username · passive · 222 GitHub stars)
- [LurkAPI](https://osinttools.io/tools/lurkapi/): Data API and hosted MCP server returning posts, profiles, comments, ads and transcripts from public pages on 16 platforms. (Freemium · Username, URL, Name · passive)
- [Reddit Data API](https://osinttools.io/tools/reddit-data-api/): Reddit's official API: read posts, comment trees, subreddits and user histories as JSON, with an approved OAuth app. (Freemium · Username, Name, URL · passive)

All alternatives to TikTok-Api in one table: https://osinttools.io/tools/tiktok-api/alternatives/

## Change history

- 2026-11-29: Listed in the directory.

Feed of changes to TikTok-Api: https://osinttools.io/tools/changes/feed.xml?tool=tiktok-api

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
