This is the unofficial TIKTOK API in Python. With this API you can get data of Treingding, User Post, Hashtag Post, Music Post.
pip install requests
from TiktokApi import *
Api = Tiktok()
trending, _ = Api.getTrendingFeed(max_cursor= '0')
for trend in trending['itemListData']:
print(trend['itemInfos']['text'])
# print caption video
from TiktokApi import *
Api = Tiktok()
# get trending feed
Api.getTrendingFeed(max_cursor='0')
Api.getUserFeed(username='tiktok', max_cursor='0')
<<<<<<< HEAD
Api.getChallengeFeed(challenge='funny', max_cursor='0')
=======
Api.getChallengeFeed(challenge='funny', max_cursor='0')
>>>>>>> 4664eed799577f74d565d300579a5de30a39a879
Api.getMusicFeed(music='6939813781522369282', max_cursor='0')
Api.getInfoUser(username='tiktok')
Api.getInfoChallenge(challenge='funny')
Api.getInfoMusic(music='6939813781522369282')
Sign up to get API_KEY: https://rapidapi.com/AdKT36/api/tik-tok-feed Max request: 500/month (free)
from TiktokApi import *
api_key = ''
ApiNWM = TiktokNWM(api_key=api_key)
ApiNWM.get_user_feed('vtkh2004', max_cursor='0')
ApiNWM.get_music_feed(music='6939813781522369282', max_cursor='0')
ApiNWM.get_challenge_feed(challenge='fyp', max_cursor='0')
from TiktokApi import *
dl = Download({}, 'video') # folder video
url = 'https://www.tiktok.com/@batumicars/video/6926546688416976129' # support link vt.tiktok.com and vm.tiktok.com
dl.downloadVideoNoWatermark(url, file_name='video')
https://www.buymeacoffee.com/demon071 https://paypal.me/demon071