All URIs are relative to https://scrapebadger.com
| Method | HTTP request | Description |
|---|---|---|
| tiktok_general_search | GET /v1/tiktok/search | General search |
| tiktok_get_comment_replies | GET /v1/tiktok/comments/{comment_id}/replies | Get comment replies |
| tiktok_get_comments | GET /v1/tiktok/videos/{video_id}/comments | Get comments |
| tiktok_get_followers_deprecated | GET /v1/tiktok/users/{username}/followers | Get followers (deprecated) |
| tiktok_get_following_deprecated | GET /v1/tiktok/users/{username}/following | Get following (deprecated) |
| tiktok_get_hashtag_detail | GET /v1/tiktok/hashtags/{name} | Get hashtag detail |
| tiktok_get_hashtag_videos | GET /v1/tiktok/hashtags/{name}/videos | Get hashtag videos |
| tiktok_get_liked_videos_deprecated | GET /v1/tiktok/users/{username}/liked | Get liked videos (deprecated) |
| tiktok_get_music_sound_detail | GET /v1/tiktok/music/{music_id} | Get music/sound detail |
| tiktok_get_music_videos | GET /v1/tiktok/music/{music_id}/videos | Get music videos |
| tiktok_get_oembed_metadata | GET /v1/tiktok/oembed | Get oEmbed metadata |
| tiktok_get_related_videos | GET /v1/tiktok/videos/{video_id}/related | Get related videos |
| tiktok_get_reposts | GET /v1/tiktok/users/{username}/reposts | Get reposts |
| tiktok_get_tiktok_ad_detail | GET /v1/tiktok/ads/{ad_id} | Get TikTok ad detail |
| tiktok_get_transcript | GET /v1/tiktok/videos/{video_id}/transcript | Get transcript |
| tiktok_get_user_profile | GET /v1/tiktok/users/{username} | Get user profile |
| tiktok_get_user_videos | GET /v1/tiktok/users/{username}/videos | Get user videos |
| tiktok_get_video_detail | GET /v1/tiktok/videos/{video_id} | Get video detail |
| tiktok_health_check | GET /v1/tiktok/health | Health check |
| tiktok_health_check_head | HEAD /v1/tiktok/health | Health check |
| tiktok_list_regions | GET /v1/tiktok/regions | List regions |
| tiktok_search_hashtags | GET /v1/tiktok/search/hashtags | Search hashtags |
| tiktok_search_the_tiktok_ad_library | GET /v1/tiktok/ads/search | Search the TikTok Ad Library |
| tiktok_search_tiktok_advertisers | GET /v1/tiktok/ads/advertisers | Search TikTok advertisers |
| tiktok_search_tiktok_shop_products | GET /v1/tiktok/shop/search | Search TikTok Shop products |
| tiktok_search_users | GET /v1/tiktok/search/users | Search users |
| tiktok_search_videos | GET /v1/tiktok/search/videos | Search videos |
| tiktok_tiktok_shop_category_subcategories_top_products | GET /v1/tiktok/shop/categories/{category_id} | TikTok Shop category: subcategories + top products |
| tiktok_tiktok_shop_product_detail | GET /v1/tiktok/shop/products/{product_id} | TikTok Shop product detail |
| tiktok_tiktok_shop_product_reviews | GET /v1/tiktok/shop/products/{product_id}/reviews | TikTok Shop product reviews |
| tiktok_tiktok_shop_root_categories | GET /v1/tiktok/shop/categories | TikTok Shop root categories |
| tiktok_tiktok_shop_store_products | GET /v1/tiktok/shop/stores/{seller_id} | TikTok Shop store + products |
| tiktok_trending_hashtags | GET /v1/tiktok/trending/hashtags | Trending hashtags |
| tiktok_trending_songs | GET /v1/tiktok/trending/songs | Trending songs |
| tiktok_trending_videos | GET /v1/tiktok/trending/videos | Trending videos |
Object tiktok_general_search(query, opts)
General search
General TikTok search — video results from the Top feed.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
query = 'query_example' # String | Search keyword
opts = {
region: 'region_example', # String |
count: 56, # Integer |
cursor: 'cursor_example' # String | Composite pagination cursor (offset.search_id) from a prior page's pagination.cursor
}
begin
# General search
result = api_instance.tiktok_general_search(query, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_general_search: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_general_search_with_http_info(query, opts)
begin
# General search
data, status_code, headers = api_instance.tiktok_general_search_with_http_info(query, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_general_search_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| query | String | Search keyword | |
| region | String | [optional][default to 'US'] | |
| count | Integer | [optional][default to 20] | |
| cursor | String | Composite pagination cursor (offset.search_id) from a prior page's pagination.cursor | [optional] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_get_comment_replies(comment_id, video_id, opts)
Get comment replies
Get replies to a TikTok comment (best-effort).
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
comment_id = 'comment_id_example' # String |
video_id = 'video_id_example' # String | Parent video id
opts = {
region: 'region_example', # String |
count: 56, # Integer |
cursor: 'cursor_example' # String | Pagination cursor from a prior page's pagination.cursor
}
begin
# Get comment replies
result = api_instance.tiktok_get_comment_replies(comment_id, video_id, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_comment_replies: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_get_comment_replies_with_http_info(comment_id, video_id, opts)
begin
# Get comment replies
data, status_code, headers = api_instance.tiktok_get_comment_replies_with_http_info(comment_id, video_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_comment_replies_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| comment_id | String | ||
| video_id | String | Parent video id | |
| region | String | [optional][default to 'US'] | |
| count | Integer | [optional][default to 20] | |
| cursor | String | Pagination cursor from a prior page's pagination.cursor | [optional] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_get_comments(video_id, opts)
Get comments
Get top-level comments on a TikTok video.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
video_id = 'video_id_example' # String |
opts = {
region: 'region_example', # String |
count: 56, # Integer |
cursor: 'cursor_example' # String | Pagination cursor from a prior page's pagination.cursor
}
begin
# Get comments
result = api_instance.tiktok_get_comments(video_id, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_comments: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_get_comments_with_http_info(video_id, opts)
begin
# Get comments
data, status_code, headers = api_instance.tiktok_get_comments_with_http_info(video_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_comments_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | String | ||
| region | String | [optional][default to 'US'] | |
| count | Integer | [optional][default to 20] | |
| cursor | String | Pagination cursor from a prior page's pagination.cursor | [optional] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_get_followers_deprecated(username, opts)
Get followers (deprecated)
DEPRECATED — TikTok followers require an authenticated account session. Returns HTTP 410.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
username = 'username_example' # String |
opts = {
region: 'region_example', # String |
count: 56 # Integer |
}
begin
# Get followers (deprecated)
result = api_instance.tiktok_get_followers_deprecated(username, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_followers_deprecated: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_get_followers_deprecated_with_http_info(username, opts)
begin
# Get followers (deprecated)
data, status_code, headers = api_instance.tiktok_get_followers_deprecated_with_http_info(username, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_followers_deprecated_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | ||
| region | String | [optional][default to 'US'] | |
| count | Integer | [optional][default to 30] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_get_following_deprecated(username, opts)
Get following (deprecated)
DEPRECATED — TikTok following requires an authenticated account session. Returns HTTP 410.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
username = 'username_example' # String |
opts = {
region: 'region_example', # String |
count: 56 # Integer |
}
begin
# Get following (deprecated)
result = api_instance.tiktok_get_following_deprecated(username, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_following_deprecated: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_get_following_deprecated_with_http_info(username, opts)
begin
# Get following (deprecated)
data, status_code, headers = api_instance.tiktok_get_following_deprecated_with_http_info(username, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_following_deprecated_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | ||
| region | String | [optional][default to 'US'] | |
| count | Integer | [optional][default to 30] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_get_hashtag_detail(name, opts)
Get hashtag detail
Get TikTok hashtag/challenge detail.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
name = 'name_example' # String |
opts = {
region: 'region_example' # String |
}
begin
# Get hashtag detail
result = api_instance.tiktok_get_hashtag_detail(name, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_hashtag_detail: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_get_hashtag_detail_with_http_info(name, opts)
begin
# Get hashtag detail
data, status_code, headers = api_instance.tiktok_get_hashtag_detail_with_http_info(name, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_hashtag_detail_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| name | String | ||
| region | String | [optional][default to 'US'] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_get_hashtag_videos(name, opts)
Get hashtag videos
Get videos tagged with a TikTok hashtag.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
name = 'name_example' # String |
opts = {
region: 'region_example', # String |
count: 56, # Integer |
cursor: 'cursor_example' # String | Pagination cursor from a prior page's pagination.cursor
}
begin
# Get hashtag videos
result = api_instance.tiktok_get_hashtag_videos(name, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_hashtag_videos: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_get_hashtag_videos_with_http_info(name, opts)
begin
# Get hashtag videos
data, status_code, headers = api_instance.tiktok_get_hashtag_videos_with_http_info(name, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_hashtag_videos_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| name | String | ||
| region | String | [optional][default to 'US'] | |
| count | Integer | [optional][default to 30] | |
| cursor | String | Pagination cursor from a prior page's pagination.cursor | [optional] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_get_liked_videos_deprecated(username, opts)
Get liked videos (deprecated)
DEPRECATED — TikTok liked videos require an authenticated account session. Returns HTTP 410.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
username = 'username_example' # String |
opts = {
region: 'region_example', # String |
count: 56 # Integer |
}
begin
# Get liked videos (deprecated)
result = api_instance.tiktok_get_liked_videos_deprecated(username, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_liked_videos_deprecated: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_get_liked_videos_deprecated_with_http_info(username, opts)
begin
# Get liked videos (deprecated)
data, status_code, headers = api_instance.tiktok_get_liked_videos_deprecated_with_http_info(username, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_liked_videos_deprecated_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | ||
| region | String | [optional][default to 'US'] | |
| count | Integer | [optional][default to 30] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_get_music_sound_detail(music_id, opts)
Get music/sound detail
Get TikTok sound/music detail.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
music_id = 'music_id_example' # String |
opts = {
region: 'region_example' # String |
}
begin
# Get music/sound detail
result = api_instance.tiktok_get_music_sound_detail(music_id, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_music_sound_detail: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_get_music_sound_detail_with_http_info(music_id, opts)
begin
# Get music/sound detail
data, status_code, headers = api_instance.tiktok_get_music_sound_detail_with_http_info(music_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_music_sound_detail_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| music_id | String | ||
| region | String | [optional][default to 'US'] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_get_music_videos(music_id, opts)
Get music videos
Get videos using a given TikTok sound.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
music_id = 'music_id_example' # String |
opts = {
region: 'region_example', # String |
count: 56, # Integer |
cursor: 'cursor_example' # String | Pagination cursor from a prior page's pagination.cursor
}
begin
# Get music videos
result = api_instance.tiktok_get_music_videos(music_id, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_music_videos: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_get_music_videos_with_http_info(music_id, opts)
begin
# Get music videos
data, status_code, headers = api_instance.tiktok_get_music_videos_with_http_info(music_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_music_videos_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| music_id | String | ||
| region | String | [optional][default to 'US'] | |
| count | Integer | [optional][default to 30] | |
| cursor | String | Pagination cursor from a prior page's pagination.cursor | [optional] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_get_oembed_metadata(url, opts)
Get oEmbed metadata
Get cheap unauthenticated oEmbed metadata for a TikTok URL.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
url = 'url_example' # String | Full TikTok video or profile URL
opts = {
region: 'region_example' # String |
}
begin
# Get oEmbed metadata
result = api_instance.tiktok_get_oembed_metadata(url, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_oembed_metadata: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_get_oembed_metadata_with_http_info(url, opts)
begin
# Get oEmbed metadata
data, status_code, headers = api_instance.tiktok_get_oembed_metadata_with_http_info(url, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_oembed_metadata_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| url | String | Full TikTok video or profile URL | |
| region | String | [optional][default to 'US'] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_get_related_videos(video_id, opts)
Get related videos
Get TikTok's related videos for a given video.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
video_id = 'video_id_example' # String |
opts = {
region: 'region_example', # String |
count: 56 # Integer |
}
begin
# Get related videos
result = api_instance.tiktok_get_related_videos(video_id, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_related_videos: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_get_related_videos_with_http_info(video_id, opts)
begin
# Get related videos
data, status_code, headers = api_instance.tiktok_get_related_videos_with_http_info(video_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_related_videos_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | String | ||
| region | String | [optional][default to 'US'] | |
| count | Integer | [optional][default to 16] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_get_reposts(username, opts)
Get reposts
Get videos a TikTok user has reposted.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
username = 'username_example' # String |
opts = {
region: 'region_example', # String |
count: 56 # Integer |
}
begin
# Get reposts
result = api_instance.tiktok_get_reposts(username, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_reposts: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_get_reposts_with_http_info(username, opts)
begin
# Get reposts
data, status_code, headers = api_instance.tiktok_get_reposts_with_http_info(username, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_reposts_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | ||
| region | String | [optional][default to 'US'] | |
| count | Integer | [optional][default to 30] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_get_tiktok_ad_detail(ad_id, opts)
Get TikTok ad detail
Get a single ad's advertiser, creatives, and targeting/impression breakdown.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
ad_id = 'ad_id_example' # String |
opts = {
region: 'region_example' # String | EU region code (the Ad Library is EU-only)
}
begin
# Get TikTok ad detail
result = api_instance.tiktok_get_tiktok_ad_detail(ad_id, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_tiktok_ad_detail: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_get_tiktok_ad_detail_with_http_info(ad_id, opts)
begin
# Get TikTok ad detail
data, status_code, headers = api_instance.tiktok_get_tiktok_ad_detail_with_http_info(ad_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_tiktok_ad_detail_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| ad_id | String | ||
| region | String | EU region code (the Ad Library is EU-only) | [optional][default to 'DE'] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_get_transcript(video_id, opts)
Get transcript
Get subtitle/caption tracks for a TikTok video.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
video_id = 'video_id_example' # String |
opts = {
region: 'region_example' # String |
}
begin
# Get transcript
result = api_instance.tiktok_get_transcript(video_id, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_transcript: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_get_transcript_with_http_info(video_id, opts)
begin
# Get transcript
data, status_code, headers = api_instance.tiktok_get_transcript_with_http_info(video_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_transcript_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | String | ||
| region | String | [optional][default to 'US'] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_get_user_profile(username, opts)
Get user profile
Get a TikTok user's full profile.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
username = 'username_example' # String |
opts = {
region: 'region_example' # String | Content region (ISO 3166-1 alpha-2)
}
begin
# Get user profile
result = api_instance.tiktok_get_user_profile(username, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_user_profile: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_get_user_profile_with_http_info(username, opts)
begin
# Get user profile
data, status_code, headers = api_instance.tiktok_get_user_profile_with_http_info(username, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_user_profile_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | ||
| region | String | Content region (ISO 3166-1 alpha-2) | [optional][default to 'US'] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_get_user_videos(username, opts)
Get user videos
Get a TikTok user's posted videos.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
username = 'username_example' # String |
opts = {
region: 'region_example', # String |
count: 56, # Integer |
cursor: 'cursor_example' # String | Pagination cursor from a prior page's `pagination.cursor` (signer path only).
}
begin
# Get user videos
result = api_instance.tiktok_get_user_videos(username, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_user_videos: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_get_user_videos_with_http_info(username, opts)
begin
# Get user videos
data, status_code, headers = api_instance.tiktok_get_user_videos_with_http_info(username, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_user_videos_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | ||
| region | String | [optional][default to 'US'] | |
| count | Integer | [optional][default to 30] | |
| cursor | String | Pagination cursor from a prior page's `pagination.cursor` (signer path only). | [optional] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_get_video_detail(video_id, opts)
Get video detail
Get full metadata for a single TikTok video/post.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
video_id = 'video_id_example' # String |
opts = {
region: 'region_example', # String |
username: 'username_example' # String | Author handle (skips oEmbed lookup)
}
begin
# Get video detail
result = api_instance.tiktok_get_video_detail(video_id, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_video_detail: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_get_video_detail_with_http_info(video_id, opts)
begin
# Get video detail
data, status_code, headers = api_instance.tiktok_get_video_detail_with_http_info(video_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_get_video_detail_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | String | ||
| region | String | [optional][default to 'US'] | |
| username | String | Author handle (skips oEmbed lookup) | [optional] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_health_check
Health check
Check health of the TikTok scraper service.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
begin
# Health check
result = api_instance.tiktok_health_check
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_health_check: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_health_check_with_http_info
begin
# Health check
data, status_code, headers = api_instance.tiktok_health_check_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_health_check_with_http_info: #{e}"
endThis endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_health_check_head
Health check
Check health of the TikTok scraper service.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
begin
# Health check
result = api_instance.tiktok_health_check_head
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_health_check_head: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_health_check_head_with_http_info
begin
# Health check
data, status_code, headers = api_instance.tiktok_health_check_head_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_health_check_head_with_http_info: #{e}"
endThis endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_list_regions
List regions
List supported TikTok content regions.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
begin
# List regions
result = api_instance.tiktok_list_regions
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_list_regions: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_list_regions_with_http_info
begin
# List regions
data, status_code, headers = api_instance.tiktok_list_regions_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_list_regions_with_http_info: #{e}"
endThis endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_search_hashtags(query, opts)
Search hashtags
Search TikTok hashtags by keyword.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
query = 'query_example' # String | Search keyword
opts = {
region: 'region_example', # String |
count: 56, # Integer |
cursor: 'cursor_example' # String | Composite pagination cursor (offset.search_id) from a prior page's pagination.cursor
}
begin
# Search hashtags
result = api_instance.tiktok_search_hashtags(query, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_search_hashtags: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_search_hashtags_with_http_info(query, opts)
begin
# Search hashtags
data, status_code, headers = api_instance.tiktok_search_hashtags_with_http_info(query, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_search_hashtags_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| query | String | Search keyword | |
| region | String | [optional][default to 'US'] | |
| count | Integer | [optional][default to 20] | |
| cursor | String | Composite pagination cursor (offset.search_id) from a prior page's pagination.cursor | [optional] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_search_the_tiktok_ad_library(opts)
Search the TikTok Ad Library
Search TikTok's Commercial Content Library (ad transparency) by keyword or advertiser.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
opts = {
query: 'query_example', # String | Keyword (ignored when advertiser_id is set)
advertiser_id: 'advertiser_id_example', # String | Advertiser business id(s) for advertiser search
region: 'region_example', # String | EU region code (the Ad Library is EU-only)
days: 56, # Integer |
sort: 'sort_example', # String |
offset: 56, # Integer |
search_id: 'search_id_example', # String |
count: 56 # Integer |
}
begin
# Search the TikTok Ad Library
result = api_instance.tiktok_search_the_tiktok_ad_library(opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_search_the_tiktok_ad_library: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_search_the_tiktok_ad_library_with_http_info(opts)
begin
# Search the TikTok Ad Library
data, status_code, headers = api_instance.tiktok_search_the_tiktok_ad_library_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_search_the_tiktok_ad_library_with_http_info: #{e}"
end| 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 | Integer | [optional][default to 30] | |
| sort | String | [optional][default to 'last_shown_date,desc'] | |
| offset | Integer | [optional][default to 0] | |
| search_id | String | [optional][default to ''] | |
| count | Integer | [optional][default to 20] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_search_tiktok_advertisers(query, opts)
Search TikTok advertisers
Look up TikTok advertiser business ids by name (feeds ads/search?advertiser_id=).
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
query = 'query_example' # String | Advertiser name (or partial) to look up
opts = {
region: 'region_example', # String | EU region code (the Ad Library is EU-only)
count: 56 # Integer |
}
begin
# Search TikTok advertisers
result = api_instance.tiktok_search_tiktok_advertisers(query, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_search_tiktok_advertisers: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_search_tiktok_advertisers_with_http_info(query, opts)
begin
# Search TikTok advertisers
data, status_code, headers = api_instance.tiktok_search_tiktok_advertisers_with_http_info(query, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_search_tiktok_advertisers_with_http_info: #{e}"
end| 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 | Integer | [optional][default to 10] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_search_tiktok_shop_products(q, opts)
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.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
q = 'q_example' # String | Keyword, e.g. 'wireless earbuds'
opts = {
region: 'region_example', # String | Market: US, GB, ID
offset: 56 # Integer | Pass back next_offset for the next page (US)
}
begin
# Search TikTok Shop products
result = api_instance.tiktok_search_tiktok_shop_products(q, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_search_tiktok_shop_products: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_search_tiktok_shop_products_with_http_info(q, opts)
begin
# Search TikTok Shop products
data, status_code, headers = api_instance.tiktok_search_tiktok_shop_products_with_http_info(q, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_search_tiktok_shop_products_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| q | String | Keyword, e.g. 'wireless earbuds' | |
| region | String | Market: US, GB, ID | [optional][default to 'US'] |
| offset | Integer | Pass back next_offset for the next page (US) | [optional][default to 0] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_search_users(query, opts)
Search users
Search TikTok users by keyword.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
query = 'query_example' # String | Search keyword
opts = {
region: 'region_example', # String |
count: 56, # Integer |
cursor: 'cursor_example' # String | Composite pagination cursor (offset.search_id) from a prior page's pagination.cursor
}
begin
# Search users
result = api_instance.tiktok_search_users(query, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_search_users: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_search_users_with_http_info(query, opts)
begin
# Search users
data, status_code, headers = api_instance.tiktok_search_users_with_http_info(query, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_search_users_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| query | String | Search keyword | |
| region | String | [optional][default to 'US'] | |
| count | Integer | [optional][default to 20] | |
| cursor | String | Composite pagination cursor (offset.search_id) from a prior page's pagination.cursor | [optional] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_search_videos(query, opts)
Search videos
Search TikTok videos by keyword.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
query = 'query_example' # String | Search keyword
opts = {
region: 'region_example', # String |
count: 56, # Integer |
cursor: 'cursor_example' # String | Composite pagination cursor (offset.search_id) from a prior page's pagination.cursor
}
begin
# Search videos
result = api_instance.tiktok_search_videos(query, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_search_videos: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_search_videos_with_http_info(query, opts)
begin
# Search videos
data, status_code, headers = api_instance.tiktok_search_videos_with_http_info(query, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_search_videos_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| query | String | Search keyword | |
| region | String | [optional][default to 'US'] | |
| count | Integer | [optional][default to 20] | |
| cursor | String | Composite pagination cursor (offset.search_id) from a prior page's pagination.cursor | [optional] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_tiktok_shop_category_subcategories_top_products(category_id, opts)
TikTok Shop category: subcategories + top products
A category's subcategories and its top products as TikTok Shop ranks them.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
category_id = 'category_id_example' # String |
opts = {
region: 'region_example' # String | Market: US, GB, ID
}
begin
# TikTok Shop category: subcategories + top products
result = api_instance.tiktok_tiktok_shop_category_subcategories_top_products(category_id, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_tiktok_shop_category_subcategories_top_products: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_tiktok_shop_category_subcategories_top_products_with_http_info(category_id, opts)
begin
# TikTok Shop category: subcategories + top products
data, status_code, headers = api_instance.tiktok_tiktok_shop_category_subcategories_top_products_with_http_info(category_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_tiktok_shop_category_subcategories_top_products_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| category_id | String | ||
| region | String | Market: US, GB, ID | [optional][default to 'US'] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_tiktok_shop_product_detail(product_id, opts)
TikTok Shop product detail
Full TikTok Shop product page: description, images, price, SKUs with stock, first reviews, shop and TikTok's AI summary.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
product_id = 'product_id_example' # String |
opts = {
region: 'region_example' # String | Market: US, GB, ID
}
begin
# TikTok Shop product detail
result = api_instance.tiktok_tiktok_shop_product_detail(product_id, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_tiktok_shop_product_detail: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_tiktok_shop_product_detail_with_http_info(product_id, opts)
begin
# TikTok Shop product detail
data, status_code, headers = api_instance.tiktok_tiktok_shop_product_detail_with_http_info(product_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_tiktok_shop_product_detail_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| product_id | String | ||
| region | String | Market: US, GB, ID | [optional][default to 'US'] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_tiktok_shop_product_reviews(product_id, opts)
TikTok Shop product reviews
Paginated product reviews with the rating breakdown (US).
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
product_id = 'product_id_example' # String |
opts = {
region: 'region_example', # String | Market: US, GB, ID
page: 56, # Integer |
count: 56, # Integer |
sort: 'sort_example', # String | recommended | recent
rating: 56, # Integer | Only this star rating
with_media: true, # Boolean | Only reviews with photos/videos
verified: true # Boolean | Only verified purchases
}
begin
# TikTok Shop product reviews
result = api_instance.tiktok_tiktok_shop_product_reviews(product_id, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_tiktok_shop_product_reviews: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_tiktok_shop_product_reviews_with_http_info(product_id, opts)
begin
# TikTok Shop product reviews
data, status_code, headers = api_instance.tiktok_tiktok_shop_product_reviews_with_http_info(product_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_tiktok_shop_product_reviews_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| product_id | String | ||
| region | String | Market: US, GB, ID | [optional][default to 'US'] |
| page | Integer | [optional][default to 1] | |
| count | Integer | [optional][default to 20] | |
| sort | String | recommended | recent |
| rating | Integer | Only this star rating | [optional] |
| with_media | Boolean | Only reviews with photos/videos | [optional][default to false] |
| verified | Boolean | Only verified purchases | [optional][default to false] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_tiktok_shop_root_categories(opts)
TikTok Shop root categories
Top-level TikTok Shop categories of a market. Drill down with /shop/categories/{id}.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
opts = {
region: 'region_example' # String | Market: US, GB, ID
}
begin
# TikTok Shop root categories
result = api_instance.tiktok_tiktok_shop_root_categories(opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_tiktok_shop_root_categories: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_tiktok_shop_root_categories_with_http_info(opts)
begin
# TikTok Shop root categories
data, status_code, headers = api_instance.tiktok_tiktok_shop_root_categories_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_tiktok_shop_root_categories_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| region | String | Market: US, GB, ID | [optional][default to 'US'] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_tiktok_shop_store_products(seller_id, opts)
TikTok Shop store + products
A store's stats and its cursor-paginated product catalogue (US).
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
seller_id = 'seller_id_example' # String |
opts = {
region: 'region_example', # String | Market: US, GB, ID
cursor: 'cursor_example', # String | Pass back next_cursor for the next page
count: 56 # Integer |
}
begin
# TikTok Shop store + products
result = api_instance.tiktok_tiktok_shop_store_products(seller_id, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_tiktok_shop_store_products: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_tiktok_shop_store_products_with_http_info(seller_id, opts)
begin
# TikTok Shop store + products
data, status_code, headers = api_instance.tiktok_tiktok_shop_store_products_with_http_info(seller_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_tiktok_shop_store_products_with_http_info: #{e}"
end| 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 | Integer | [optional][default to 20] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_trending_hashtags(opts)
Trending hashtags
Get trending hashtags (mobile Discover surface — view_count + creators).
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
opts = {
region: 'region_example', # String |
period: 56, # Integer |
count: 56 # Integer |
}
begin
# Trending hashtags
result = api_instance.tiktok_trending_hashtags(opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_trending_hashtags: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_trending_hashtags_with_http_info(opts)
begin
# Trending hashtags
data, status_code, headers = api_instance.tiktok_trending_hashtags_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_trending_hashtags_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| region | String | [optional][default to 'US'] | |
| period | Integer | [optional][default to 7] | |
| count | Integer | [optional][default to 20] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_trending_songs(opts)
Trending songs
Get trending songs/sounds (mobile hot-music feed — ranked by usage).
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
opts = {
region: 'region_example', # String |
period: 56, # Integer |
count: 56 # Integer |
}
begin
# Trending songs
result = api_instance.tiktok_trending_songs(opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_trending_songs: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_trending_songs_with_http_info(opts)
begin
# Trending songs
data, status_code, headers = api_instance.tiktok_trending_songs_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_trending_songs_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| region | String | [optional][default to 'US'] | |
| period | Integer | [optional][default to 7] | |
| count | Integer | [optional][default to 20] |
Object
- Content-Type: Not defined
- Accept: application/json
Object tiktok_trending_videos(opts)
Trending videos
Get trending videos from the TikTok Explore feed.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::TikTokApi.new
opts = {
region: 'region_example', # String |
count: 56 # Integer |
}
begin
# Trending videos
result = api_instance.tiktok_trending_videos(opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_trending_videos: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> tiktok_trending_videos_with_http_info(opts)
begin
# Trending videos
data, status_code, headers = api_instance.tiktok_trending_videos_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling TikTokApi->tiktok_trending_videos_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| region | String | [optional][default to 'US'] | |
| count | Integer | [optional][default to 20] |
Object
- Content-Type: Not defined
- Accept: application/json