TikTok has gained an enormous number of users lately and its videos are circling around the social media platforms. That means its community is getting bigger and it started to become a center of attraction.
This is an unofficial TikTok API offering a solution for developers who crave for a gateway for their TikTok API calls. It was developed by reverse engineering by unlocking how the actual application is working. Note that it is not affiliated in any way by Tik Tok Inc. or its affiliates.
How TikTok API works?
This API is capable of fetching the following data directly from TikTok, in real-time, without caching and storing any data:
- Display trending videos from any region
- Get video by id
- Download video
- Get user by name
- Get videos of a user
- Get hashtag
- Get videos by hashtag
- Get music by id
- Get videos by music id
How to play and download the videos
Many endpoints return downloadAddr and playAddr fields. You may not be able to call them directly, since TikTok performs an HTTP Referer header check on the URLs.
Just pass a Referer header with a valid TikTok URL (such as https://www.tiktok.com/foryou?lang=en) and it will work
curl --location \ --request GET 'https://v19-web.tiktokcdn.com/.../.../.../BeMjMyXi06Yw%3D%3D&vl=&vr=' \ --header 'Referer: https://www.tiktok.com/foryou?lang=en'
Check out this blog article for a step by step guide to embedding Tik Tok videos on your web site and mobile apps.
Any comments or questions? Send your requests via chat or support section.