This is an unofficial TikTok API. It's been made by reverse engineering how the actual application is working. It is not affiliated anyway by Tik Tok Inc. or its affiliates.
This API is capable of fetching the following information 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 a 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. Sample:
curl --location \ --request GET 'https://v19-web.tiktokcdn.com/.../.../.../BeMjMyXi06Yw%3D%3D&vl=&vr=' \ --header 'Referer: https://www.tiktok.com/foryou?lang=en'
If you have any comments or questions send your requests via chat or support section.