daaner/tiktok is a Laravel package for tiktok scrapper for laravel 7+.
It currently has 11 GitHub stars and 4.095 downloads on Packagist (latest version 0.2).
Install it with composer require daaner/tiktok.
Discover more Laravel packages by daaner
or browse all Laravel packages to compare alternatives.
Last updated
Scraper TikTok (tiktok.com) using this Laravel framework package (Laravel).
Install package.
composer require daaner/tiktok
Add provider and facade in config/app.php.
Daaner\TikTok\TikTokServiceProvider::class,
// ---
'TikTok' => Daaner\TikTok\Facades\TikTok::class,
Publish the config and localization files with the command:
php artisan vendor:publish --provider="Daaner\TikTok\TikTokServiceProvider"
No special settings are needed. Queries also work with default settings. If you need finer settings, change the config file config/tiktok.php after
If necessary, write the settings to a .env.
Use the model you want and get an array.
getUser($userName) - Get user data by name (full array)getUserInfo($userName) - Get simple user data by name (only main and secondary array)use Daaner\TikTok\Models\UserInfo;
$tt = new UserInfo;
$user = $tt->getUser('tiktok');
//or
$user = $tt->getUser('@tiktok');
// or for simple info
$user = $tt->getUserInfo('tiktok');
dd($user);
getTag($tag) - Get tag infogetTagInfo($tag) - Get tag simple infogetTagApi($id, $count = 30, $cursor = 0) - Get tag id datause Daaner\TikTok\Models\TagInfo;
$tt = new TagInfo;
$tag = $tt->getTag('apple');
//or
$tag = $tt->getTag('#apple');
// or for simple
$tag = $tt->getTagInfo('apple');
//and API data
$tag = $tt->getTagApi('13100', 10, 0);
dd($tag);
getMusic($music) - Get music infogetMusicInfo($music) - Get music simple infogetMusicApi($id, $count = 30, $cursor = 0) - Get music id data (count shows 1 item less only this API query)))))use Daaner\TikTok\Models\MusicInfo;
$tt = new MusicInfo;
$music = $tt->getMusic('I-JUST-FELL-6768866707013388289');
//or
$music = $tt->getMusic('6768866707013388289');
// or for simple
$music = $tt->getMusicInfo('6768866707013388289');
//and API data
$music = $tt->getMusicApi('6728860413338847233', 10, 2);
dd($music);
getDiscover() - Get discover infogetDiscoverApi($type) - Get Suggested datause Daaner\TikTok\Models\DiscoverInfo;
$tt = new DiscoverInfo;
$discover = $tt->getDiscover();
//and API data
$discover = $tt->getDiscoverApi('user');
//or
$discover = $tt->getDiscoverApi('music');
//or
$discover = $tt->getDiscoverApi('challenge');
dd($discover);
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.