/Tiktok-API-Python

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

Primary LanguagePythonMIT LicenseMIT

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

pip install requests

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 (Limit: 500 request/day)

from TiktokApi import *

Api = Tiktok()
trending, _ = Api.getTrendingFeed(max_cursor= '0')

download = Download(path='trendingVideo')
items = []
for trend in trending['itemListData']:
    items.append(trend['itemInfos']['id'])

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

Buy me a Coffee

Buy me a Coffee

Paypal

Contact

Telegram