PHPackages                             restyler/tiktok-simple-scraper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. restyler/tiktok-simple-scraper

ActiveLibrary[API Development](/categories/api)

restyler/tiktok-simple-scraper
==============================

Simple Guzzle TikTok scraper, using Rapid API.

v1.0.0(5y ago)2121PHP

Since Oct 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/restyler/tiktok-simple-scraper)[ Packagist](https://packagist.org/packages/restyler/tiktok-simple-scraper)[ RSS](/packages/restyler-tiktok-simple-scraper/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (1)Versions (2)Used By (0)

Simple PHP Tiktok scraper API
=============================

[](#simple-php-tiktok-scraper-api)

This library is a Guzzle-based wrapper around RapidAPI solution which scrapes Tiktok.

Get your access key here:

See /examples folder for examples

Installation
------------

[](#installation)

```
composer require restyler/tiktok-simple-scraper

```

Quick example:
--------------

[](#quick-example)

### getUserInfo(): Get user info by username

[](#getuserinfo-get-user-info-by-username)

```
use TiktokScraper\Client;

$tiktokClient = new Client([
        'rapidapi_key' => 'YOUR-RAPID-API_KEY'
    ]
);

$response = $tiktokClient->getUserInfo([
    'username' => 'realmadrid',
    // 'second-proxy' => '1',  - use fallback proxy in case you see weird errors like 404 for existing accounts. Every method supports this.
]);

print_r($response);
// response now contains array of user info.
/*
Array
(
    [secUid] => MS4wLjABAAAAdi4wJZtAiIre_rQ1KiFteDmtrGBDIyoleHRNsjL14-Enf8aVfkLUJ0l_LcJPZkiv
    [userId] => 6693776501107033094
    [isSecret] =>
    [uniqueId] => realmadrid
    [nickName] => Real Madrid C.F.
    [signature] => ⚽️ The official Real Madrid C.F. account
🏆 13 times European Champions
    [covers] => Array
        (
            [0] => https://p77-sign-sg.tiktokcdn.com/imgurl
            [1] => https://p77-sign-sg.tiktokcdn.com/imgurl2
        )

    [coversMedium] => Array
        (
            [0] => https://p77-sign-sg.tiktokcdn.com/imgurl3
            [1] => https://p77-sign-sg.tiktokcdn.com/imgurl4
        )

    [following] => 8
    [fans] => 3800000
    [heart] => 28900000
    [video] => 338
    [verified] => 1
    [digg] => 0
    [ftc] =>
    [relation] => -1
    [openFavorite] =>
) */
```

### getUserFeed(): Get user feed by username

[](#getuserfeed-get-user-feed-by-username)

```
use TiktokScraper\Client;

$tiktokClient = new Client([
        'rapidapi_key' => 'YOUR-RAPID-API_KEY'
    ]
);

$response = $tiktokClient->getUserFeed([
    'username' => 'realmadrid',
    'limit' => '10'
]);

print_r($response);
// response now contains array of user feed items.
```

### getVideoInfo(): Get video info by video url

[](#getvideoinfo-get-video-info-by-video-url)

```
use TiktokScraper\Client;
$tiktokClient = new Client([
        'rapidapi_key' => 'YOUR-RAPID-API_KEY'
    ]
);
$response = $tiktokClient->getVideoInfo([
    'url' => 'https://www.tiktok.com/@tuzelitydance/video/6867065857240026369?sender_device=pc&sender_web_id=6842368731214956037&is_from_webapp=1'
]);

print_r($response);
// response now contains video result.
```

### getMusicInfo(): Get music info by video url

[](#getmusicinfo-get-music-info-by-video-url)

```
use TiktokScraper\Client;
$tiktokClient = new Client([
        'rapidapi_key' => 'YOUR-RAPID-API_KEY'
    ]
);
$response = $tiktokClient->getMusicInfo([
    'url' => 'https://www.tiktok.com/music/Bad-Liar-6613051741099280390?lang=en'
]);

print_r($response);
// response now contains music result.
```

Proxy Fallback
--------------

[](#proxy-fallback)

This RapidAPI API uses fastest proxy available for the moment. It is problematic to detect when Tiktok bans some ip address, so if you use the API heavily Tiktok may start throwing 404 responses for existing resources. This can be mitigated by using distributed proxy network via `&second-proxy=1` query param (available for all library public methods). Distributed proxy network is typically slower but ipractically impossible to ban.

Examples, Error Handling
------------------------

[](#examples-error-handling)

See full example file [here](examples/index.php).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2037d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/78968dbd2775b42af928d99c87bd92fba2f920f37fad640e4f645d47bd880704?d=identicon)[restyler](/maintainers/restyler)

---

Top Contributors

[![restyler](https://avatars.githubusercontent.com/u/775507?v=4)](https://github.com/restyler "restyler (6 commits)")

### Embed Badge

![Health badge](/badges/restyler-tiktok-simple-scraper/health.svg)

```
[![Health](https://phpackages.com/badges/restyler-tiktok-simple-scraper/health.svg)](https://phpackages.com/packages/restyler-tiktok-simple-scraper)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
