Skip to main content

TikTokPy

Extract data from TikTok without needing any login information or API keys.

Table of Contents

Getting Started

Installation

Install the tiktokapipy package (or add it to your project requirements) and set up Playwright:

pip install tiktokapipy
python -m playwright install

Quick Start Guide

TikTokPy has both a synchronous and an asynchronous API. The interfaces are the same, but the asynchronous API requires awaiting of certain functions and iterators.

Both APIs must be used as context managers. To get video information in both APIs:

Synchronous Asynchronous
from tiktokapipy.api import TikTokAPI

with TikTokAPI() as api:
    video = api.video(video_link)
    ...
from tiktokapipy.async_api import AsyncTikTokAPI

async with AsyncTikTokAPI() as api:
    video = await api.video(video_link)
    ...

More examples, including how to download videos and slideshows, can be found in the documentation.

Warnings can be ignored as follows:

import warnings

from tiktokapipy import TikTokAPIWarning

warnings.filterwarnings("ignore", category=TikTokAPIWarning)

Documentation

You can view the full documentation on Read the Docs.


Disclaimer

TikTokPy is in no way affiliated with, authorized, maintained, sponsored or endorsed by TikTok or any of its affiliates or subsidiaries. Use of automated scripts to collect information from or otherwise interact with TikTok and its related services is against TikTok's Terms of Service. Use at your own risk. For educational purposes only.

Release files for tiktokapipy 0.2.4.post2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tiktokapipy 0.2.4.post2
File Size Uploaded
tiktokapipy-0.2.4.post2.tar.gz 31.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tiktokapipy 0.2.4.post2
File Interpreter ABI Platform
tiktokapipy-0.2.4.post2-py3-none-any.whl Python 3 none any Details

Total release size: 65.7 kB

Release files / tiktokapipy-0.2.4.post2.tar.gz

Download URL tiktokapipy-0.2.4.post2.tar.gz
Size 31.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1114ef422e3b0dab94010151f721c2e00ffea15b8f97be905c55d639449ccce1
BLAKE2b-256 checksum
How to use checksums
c6023a1bd5704f8376752b6ef2095c2e24577ba88aec7e6663e8a7a843f5a42b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / tiktokapipy-0.2.4.post2-py3-none-any.whl

Download URL tiktokapipy-0.2.4.post2-py3-none-any.whl
Size 34.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b5b06945e9b2a5d2f4295bed014cce9b463c32de36829e68fbfb640bac51a64
BLAKE2b-256 checksum
How to use checksums
263212a8b00eeacfc236fcac2a8a18dca227112aa14e6df81be06f2acbe3d61c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page