PHPackages                             ssovit/tiktok-private-api - 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. ssovit/tiktok-private-api

AbandonedArchivedLibrary[API Development](/categories/api)

ssovit/tiktok-private-api
=========================

Unofficial TikTok Private API for PHP

1.0.7(4y ago)241833[1 PRs](https://github.com/ssovit/TikTok-Private-API-PHP/pulls)MITPHP

Since Jul 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ssovit/TikTok-Private-API-PHP)[ Packagist](https://packagist.org/packages/ssovit/tiktok-private-api)[ Docs](https://github.com/ssovit/tiktok-private-api)[ RSS](/packages/ssovit-tiktok-private-api/feed)WikiDiscussions master Synced 1w ago

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

Unofficial TikTok Private API library for PHP
=============================================

[](#unofficial-tiktok-private-api-library-for-php)

API Wrapper for private API access

Installation
============

[](#installation)

Via composer `composer require ssovit/tiktok-private-api`

How does this work?
===================

[](#how-does-this-work)

Monthly subscription of my private API server is required for this to function. See below.

Documentation
=============

[](#documentation)

Usage
=====

[](#usage)

Follow examples in `/example` directory

```
$api=new \Sovit\TikTokPrivate\Api(array(/* config array*/));

$trendingFeed=$api->getForYou($maxCursor=0);

$userData=$api->getUser("USERNAME");

$userFeed=$api->getUserFeed("USER_ID",$maxCursor=0);

$challenge=$api->getChallenge("CHALLENGE_ID");

$challengeFeed=$api->getChallengeFeed("CHALLENGE_ID",$maxCursor=0);

$musc=$api->getMusic("6798898508385585925");

$musicFeed=$api->getMusicFeed("6798898508385585925",$maxCursor=0);

$videoData=$api->getVideoByID("6829540826570296577");

$videoData=$api->getVideoByUrl("https://www.tiktok.com/@zachking/video/6829303572832750853");

// More to come
```

Available Options
=================

[](#available-options)

```
$api=new \Sovit\TikTokPrivate\Api(array(
	"proxy"		=> '', // proxy in url format like http://username:password@host:port
	"cache_timeout"		=> 3600 // 1 hours cache timeout
	"transform_result"		=> true, // false if you want to get json without transforming it to more readable JSON structure
	"api_key"		=> "API_KEY" // see below on how to get API key
	), $cache_engine=false);
```

Cache Engine
============

[](#cache-engine)

You can build your own engine that will store and fetch cache from your local storage to prevent frequent requests to TikTok server. This can help being banned from TikTok server for too frequent requests.

Cache engine should have callable `get` and `set` methods that the API class uses

```
// Example using WordPress transient as cache engine
Class MyCacheEngine{
	function get($cache_key){
		return get_transient($cache_key);
	}
	function set($cache_key,$data,$timeout=3600){
		return set_transient($cache_key,$data,$timeout);
	}
}
```

**Usage**

```
$cache_engine=new MyCacheEngine();
$api=new \Sovit\TikTokPrivate\Api(array(/* config array*/),$cache_engine);
```

Available methods
=================

[](#available-methods)

- `getForYou` - Get trending feed `getForYou($maxCursor)`
- `getUser` - Get profile data for TikTok User `getUser($username)`
- `getUserFeed` - Get user feed by ID `getUserFeed($user_id,$maxCursor)`
- `getChallenge` - Get challenge/hashtag info `getChallenge($challenge)`
- `getChallengeFeed` - Get challenge feed by ID `getChallengeFeed($challenge_id, $maxCursor)`
- `getMusic` - Get music info `getMusic($music_id)`
- `getMusicFeed` - Get music feed `getMusicFeed($music_id,$maxCursor)`
- `getVideoByID` - Get video by ID `getVideoByID($video_id)`
- `getVideoByUrl` - Get video by URL `getVideoByUrl($video_url)`
- *not all methods are documented, will update when I am free*`$maxCursor` defaults to `0`, and is offset for results page. `maxCursor` for next page is exposed on current page call feed data.

Pirvate API server subscription pricing
---------------------------------------

[](#pirvate-api-server-subscription-pricing)

*No Longer Available*

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

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

Every ~95 days

Total

5

Last Release

1468d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3162122?v=4)[Sovit Tamrakar](/maintainers/ssovit)[@ssovit](https://github.com/ssovit)

---

Top Contributors

[![ssovit](https://avatars.githubusercontent.com/u/3162122?v=4)](https://github.com/ssovit "ssovit (15 commits)")

---

Tags

apiphpscrappertiktoktiktok-apitiktok-scraperttencryptxgorgonxlogTikTok tiktok apitiktok-scrapertiktok-app-api

### Embed Badge

![Health badge](/badges/ssovit-tiktok-private-api/health.svg)

```
[![Health](https://phpackages.com/badges/ssovit-tiktok-private-api/health.svg)](https://phpackages.com/packages/ssovit-tiktok-private-api)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M49](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2482.9k](/packages/filescom-files-php-sdk)[ssovit/tiktok-api

Unofficial TikTok API for PHP

15038.8k](/packages/ssovit-tiktok-api)[volcengine/volcengine-php-sdk

119.5k](/packages/volcengine-volcengine-php-sdk)

PHPackages © 2026

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