Download the PHP package haianibrahim/tiktok-scraper without Composer
On this page you can find all versions of the php package haianibrahim/tiktok-scraper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download haianibrahim/tiktok-scraper
More information about haianibrahim/tiktok-scraper
Files in haianibrahim/tiktok-scraper
Download haianibrahim/tiktok-scraper
More information about haianibrahim/tiktok-scraper
Files in haianibrahim/tiktok-scraper
Vendor haianibrahim
Package tiktok-scraper
Short Description Custom TikTok scraper for video posts, photo posts and user profiles (PHP 8, PSR-4, Guzzle)
License GPL-3.0
Package tiktok-scraper
Short Description Custom TikTok scraper for video posts, photo posts and user profiles (PHP 8, PSR-4, Guzzle)
License GPL-3.0
Please rate this library. Is it a good library?
Informations about the package tiktok-scraper
TikTok Custom PHP Scraper
Scrape basic details from a public TikTok video URL in PHP. This is a cleaned-up, PSR‑4, PHP 8 rewrite using Guzzle and zero private APIs.
Features
- Minimal public video details: canonical URL, IDs, username, nickname, description, thumbnail and counters
- PSR‑4 autoloaded library with typed DTO output
- Pluggable Guzzle client for testing and timeouts
- No headless browser, no TikTok private API usage
Installation
Install via Composer:
Quick Start
Output shape:
- status: "ok"
- link
- user (nickname)
- username
- user_id
- video_id
- video_desc
- thumbnail
- views, likes, comments, shares, favorites
API
- TikTokScraper::scrape(string $url): VideoDetails
- VideoDetails::toArray(): array
Exceptions
- Base: Hki98\TikTok\Exception\TikTokScraperException (catch-all)
- Specific:
- Hki98\TikTok\Exception\InvalidUrlException
- Hki98\TikTok\Exception\HttpRequestException
- Hki98\TikTok\Exception\EmptyResponseException
- Hki98\TikTok\Exception\ParseException
Notes
- TikTok frequently changes HTML structure; this scraper parses the rehydration JSON in a script tag. If the key paths change, update the normalization method.
- Respect robots.txt and terms of service in your jurisdiction.
Development
- PHP 8.1+
- PSR‑12 coding style recommended
- Autoload: PSR‑4 under namespace
Hki98\\TikTok(src/)
Run autoload dump after cloning:
Credit
- Original author: Haian K. Ibrahim (https://github.com/haianibrahim)
- HTML parsing here is regex-based for one script tag; the bundled
simple_html_dom.phpis kept for historical context but not used by the new class.
License
GPL-3.0
All versions of tiktok-scraper with dependencies
PHP Build Version
Package Version
The package haianibrahim/tiktok-scraper contains the following files
Loading the files please wait ...