pytik is a lightweight, dependency-free Python library for fetching data from TikTok.
TikTok does not provide a developer-facing API whatsoever. pytik seeks to address this shortcoming. pytik is a lightweight, dependency-free Python library for getting data from any particular TikTok video (think of metadata, such as the author of the video and what the song is). pytik aims to be highly reliable, secure, and fast, all the while depending on no third party dependencies.
One use case of pytik is for data harvesting, where you are able to generate very large datasets using data fetched using pytik. Another use case would be for content creators, where they would eventually be able to see what kind of content/hashtag is trending.
$ pip install pytik
pytik exposes a TikTok class, enabling you to request specific attributes from a TikTok video.
>>> from pytik import TikTok
>>> tk = TikTok('https://www.tiktok.com/@tiktok/video/6881450806688664838')
>>> tk.description()
"Good vibes only 🤙 @420doggface208 @mickfleetwood @tomhayes603"
>>> tk.user()
"tiktok"
>>> tk.song()
"original sound"
>>> tk.song_author()
"TikTok"