Download the PHP package needlaravelsite/tikapi-php without Composer
On this page you can find all versions of the php package needlaravelsite/tikapi-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download needlaravelsite/tikapi-php
More information about needlaravelsite/tikapi-php
Files in needlaravelsite/tikapi-php
Package tikapi-php
Short Description TikAPI SDK for plain PHP and Laravel โ created by NeedLaravelSite
License MIT
Informations about the package tikapi-php
needlaravelsite/tikapi-php
TikAPI SDK for plain PHP and Laravel, created and maintained by NeedLaravelSite.
๐ Overview
This SDK provides a clean, scalable, and framework-agnostic wrapper for the TikAPI โ making it easy to fetch TikTok data via PHP or Laravel.
โ
Works in plain PHP
โ
Fully integrated with Laravel (Service Provider + Facade)
โ
Built on Guzzle
โ
Auto-loads API keys from .env
โ
PSR-4 and PSR-12 compliant
โ
Includes feature tests for all public endpoints
๐งฐ Installation
Requires PHP 8.0+
โ๏ธ Laravel Setup
1. Publish Configuration
2. Add Environment Variables
If any of these values are missing, the SDK safely defaults to environment values or fallback URLs.
๐งฑ Project Structure
๐งฉ Usage Examples
โ In Laravel (via Facade or DI)
Using the Facade:
Using Dependency Injection:
โ In Plain PHP
Or provide credentials manually:
๐ Available Endpoints
| Endpoint | Class | Description |
|---|---|---|
/public/check |
Check |
Verify TikAPI connectivity or get public user data |
/public/posts |
Posts |
Get posts by a TikTok user |
/public/likes |
Likes |
Get liked videos for a user |
/public/followers |
Followers |
Get a user's followers |
/public/following |
Following |
Get accounts followed by a user |
/public/explore |
Explore |
Get trending TikTok posts ("For You" feed) |
/public/video |
Video |
Get TikTok video details by ID |
/public/hashtag |
Hashtag |
Get posts by hashtag name or ID |
/public/comment/list |
Comments |
Get comments under a video |
/public/comment/reply/list |
CommentReplies |
Get replies to a comment |
/public/music |
Music |
Get posts using a specific sound |
/public/music/info |
MusicInfo |
Get sound metadata (title, author, duration) |
/public/search/{category} |
Search |
Search users, videos, or keywords |
๐ง Example API Calls
๐งช Testing
Run All Tests
Run Specific Test File
Run Specific Method
Integration tests require a valid
TIKAPI_API_KEYin your.envfile.
๐งฐ Error Handling
All errors are thrown as TikApiException for consistent handling.
๐ค Contributing
Contributions are welcome under the NeedLaravelSite organization.
Guidelines
- Follow PSR-12 coding standards
- Add or update feature tests for new endpoints
- Update README when adding new functionality
๐ License
MIT License ยฉ 2025
Built by Muhammad Waqas at NeedLaravelSite
All versions of tikapi-php with dependencies
guzzlehttp/guzzle Version ^7.0
illuminate/support Version ^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0