Skip to content

TIKTOK API IN PYTHON , GET TRENDING VIDEO, GET VIDEO BY CHALLENGE, GET VIDEO BY MUSIC, GET VIDEO BY USER, DOWNLOAD VIDEO NO WATERMARK

License

Notifications You must be signed in to change notification settings

CuriousYoda/Tiktok-API-Python

 
 

Repository files navigation

API TIKTOK in Python

This is the unofficial TIKTOK API in Python. With this API you can get data of Treingding, User Post, Hashtag Post, Music Post.

Install

git clone https://github.com/demon071/Tiktok-API-Python.git
cd Tiktok-API-Python
pip install -r requirements.txt

Quick Start

from TiktokApi import *

Api = Tiktok()
trending, _ = Api.getTrendingFeed(max_cursor= '0')
for trend in trending['itemListData']:
    print(trend['itemInfos']['text'])

# print caption video

Download Video Trending Nowatermark

from TiktokApi import *

Api = Tiktok()
trending, _ = Api.getTrendingFeed(max_cursor= '0')
headers = {
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36",

    # Your device ID
    "iid": "",
    "openudid": "", 
    "device-id": "",

    # Your proxy
    "proxy-host": "",
    "proxy-port": "",
    "proxy-user": "",
    "proxy-pass": "",
       
 }
download = Download(path='trendingVideo')
items = []
for trend in trending['itemListData']:
    items.append(trend['itemInfos']['id'])

for item in items:
    result = download.downloadVideoNoWatermarkByID(id=item, file_name=item, headers=headers)
    if result:
        print("Download Video {}.mp4".format(item))
    else:
        print("ERROR")

Buy me a Coffee

Buy me a Coffee

Paypal

Contact

Telegram

About

TIKTOK API IN PYTHON , GET TRENDING VIDEO, GET VIDEO BY CHALLENGE, GET VIDEO BY MUSIC, GET VIDEO BY USER, DOWNLOAD VIDEO NO WATERMARK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%