Skip to main content

TikTok Video Uploader

Python toolkit for uploading videos to TikTok through a real browser session and cookies-based authentication.

This project is built on Playwright and is intended for user-controlled automation of TikTok uploads. It is not an official TikTok API client.

Features

  • Upload one video or a batch of videos in one run
  • Add a description, schedule, cover image, and visibility
  • Authenticate with a cookies file, session ID, cookies list, or username/password
  • Work from the CLI or as a Python library
  • Support Chromium, Chrome, Firefox, WebKit, and Edge via Playwright

Requirements

  • Python 3.10+
  • Playwright browser binaries installed
  • A valid TikTok account with usable cookies or a valid session

Installation

python -m pip install -e .
python -m playwright install

For development tools:

python -m pip install -e '.[dev]'

Quick start

Library usage

from src import TikTokUploader

uploader = TikTokUploader(cookies='cookies.txt')
uploader.upload_video(
    filename='video.mp4',
    description='My first upload from Python #python #tiktok',
)

Batch upload

from src import TikTokUploader
from src.types import VideoDict

videos: list[VideoDict] = [
    {'path': 'video1.mp4', 'description': 'First upload'},
    {'path': 'video2.mp4', 'description': 'Second upload'},
]

uploader = TikTokUploader(cookies='cookies.txt')
failed = uploader.upload_videos(videos)
print(f'Failed uploads: {failed}')

CLI usage

From the repository root:

python -m src --help

Or after installation:

tiktok-uploader --help

Example:

python -m src -v video.mp4 -d "My description #python" -c cookies.txt

Authentication

The library supports authentication through:

  • cookies file
  • sessionid
  • cookies list / cookies string
  • username + password

Using a real browser session and cookies is the most reliable option because TikTok login depends on browser-driven state.

Important notes

  • This project does not use an official TikTok public API.
  • It relies on browser automation and user-authenticated browser state.
  • TikTok UI and selectors can change over time, so the automation may need updates.
  • Use it only with your own account and in compliance with TikTok rules and platform policies.

Example scripts

Examples are available in the examples folder:

License

This project is licensed under the MIT License. See LICENSE for details.

Repository

Metadata

Release files for tiktok-video-uploader 1.0

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

Source distribution (sdist)

Source distribution for tiktok-video-uploader 1.0
File Size Uploaded Provenance Actions
tiktok_video_uploader-1.0.tar.gz 36.5 kB Without provenance Details for tiktok_video_uploader-1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tiktok-video-uploader 1.0
File Interpreter ABI Platform Actions
tiktok_video_uploader-1.0-py3-none-any.whl Python 3 none any Details for tiktok_video_uploader-1.0-py3-none-any.whl

Total release size: 58.5 kB

Release files / tiktok_video_uploader-1.0.tar.gz

Download URL tiktok_video_uploader-1.0.tar.gz
Size 36.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d8b33e0e2c6dcc7ba44354d2450338f9890cb52a7b68e5a1ab786d8e3644976c
BLAKE2b-256 checksum
How to use checksums
a16b5330b250fe013dad8206e36cfeb1e4da28e1772177912d569133817a0dc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / tiktok_video_uploader-1.0-py3-none-any.whl

Download URL tiktok_video_uploader-1.0-py3-none-any.whl
Size 22.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f633ed08e51cfc8e5fc0a2e6efd18af18bca153b70fab4f7e3f6dd44efac0e3
BLAKE2b-256 checksum
How to use checksums
2bcecff6737372861db10148564a25a3ca62e4ec09cb24bd36749617a800b043
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for tiktok-video-uploader 1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files No provenance

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