Skip to content

Latest commit

 

History

History
2351 lines (1648 loc) · 69.5 KB

File metadata and controls

2351 lines (1648 loc) · 69.5 KB

ScrapeBadger\TikTokApi

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()

tiktokGeneralSearch($query, $region, $count, $cursor): mixed

General search

General TikTok search — video results from the Top feed.

Example

<?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;
}

Parameters

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]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokGetCommentReplies()

tiktokGetCommentReplies($comment_id, $video_id, $region, $count, $cursor): mixed

Get comment replies

Get replies to a TikTok comment (best-effort).

Example

<?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;
}

Parameters

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]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokGetComments()

tiktokGetComments($video_id, $region, $count, $cursor): mixed

Get comments

Get top-level comments on a TikTok video.

Example

<?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;
}

Parameters

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]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokGetFollowersDeprecated()

tiktokGetFollowersDeprecated($username, $region, $count): mixed

Get followers (deprecated)

DEPRECATED — TikTok followers require an authenticated account session. Returns HTTP 410.

Example

<?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;
}

Parameters

Name Type Description Notes
username string
region string [optional] [default to 'US']
count int [optional] [default to 30]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokGetFollowingDeprecated()

tiktokGetFollowingDeprecated($username, $region, $count): mixed

Get following (deprecated)

DEPRECATED — TikTok following requires an authenticated account session. Returns HTTP 410.

Example

<?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;
}

Parameters

Name Type Description Notes
username string
region string [optional] [default to 'US']
count int [optional] [default to 30]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokGetHashtagDetail()

tiktokGetHashtagDetail($name, $region): mixed

Get hashtag detail

Get TikTok hashtag/challenge detail.

Example

<?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;
}

Parameters

Name Type Description Notes
name string
region string [optional] [default to 'US']

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokGetHashtagVideos()

tiktokGetHashtagVideos($name, $region, $count, $cursor): mixed

Get hashtag videos

Get videos tagged with a TikTok hashtag.

Example

<?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;
}

Parameters

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]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokGetLikedVideosDeprecated()

tiktokGetLikedVideosDeprecated($username, $region, $count): mixed

Get liked videos (deprecated)

DEPRECATED — TikTok liked videos require an authenticated account session. Returns HTTP 410.

Example

<?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;
}

Parameters

Name Type Description Notes
username string
region string [optional] [default to 'US']
count int [optional] [default to 30]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokGetMusicSoundDetail()

tiktokGetMusicSoundDetail($music_id, $region): mixed

Get music/sound detail

Get TikTok sound/music detail.

Example

<?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;
}

Parameters

Name Type Description Notes
music_id string
region string [optional] [default to 'US']

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokGetMusicVideos()

tiktokGetMusicVideos($music_id, $region, $count, $cursor): mixed

Get music videos

Get videos using a given TikTok sound.

Example

<?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;
}

Parameters

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]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokGetOembedMetadata()

tiktokGetOembedMetadata($url, $region): mixed

Get oEmbed metadata

Get cheap unauthenticated oEmbed metadata for a TikTok URL.

Example

<?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;
}

Parameters

Name Type Description Notes
url string Full TikTok video or profile URL
region string [optional] [default to 'US']

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokGetRelatedVideos()

tiktokGetRelatedVideos($video_id, $region, $count): mixed

Get related videos

Get TikTok's related videos for a given video.

Example

<?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;
}

Parameters

Name Type Description Notes
video_id string
region string [optional] [default to 'US']
count int [optional] [default to 16]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokGetReposts()

tiktokGetReposts($username, $region, $count): mixed

Get reposts

Get videos a TikTok user has reposted.

Example

<?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;
}

Parameters

Name Type Description Notes
username string
region string [optional] [default to 'US']
count int [optional] [default to 30]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokGetTiktokAdDetail()

tiktokGetTiktokAdDetail($ad_id, $region): mixed

Get TikTok ad detail

Get a single ad's advertiser, creatives, and targeting/impression breakdown.

Example

<?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;
}

Parameters

Name Type Description Notes
ad_id string
region string EU region code (the Ad Library is EU-only) [optional] [default to 'DE']

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokGetTranscript()

tiktokGetTranscript($video_id, $region): mixed

Get transcript

Get subtitle/caption tracks for a TikTok video.

Example

<?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;
}

Parameters

Name Type Description Notes
video_id string
region string [optional] [default to 'US']

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokGetUserProfile()

tiktokGetUserProfile($username, $region): mixed

Get user profile

Get a TikTok user's full profile.

Example

<?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;
}

Parameters

Name Type Description Notes
username string
region string Content region (ISO 3166-1 alpha-2) [optional] [default to 'US']

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokGetUserVideos()

tiktokGetUserVideos($username, $region, $count, $cursor): mixed

Get user videos

Get a TikTok user's posted videos.

Example

<?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;
}

Parameters

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]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokGetVideoDetail()

tiktokGetVideoDetail($video_id, $region, $username): mixed

Get video detail

Get full metadata for a single TikTok video/post.

Example

<?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;
}

Parameters

Name Type Description Notes
video_id string
region string [optional] [default to 'US']
username string Author handle (skips oEmbed lookup) [optional]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokHealthCheck()

tiktokHealthCheck(): mixed

Health check

Check health of the TikTok scraper service.

Example

<?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;
}

Parameters

This endpoint does not need any parameter.

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokHealthCheckHead()

tiktokHealthCheckHead(): mixed

Health check

Check health of the TikTok scraper service.

Example

<?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;
}

Parameters

This endpoint does not need any parameter.

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokListRegions()

tiktokListRegions(): mixed

List regions

List supported TikTok content regions.

Example

<?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;
}

Parameters

This endpoint does not need any parameter.

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokSearchHashtags()

tiktokSearchHashtags($query, $region, $count, $cursor): mixed

Search hashtags

Search TikTok hashtags by keyword.

Example

<?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;
}

Parameters

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]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokSearchTheTiktokAdLibrary()

tiktokSearchTheTiktokAdLibrary($query, $advertiser_id, $region, $days, $sort, $offset, $search_id, $count): mixed

Search the TikTok Ad Library

Search TikTok's Commercial Content Library (ad transparency) by keyword or advertiser.

Example

<?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;
}

Parameters

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]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokSearchTiktokAdvertisers()

tiktokSearchTiktokAdvertisers($query, $region, $count): mixed

Search TikTok advertisers

Look up TikTok advertiser business ids by name (feeds ads/search?advertiser_id=).

Example

<?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;
}

Parameters

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]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokSearchTiktokShopProducts()

tiktokSearchTiktokShopProducts($q, $region, $offset): mixed

Search 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.

Example

<?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;
}

Parameters

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]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokSearchUsers()

tiktokSearchUsers($query, $region, $count, $cursor): mixed

Search users

Search TikTok users by keyword.

Example

<?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;
}

Parameters

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]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokSearchVideos()

tiktokSearchVideos($query, $region, $count, $cursor): mixed

Search videos

Search TikTok videos by keyword.

Example

<?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;
}

Parameters

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]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokTiktokShopCategorySubcategoriesTopProducts()

tiktokTiktokShopCategorySubcategoriesTopProducts($category_id, $region): mixed

TikTok Shop category: subcategories + top products

A category's subcategories and its top products as TikTok Shop ranks them.

Example

<?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;
}

Parameters

Name Type Description Notes
category_id string
region string Market: US, GB, ID [optional] [default to 'US']

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokTiktokShopProductDetail()

tiktokTiktokShopProductDetail($product_id, $region): mixed

TikTok Shop product detail

Full TikTok Shop product page: description, images, price, SKUs with stock, first reviews, shop and TikTok's AI summary.

Example

<?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;
}

Parameters

Name Type Description Notes
product_id string
region string Market: US, GB, ID [optional] [default to 'US']

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokTiktokShopProductReviews()

tiktokTiktokShopProductReviews($product_id, $region, $page, $count, $sort, $rating, $with_media, $verified): mixed

TikTok Shop product reviews

Paginated product reviews with the rating breakdown (US).

Example

<?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;
}

Parameters

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]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokTiktokShopRootCategories()

tiktokTiktokShopRootCategories($region): mixed

TikTok Shop root categories

Top-level TikTok Shop categories of a market. Drill down with /shop/categories/{id}.

Example

<?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;
}

Parameters

Name Type Description Notes
region string Market: US, GB, ID [optional] [default to 'US']

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokTiktokShopStoreProducts()

tiktokTiktokShopStoreProducts($seller_id, $region, $cursor, $count): mixed

TikTok Shop store + products

A store's stats and its cursor-paginated product catalogue (US).

Example

<?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;
}

Parameters

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]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokTrendingHashtags()

tiktokTrendingHashtags($region, $period, $count): mixed

Trending hashtags

Get trending hashtags (mobile Discover surface — view_count + creators).

Example

<?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;
}

Parameters

Name Type Description Notes
region string [optional] [default to 'US']
period int [optional] [default to 7]
count int [optional] [default to 20]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokTrendingSongs()

tiktokTrendingSongs($region, $period, $count): mixed

Trending songs

Get trending songs/sounds (mobile hot-music feed — ranked by usage).

Example

<?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;
}

Parameters

Name Type Description Notes
region string [optional] [default to 'US']
period int [optional] [default to 7]
count int [optional] [default to 20]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokTrendingVideos()

tiktokTrendingVideos($region, $count): mixed

Trending videos

Get trending videos from the TikTok Explore feed.

Example

<?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;
}

Parameters

Name Type Description Notes
region string [optional] [default to 'US']
count int [optional] [default to 20]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]