Download the PHP package flowtok/tiktok-api without Composer
On this page you can find all versions of the php package flowtok/tiktok-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download flowtok/tiktok-api
More information about flowtok/tiktok-api
Files in flowtok/tiktok-api
Package tiktok-api
Short Description Unofficial TikTok API for PHP
License MIT
Homepage https://github.com/ssovit/TikTok-API-PHP
Informations about the package tiktok-api
Unofficial TikTok API library for PHP
Unofficial TikTok API for PHP
Installation via Composer
composer require ssovit/tiktok-api
Try my Telegram Bot
Try my Telegram Bot to get non-watermarked video for any TikTok video
Want to support?
BTC: 1KA78sxnqEYPdni4txdieGJzVkH8AEn9dy ETH: 0x85110345abc62327d3c4cf657b7aabf8628d373c
Looking for Watermark-less video API?
It's available on monthly subscription. See below for plans and contact details.
Usage
Follow examples in /example
directory
Available Options
Cache Engine
You can build your own engine that will store and fetch cache from your local storage to prevent frequent requests to TikTok server. This can help being banned from TikTok server for too frequent requests.
Cache engine should have callable get
and set
methods that the API class uses
Usage
Stream and Download videos
Follow examples on /example
folder for video stream and download example
Note: TikTok videos will not play directly when used in HTML video player as they require www.tiktok.com
as http referrer.
Proxy Support
To use proxy, provide proxy-host
, proxy-port
, proxy-username
, proxy-password
It's highly recommended that you use proxy to prevent your IP from getting banned.
It's highly recommended to use Rotating
Proxy service if you are making lots of requests in short interval of time. Webshare.io Proxy Service is good. It's my referral link and I would get a bit from it
Available methods
getTrendingFeed
- Get trending feedgetTrendingFeed($maxCursor)
getUser
- Get profile data for TikTok UsergetUser($username)
getUserFeed
- Get user feed by IDgetUserFeed($user_id,$maxCursor)
getUserFeedByName
- Get user feed by NamegetUserFeedByName($username,$maxCursor)
getChallenge
- Get challenge/hashtag infogetChallenge($challenge)
getChallengeFeed
- Get challenge feed by IDgetChallengeFeed($challenge_id, $maxCursor)
getChallengeFeedByName
- Get challenge feed by namegetChallengeFeedByName($challenge,$maxCursor)
getMusic
- Get music infogetMusic($music_id)
getMusicFeed
- Get music feedgetMusicFeed($music_id,$maxCursor)
getVideoByID
- Get video by IDgetVideoByID($video_id)
getVideoByUrl
- Get video by URLgetVideoByUrl($video_url)
getNoWatermark
- Get no watermark for video by URLgetNoWatermark($video_url)
(only works for videos before 28th July 2020). Private API server availbale on subscription that works for all TikTok posts
$maxCursor
defaults to 0
, and is offset for results page. maxCursor
for next page is exposed on current page call feed data.
To-Do
- Save the Universe
- SOCKS proxy support
- Multiple proxy support (taking turns in round-robin. Act as rotating proxy)
Non-watermarked video url for newer videos
TikTok videos don't have video id as meta data on watermarked video posted after ~24-28 July 2020. Check below for subscription plans for non watermarked video API.
Pirvate API server subscription pricing
Package | Cost(per month) | Quota(requests per day) | Quota (requests per month) |
---|---|---|---|
Basic | 20 USD | 2,000 | ~60,000 |
Pro (popular) | 50 USD | 5,000 | ~150,000 |
Mega | 100 USD | 12,000 | ~360,000 |
Ultra | custom pricing | ? | ? |
Looking for api source code?
Source code for TikTok Mobile App API available.
Available variations
- PHP (standalone version with no external dependency)
- NodeJs (standalone version with no external dependency)
Contact
- Telegram https://t.me/ssovit
- WhatsApp https://wa.link/odwv3x
- Discord https://discord.gg/rSQd2QAXA8
- Email [email protected]
Empty results?
Use proxy. You are making too many API requests in short interval of time. Rotating proxy is recommended.
Want to improve this library? Want to contribute?
Don't hesitate to create pull requests.
Disclaimer
TikTok is always updating their API endpoints but I will try to keep this library whenever possible. I take no responsibility if you or your IP gets banned using this API. It's recommended that you use proxy.