All URIs are relative to https://scrapebadger.com, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| tiktokGeneralSearch() | GET /v1/tiktok/search | General search |
| tiktokGetCommentReplies() | GET /v1/tiktok/comments/{comment_id}/replies | Get comment replies |
| tiktokGetComments() | GET /v1/tiktok/videos/{video_id}/comments | Get comments |
| tiktokGetFollowersDeprecated() | GET /v1/tiktok/users/{username}/followers | Get followers (deprecated) |
| tiktokGetFollowingDeprecated() | GET /v1/tiktok/users/{username}/following | Get following (deprecated) |
| tiktokGetHashtagDetail() | GET /v1/tiktok/hashtags/{name} | Get hashtag detail |
| tiktokGetHashtagVideos() | GET /v1/tiktok/hashtags/{name}/videos | Get hashtag videos |
| tiktokGetLikedVideosDeprecated() | GET /v1/tiktok/users/{username}/liked | Get liked videos (deprecated) |
| tiktokGetMusicSoundDetail() | GET /v1/tiktok/music/{music_id} | Get music/sound detail |
| tiktokGetMusicVideos() | GET /v1/tiktok/music/{music_id}/videos | Get music videos |
| tiktokGetOembedMetadata() | GET /v1/tiktok/oembed | Get oEmbed metadata |
| tiktokGetRelatedVideos() | GET /v1/tiktok/videos/{video_id}/related | Get related videos |
| tiktokGetReposts() | GET /v1/tiktok/users/{username}/reposts | Get reposts |
| tiktokGetTiktokAdDetail() | GET /v1/tiktok/ads/{ad_id} | Get TikTok ad detail |
| tiktokGetTranscript() | GET /v1/tiktok/videos/{video_id}/transcript | Get transcript |
| tiktokGetUserProfile() | GET /v1/tiktok/users/{username} | Get user profile |
| tiktokGetUserVideos() | GET /v1/tiktok/users/{username}/videos | Get user videos |
| tiktokGetVideoDetail() | GET /v1/tiktok/videos/{video_id} | Get video detail |
| tiktokHealthCheck() | GET /v1/tiktok/health | Health check |
| tiktokHealthCheckHead() | HEAD /v1/tiktok/health | Health check |
| tiktokListRegions() | GET /v1/tiktok/regions | List regions |
| tiktokSearchHashtags() | GET /v1/tiktok/search/hashtags | Search hashtags |
| tiktokSearchTheTiktokAdLibrary() | GET /v1/tiktok/ads/search | Search the TikTok Ad Library |
| tiktokSearchTiktokAdvertisers() | GET /v1/tiktok/ads/advertisers | Search TikTok advertisers |
| tiktokSearchTiktokShopProducts() | GET /v1/tiktok/shop/search | Search TikTok Shop products |
| tiktokSearchUsers() | GET /v1/tiktok/search/users | Search users |
| tiktokSearchVideos() | GET /v1/tiktok/search/videos | Search videos |
| tiktokTiktokShopCategorySubcategoriesTopProducts() | GET /v1/tiktok/shop/categories/{category_id} | TikTok Shop category: subcategories + top products |
| tiktokTiktokShopProductDetail() | GET /v1/tiktok/shop/products/{product_id} | TikTok Shop product detail |
| tiktokTiktokShopProductReviews() | GET /v1/tiktok/shop/products/{product_id}/reviews | TikTok Shop product reviews |
| tiktokTiktokShopRootCategories() | GET /v1/tiktok/shop/categories | TikTok Shop root categories |
| tiktokTiktokShopStoreProducts() | GET /v1/tiktok/shop/stores/{seller_id} | TikTok Shop store + products |
| tiktokTrendingHashtags() | GET /v1/tiktok/trending/hashtags | Trending hashtags |
| tiktokTrendingSongs() | GET /v1/tiktok/trending/songs | Trending songs |
| tiktokTrendingVideos() | GET /v1/tiktok/trending/videos | Trending videos |
tiktokGeneralSearch($query, $region, $count, $cursor): mixedGeneral search
General TikTok search — video results from the Top feed.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$query = 'query_example'; // string | Search keyword
$region = 'US'; // string
$count = 20; // int
$cursor = 'cursor_example'; // string | Composite pagination cursor (offset.search_id) from a prior page's pagination.cursor
try {
$result = $apiInstance->tiktokGeneralSearch($query, $region, $count, $cursor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGeneralSearch: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| query | string | Search keyword | |
| region | string | [optional] [default to 'US'] | |
| count | int | [optional] [default to 20] | |
| cursor | string | Composite pagination cursor (offset.search_id) from a prior page's pagination.cursor | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokGetCommentReplies($comment_id, $video_id, $region, $count, $cursor): mixedGet comment replies
Get replies to a TikTok comment (best-effort).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$comment_id = 'comment_id_example'; // string
$video_id = 'video_id_example'; // string | Parent video id
$region = 'US'; // string
$count = 20; // int
$cursor = 'cursor_example'; // string | Pagination cursor from a prior page's pagination.cursor
try {
$result = $apiInstance->tiktokGetCommentReplies($comment_id, $video_id, $region, $count, $cursor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGetCommentReplies: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| comment_id | string | ||
| video_id | string | Parent video id | |
| region | string | [optional] [default to 'US'] | |
| count | int | [optional] [default to 20] | |
| cursor | string | Pagination cursor from a prior page's pagination.cursor | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokGetComments($video_id, $region, $count, $cursor): mixedGet comments
Get top-level comments on a TikTok video.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$video_id = 'video_id_example'; // string
$region = 'US'; // string
$count = 20; // int
$cursor = 'cursor_example'; // string | Pagination cursor from a prior page's pagination.cursor
try {
$result = $apiInstance->tiktokGetComments($video_id, $region, $count, $cursor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGetComments: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | string | ||
| region | string | [optional] [default to 'US'] | |
| count | int | [optional] [default to 20] | |
| cursor | string | Pagination cursor from a prior page's pagination.cursor | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokGetFollowersDeprecated($username, $region, $count): mixedGet followers (deprecated)
DEPRECATED — TikTok followers require an authenticated account session. Returns HTTP 410.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$username = 'username_example'; // string
$region = 'US'; // string
$count = 30; // int
try {
$result = $apiInstance->tiktokGetFollowersDeprecated($username, $region, $count);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGetFollowersDeprecated: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | string | ||
| region | string | [optional] [default to 'US'] | |
| count | int | [optional] [default to 30] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokGetFollowingDeprecated($username, $region, $count): mixedGet following (deprecated)
DEPRECATED — TikTok following requires an authenticated account session. Returns HTTP 410.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$username = 'username_example'; // string
$region = 'US'; // string
$count = 30; // int
try {
$result = $apiInstance->tiktokGetFollowingDeprecated($username, $region, $count);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGetFollowingDeprecated: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | string | ||
| region | string | [optional] [default to 'US'] | |
| count | int | [optional] [default to 30] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokGetHashtagDetail($name, $region): mixedGet hashtag detail
Get TikTok hashtag/challenge detail.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$name = 'name_example'; // string
$region = 'US'; // string
try {
$result = $apiInstance->tiktokGetHashtagDetail($name, $region);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGetHashtagDetail: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| name | string | ||
| region | string | [optional] [default to 'US'] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokGetHashtagVideos($name, $region, $count, $cursor): mixedGet hashtag videos
Get videos tagged with a TikTok hashtag.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$name = 'name_example'; // string
$region = 'US'; // string
$count = 30; // int
$cursor = 'cursor_example'; // string | Pagination cursor from a prior page's pagination.cursor
try {
$result = $apiInstance->tiktokGetHashtagVideos($name, $region, $count, $cursor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGetHashtagVideos: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| name | string | ||
| region | string | [optional] [default to 'US'] | |
| count | int | [optional] [default to 30] | |
| cursor | string | Pagination cursor from a prior page's pagination.cursor | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokGetLikedVideosDeprecated($username, $region, $count): mixedGet liked videos (deprecated)
DEPRECATED — TikTok liked videos require an authenticated account session. Returns HTTP 410.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$username = 'username_example'; // string
$region = 'US'; // string
$count = 30; // int
try {
$result = $apiInstance->tiktokGetLikedVideosDeprecated($username, $region, $count);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGetLikedVideosDeprecated: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | string | ||
| region | string | [optional] [default to 'US'] | |
| count | int | [optional] [default to 30] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokGetMusicSoundDetail($music_id, $region): mixedGet music/sound detail
Get TikTok sound/music detail.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$music_id = 'music_id_example'; // string
$region = 'US'; // string
try {
$result = $apiInstance->tiktokGetMusicSoundDetail($music_id, $region);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGetMusicSoundDetail: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| music_id | string | ||
| region | string | [optional] [default to 'US'] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokGetMusicVideos($music_id, $region, $count, $cursor): mixedGet music videos
Get videos using a given TikTok sound.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$music_id = 'music_id_example'; // string
$region = 'US'; // string
$count = 30; // int
$cursor = 'cursor_example'; // string | Pagination cursor from a prior page's pagination.cursor
try {
$result = $apiInstance->tiktokGetMusicVideos($music_id, $region, $count, $cursor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGetMusicVideos: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| music_id | string | ||
| region | string | [optional] [default to 'US'] | |
| count | int | [optional] [default to 30] | |
| cursor | string | Pagination cursor from a prior page's pagination.cursor | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokGetOembedMetadata($url, $region): mixedGet oEmbed metadata
Get cheap unauthenticated oEmbed metadata for a TikTok URL.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$url = 'url_example'; // string | Full TikTok video or profile URL
$region = 'US'; // string
try {
$result = $apiInstance->tiktokGetOembedMetadata($url, $region);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGetOembedMetadata: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| url | string | Full TikTok video or profile URL | |
| region | string | [optional] [default to 'US'] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokGetRelatedVideos($video_id, $region, $count): mixedGet related videos
Get TikTok's related videos for a given video.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$video_id = 'video_id_example'; // string
$region = 'US'; // string
$count = 16; // int
try {
$result = $apiInstance->tiktokGetRelatedVideos($video_id, $region, $count);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGetRelatedVideos: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | string | ||
| region | string | [optional] [default to 'US'] | |
| count | int | [optional] [default to 16] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokGetReposts($username, $region, $count): mixedGet reposts
Get videos a TikTok user has reposted.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$username = 'username_example'; // string
$region = 'US'; // string
$count = 30; // int
try {
$result = $apiInstance->tiktokGetReposts($username, $region, $count);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGetReposts: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | string | ||
| region | string | [optional] [default to 'US'] | |
| count | int | [optional] [default to 30] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokGetTiktokAdDetail($ad_id, $region): mixedGet TikTok ad detail
Get a single ad's advertiser, creatives, and targeting/impression breakdown.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$ad_id = 'ad_id_example'; // string
$region = 'DE'; // string | EU region code (the Ad Library is EU-only)
try {
$result = $apiInstance->tiktokGetTiktokAdDetail($ad_id, $region);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGetTiktokAdDetail: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| ad_id | string | ||
| region | string | EU region code (the Ad Library is EU-only) | [optional] [default to 'DE'] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokGetTranscript($video_id, $region): mixedGet transcript
Get subtitle/caption tracks for a TikTok video.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$video_id = 'video_id_example'; // string
$region = 'US'; // string
try {
$result = $apiInstance->tiktokGetTranscript($video_id, $region);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGetTranscript: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | string | ||
| region | string | [optional] [default to 'US'] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokGetUserProfile($username, $region): mixedGet user profile
Get a TikTok user's full profile.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$username = 'username_example'; // string
$region = 'US'; // string | Content region (ISO 3166-1 alpha-2)
try {
$result = $apiInstance->tiktokGetUserProfile($username, $region);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGetUserProfile: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | string | ||
| region | string | Content region (ISO 3166-1 alpha-2) | [optional] [default to 'US'] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokGetUserVideos($username, $region, $count, $cursor): mixedGet user videos
Get a TikTok user's posted videos.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$username = 'username_example'; // string
$region = 'US'; // string
$count = 30; // int
$cursor = 'cursor_example'; // string | Pagination cursor from a prior page's `pagination.cursor` (signer path only).
try {
$result = $apiInstance->tiktokGetUserVideos($username, $region, $count, $cursor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGetUserVideos: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | string | ||
| region | string | [optional] [default to 'US'] | |
| count | int | [optional] [default to 30] | |
| cursor | string | Pagination cursor from a prior page's `pagination.cursor` (signer path only). | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokGetVideoDetail($video_id, $region, $username): mixedGet video detail
Get full metadata for a single TikTok video/post.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$video_id = 'video_id_example'; // string
$region = 'US'; // string
$username = 'username_example'; // string | Author handle (skips oEmbed lookup)
try {
$result = $apiInstance->tiktokGetVideoDetail($video_id, $region, $username);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokGetVideoDetail: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | string | ||
| region | string | [optional] [default to 'US'] | |
| username | string | Author handle (skips oEmbed lookup) | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokHealthCheck(): mixedHealth check
Check health of the TikTok scraper service.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->tiktokHealthCheck();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokHealthCheck: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokHealthCheckHead(): mixedHealth check
Check health of the TikTok scraper service.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->tiktokHealthCheckHead();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokHealthCheckHead: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokListRegions(): mixedList regions
List supported TikTok content regions.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->tiktokListRegions();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokListRegions: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokSearchHashtags($query, $region, $count, $cursor): mixedSearch hashtags
Search TikTok hashtags by keyword.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$query = 'query_example'; // string | Search keyword
$region = 'US'; // string
$count = 20; // int
$cursor = 'cursor_example'; // string | Composite pagination cursor (offset.search_id) from a prior page's pagination.cursor
try {
$result = $apiInstance->tiktokSearchHashtags($query, $region, $count, $cursor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokSearchHashtags: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| query | string | Search keyword | |
| region | string | [optional] [default to 'US'] | |
| count | int | [optional] [default to 20] | |
| cursor | string | Composite pagination cursor (offset.search_id) from a prior page's pagination.cursor | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokSearchTheTiktokAdLibrary($query, $advertiser_id, $region, $days, $sort, $offset, $search_id, $count): mixedSearch the TikTok Ad Library
Search TikTok's Commercial Content Library (ad transparency) by keyword or advertiser.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$query = ''; // string | Keyword (ignored when advertiser_id is set)
$advertiser_id = ''; // string | Advertiser business id(s) for advertiser search
$region = 'DE'; // string | EU region code (the Ad Library is EU-only)
$days = 30; // int
$sort = 'last_shown_date,desc'; // string
$offset = 0; // int
$search_id = ''; // string
$count = 20; // int
try {
$result = $apiInstance->tiktokSearchTheTiktokAdLibrary($query, $advertiser_id, $region, $days, $sort, $offset, $search_id, $count);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokSearchTheTiktokAdLibrary: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| query | string | Keyword (ignored when advertiser_id is set) | [optional] [default to ''] |
| advertiser_id | string | Advertiser business id(s) for advertiser search | [optional] [default to ''] |
| region | string | EU region code (the Ad Library is EU-only) | [optional] [default to 'DE'] |
| days | int | [optional] [default to 30] | |
| sort | string | [optional] [default to 'last_shown_date,desc'] | |
| offset | int | [optional] [default to 0] | |
| search_id | string | [optional] [default to ''] | |
| count | int | [optional] [default to 20] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokSearchTiktokAdvertisers($query, $region, $count): mixedSearch TikTok advertisers
Look up TikTok advertiser business ids by name (feeds ads/search?advertiser_id=).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$query = 'query_example'; // string | Advertiser name (or partial) to look up
$region = 'DE'; // string | EU region code (the Ad Library is EU-only)
$count = 10; // int
try {
$result = $apiInstance->tiktokSearchTiktokAdvertisers($query, $region, $count);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokSearchTiktokAdvertisers: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| query | string | Advertiser name (or partial) to look up | |
| region | string | EU region code (the Ad Library is EU-only) | [optional] [default to 'DE'] |
| count | int | [optional] [default to 10] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokSearchTiktokShopProducts($q, $region, $offset): mixedSearch TikTok Shop products
Keyword search over TikTok Shop products: 30 per page with offset pagination (US); the first page also carries matching shops and related searches.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$q = 'q_example'; // string | Keyword, e.g. 'wireless earbuds'
$region = 'US'; // string | Market: US, GB, ID
$offset = 0; // int | Pass back next_offset for the next page (US)
try {
$result = $apiInstance->tiktokSearchTiktokShopProducts($q, $region, $offset);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokSearchTiktokShopProducts: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| q | string | Keyword, e.g. 'wireless earbuds' | |
| region | string | Market: US, GB, ID | [optional] [default to 'US'] |
| offset | int | Pass back next_offset for the next page (US) | [optional] [default to 0] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokSearchUsers($query, $region, $count, $cursor): mixedSearch users
Search TikTok users by keyword.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$query = 'query_example'; // string | Search keyword
$region = 'US'; // string
$count = 20; // int
$cursor = 'cursor_example'; // string | Composite pagination cursor (offset.search_id) from a prior page's pagination.cursor
try {
$result = $apiInstance->tiktokSearchUsers($query, $region, $count, $cursor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokSearchUsers: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| query | string | Search keyword | |
| region | string | [optional] [default to 'US'] | |
| count | int | [optional] [default to 20] | |
| cursor | string | Composite pagination cursor (offset.search_id) from a prior page's pagination.cursor | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokSearchVideos($query, $region, $count, $cursor): mixedSearch videos
Search TikTok videos by keyword.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$query = 'query_example'; // string | Search keyword
$region = 'US'; // string
$count = 20; // int
$cursor = 'cursor_example'; // string | Composite pagination cursor (offset.search_id) from a prior page's pagination.cursor
try {
$result = $apiInstance->tiktokSearchVideos($query, $region, $count, $cursor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokSearchVideos: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| query | string | Search keyword | |
| region | string | [optional] [default to 'US'] | |
| count | int | [optional] [default to 20] | |
| cursor | string | Composite pagination cursor (offset.search_id) from a prior page's pagination.cursor | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokTiktokShopCategorySubcategoriesTopProducts($category_id, $region): mixedTikTok Shop category: subcategories + top products
A category's subcategories and its top products as TikTok Shop ranks them.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$category_id = 'category_id_example'; // string
$region = 'US'; // string | Market: US, GB, ID
try {
$result = $apiInstance->tiktokTiktokShopCategorySubcategoriesTopProducts($category_id, $region);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokTiktokShopCategorySubcategoriesTopProducts: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| category_id | string | ||
| region | string | Market: US, GB, ID | [optional] [default to 'US'] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokTiktokShopProductDetail($product_id, $region): mixedTikTok Shop product detail
Full TikTok Shop product page: description, images, price, SKUs with stock, first reviews, shop and TikTok's AI summary.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$product_id = 'product_id_example'; // string
$region = 'US'; // string | Market: US, GB, ID
try {
$result = $apiInstance->tiktokTiktokShopProductDetail($product_id, $region);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokTiktokShopProductDetail: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| product_id | string | ||
| region | string | Market: US, GB, ID | [optional] [default to 'US'] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokTiktokShopProductReviews($product_id, $region, $page, $count, $sort, $rating, $with_media, $verified): mixedTikTok Shop product reviews
Paginated product reviews with the rating breakdown (US).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$product_id = 'product_id_example'; // string
$region = 'US'; // string | Market: US, GB, ID
$page = 1; // int
$count = 20; // int
$sort = 'recommended'; // string | recommended | recent
$rating = 56; // int | Only this star rating
$with_media = false; // bool | Only reviews with photos/videos
$verified = false; // bool | Only verified purchases
try {
$result = $apiInstance->tiktokTiktokShopProductReviews($product_id, $region, $page, $count, $sort, $rating, $with_media, $verified);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokTiktokShopProductReviews: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| product_id | string | ||
| region | string | Market: US, GB, ID | [optional] [default to 'US'] |
| page | int | [optional] [default to 1] | |
| count | int | [optional] [default to 20] | |
| sort | string | recommended | recent |
| rating | int | Only this star rating | [optional] |
| with_media | bool | Only reviews with photos/videos | [optional] [default to false] |
| verified | bool | Only verified purchases | [optional] [default to false] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokTiktokShopRootCategories($region): mixedTikTok Shop root categories
Top-level TikTok Shop categories of a market. Drill down with /shop/categories/{id}.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$region = 'US'; // string | Market: US, GB, ID
try {
$result = $apiInstance->tiktokTiktokShopRootCategories($region);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokTiktokShopRootCategories: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| region | string | Market: US, GB, ID | [optional] [default to 'US'] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokTiktokShopStoreProducts($seller_id, $region, $cursor, $count): mixedTikTok Shop store + products
A store's stats and its cursor-paginated product catalogue (US).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$seller_id = 'seller_id_example'; // string
$region = 'US'; // string | Market: US, GB, ID
$cursor = ''; // string | Pass back next_cursor for the next page
$count = 20; // int
try {
$result = $apiInstance->tiktokTiktokShopStoreProducts($seller_id, $region, $cursor, $count);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokTiktokShopStoreProducts: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| seller_id | string | ||
| region | string | Market: US, GB, ID | [optional] [default to 'US'] |
| cursor | string | Pass back next_cursor for the next page | [optional] [default to ''] |
| count | int | [optional] [default to 20] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokTrendingHashtags($region, $period, $count): mixedTrending hashtags
Get trending hashtags (mobile Discover surface — view_count + creators).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$region = 'US'; // string
$period = 7; // int
$count = 20; // int
try {
$result = $apiInstance->tiktokTrendingHashtags($region, $period, $count);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokTrendingHashtags: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| region | string | [optional] [default to 'US'] | |
| period | int | [optional] [default to 7] | |
| count | int | [optional] [default to 20] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokTrendingSongs($region, $period, $count): mixedTrending songs
Get trending songs/sounds (mobile hot-music feed — ranked by usage).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$region = 'US'; // string
$period = 7; // int
$count = 20; // int
try {
$result = $apiInstance->tiktokTrendingSongs($region, $period, $count);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokTrendingSongs: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| region | string | [optional] [default to 'US'] | |
| period | int | [optional] [default to 7] | |
| count | int | [optional] [default to 20] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
tiktokTrendingVideos($region, $count): mixedTrending videos
Get trending videos from the TikTok Explore feed.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\TikTokApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$region = 'US'; // string
$count = 20; // int
try {
$result = $apiInstance->tiktokTrendingVideos($region, $count);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TikTokApi->tiktokTrendingVideos: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| region | string | [optional] [default to 'US'] | |
| count | int | [optional] [default to 20] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]