Download the PHP package haianibrahim/tiktok-scraper-laravel without Composer
On this page you can find all versions of the php package haianibrahim/tiktok-scraper-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download haianibrahim/tiktok-scraper-laravel
More information about haianibrahim/tiktok-scraper-laravel
Files in haianibrahim/tiktok-scraper-laravel
Package tiktok-scraper-laravel
Short Description Laravel package for TikTok video scraping with clean API integration for Laravel 11.x, 12.x, and 13.x
License MIT
Informations about the package tiktok-scraper-laravel
Laravel TikTok Scraper
A Laravel package that provides an easy way to scrape TikTok video, photo post, and user profile data directly into your Laravel application. This package is a standalone scraper implementation that adds Laravel-specific features including caching, rate limiting, events, and comprehensive API endpoints.
Features
- ๐ Laravel 11, 12 & 13 Compatible - Built for modern Laravel versions
- ๐ฌ Video Scraping - Extract metadata and engagement stats from video URLs
- ๐ผ๏ธ Photo Post Scraping - Full support for TikTok photo (slideshow) posts
- ๐ค User Profile Scraping - Fetch profile details from a username or profile URL
- ๐ฆ Easy Integration - Simple service provider and facade
- ๐ง Configurable - Comprehensive configuration options
- ๐พ Caching Support - Built-in caching with multiple drivers
- โก Rate Limiting - Prevent API abuse with customizable rate limits
- ๐ Statistics Tracking - Monitor scraping performance and usage
- ๐ฏ Event System - Laravel events for scraping operations
- ๐ก๏ธ Exception Handling - Comprehensive error handling
- ๐ HTTP API - Ready-to-use REST API endpoints
- ๐งช Testing Support - Full test suite included
- ๐ Artisan Commands - CLI tools for testing and management
Installation
Install the package via Composer:
Laravel Auto-Discovery
The package uses Laravel's auto-discovery feature, so the service provider will be automatically registered.
Publish Configuration
Publish the configuration file:
Run Migrations
Publish and run the database migrations for logging:
Configuration
The configuration file is published to config/tiktok-scraper.php. Key configuration options include:
Usage
Using the Facade
Using Dependency Injection
Video Details Object
The VideoDetails object (returned for both video and photo posts) contains the following information:
User Info Object
The UserInfo object is returned by scrapeUser():
Artisan Commands
Test Scraper
Test the scraper functionality:
Bulk Scraping
Scrape multiple URLs from a file:
View Statistics
View scraping statistics:
Cache Management
Manage the cache:
HTTP API Endpoints
The package provides ready-to-use API endpoints:
Scrape Single Video
Scrape User Profile
The user field accepts a bare username, an @username, or a full profile URL.
Bulk Scrape
Validate URL
Get Statistics
Clear Cache
Health Check
Events
The package dispatches Laravel events for monitoring:
VideoScraped Event
UserScraped Event
ScrapingFailed Event
RateLimitHit Event
Exception Handling
The package provides specific exceptions for different error scenarios:
Testing
Run the package tests:
Run tests with coverage:
Requirements
- PHP 8.2 or higher
- Laravel 11.0, 12.0, or 13.0
- GuzzleHTTP 7.8 or higher
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This package is open-sourced software licensed under the MIT license.
Support
If you find this package helpful, please consider starring the repository.
For issues and feature requests, please use the GitHub issue tracker.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
If you discover a security vulnerability, please send an e-mail via the contact information in the composer.json file. All security vulnerabilities will be promptly addressed.
Credits
- Haian Ibrahim
- Based on the original tiktok-scraper package
- All Contributors
All versions of tiktok-scraper-laravel with dependencies
guzzlehttp/guzzle Version ^7.8
illuminate/cache Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0