API reference · TikTok
tiktok/bulk/mobile-api
Integrate this model through SandBase's unified API, with production-ready schemas and examples.
Production endpoint
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
POST
https://api.sandbase.ai/v1/runModel ID
tiktok/bulk/mobile-api01
Input Schema
61 parameters · 0 required · 61 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
music_id | string | Optional | The ID of the TikTok music track to retrieve. Example: 6873491642666469377 · Default: "" |
post_region | string | Optional | Optional 2-letter code for region (which might affect the data that appears). Defaults to 'GB' · Default: "GB" |
post_awemeId | string | Optional | The ID of the TikTok video post to retrieve. Example: 6811123699203329285 · Default: "" |
profile_region | string | Optional | Optional 2-letter code for region (which might affect the data that appears). Defaults to 'GB' · Default: "GB" |
profile_userId | string | Optional | User ID used for identifying a TikTok account. Example: 131256363632148480 · Default: "" |
followers_count | integer | Optional | Number of followers to retrieve. Default is 10. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 10 |
following_count | integer | Optional | Number of followings to retrieve. Default is 10. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 10 |
userLikes_count | integer | Optional | Number of liked posts to retrieve. Default is 10. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 10 |
userPosts_count | integer | Optional | Number of posts to retrieve. Default is 10. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 10 |
followers_userId | string | Optional | User ID to fetch followers for. Example: 131256363632148480 · Default: "" |
following_userId | string | Optional | User ID to fetch followings for. Example: 131256363632148480 · Default: "" |
musicPosts_count | integer | Optional | Number of posts to retrieve. Default is 18. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 18 |
profile_username | string | Optional | Enter one TikTok username (without the @ symbol). Example: 'katyperry' · Default: "" |
userLikes_userId | string | Optional | User ID whose liked posts should be retrieved. Example: 6546356850533602319 · Default: "" |
userPosts_region | string | Optional | Optional 2-letter code for region (which might affect the data that appears). Defaults to 'GB' · Default: "GB" |
userPosts_userId | string | Optional | User ID whose posts should be retrieved. Example: 6546356850533602319 · Default: "" |
followers_maxTime | integer | Optional | Pagination cursor. Use the 'min_time' value from the previous response to fetch more results. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0 |
following_maxTime | integer | Optional | Pagination cursor. Use the 'min_time' value from the previous response to fetch more results. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0 |
musicPosts_cursor | integer | Optional | Pagination cursor for loading additional results. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0 |
profile_secUserId | string | Optional | Secondary user ID used by TikTok for user identification. Example: MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM · Default: "" |
searchLives_count | integer | Optional | Number of lives to retrieve. Default is 20. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 20 |
searchPosts_count | integer | Optional | Number of posts to retrieve. Default is 10. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 10 |
searchUsers_count | integer | Optional | Number of users to retrieve. Default is 20. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 20 |
challengePosts_cid | string | Optional | Hashtag/Challenge ID used to fetch associated posts. Example: 1592380847102982 · Default: "" |
listComments_count | integer | Optional | Number of top-level comments to fetch. Default is 10. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 10 |
musicPosts_musicId | string | Optional | ID of the music to fetch associated video posts. Example: 7047667719411370758 · Default: "" |
searchLives_offset | integer | Optional | Offset for pagination. Default is 0. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0 |
searchPosts_offset | integer | Optional | Offset for pagination. Default is 0. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0 |
searchPosts_region | string | Optional | Optional 2-letter code for region (which might affect the data that appears). Defaults to 'GB' · Default: "GB" |
searchSounds_count | integer | Optional | Number of sounds to retrieve. Default is 10. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 10 |
searchUsers_cursor | integer | Optional | Pagination cursor to retrieve more users. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0 |
followers_secUserId | string | Optional | Secondary user ID used by TikTok for user identification. Example: MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM · Default: "" |
following_secUserId | string | Optional | Optional secondary user ID. Example: MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM · Default: "" |
listComments_cursor | integer | Optional | Pagination cursor to retrieve more top-level comments. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0 |
searchLives_keyword | string | Optional | Search for lives by keyword. Example: 'tiktok' · Default: "" |
searchPosts_keyword | string | Optional | Search for posts by keyword. Example: 'nike' · Default: "" |
searchSounds_cursor | integer | Optional | Pagination cursor to retrieve more sounds. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0 |
searchSounds_region | string | Optional | Optional 2-letter code for region (which might affect the data that appears). Defaults to 'GB' · Default: "GB" |
searchUsers_keyword | string | Optional | Search for users by keyword. Example: 'japan' · Default: "" |
userLikes_maxCursor | string | Optional | Pagination cursor for fetching additional liked posts. · Default: "0" |
userPosts_maxCursor | string | Optional | Pagination cursor for fetching next set of posts. · Default: "0" |
userPosts_secUserId | string | Optional | Optional secondary user ID. Example: MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM · Default: "" |
challengePosts_count | integer | Optional | Number of challenge posts to fetch. Default is 20. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 20 |
commentReplies_count | integer | Optional | Number of replies to fetch. Default is 10. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 10 |
listComments_awemeId | string | Optional | ID of the TikTok post to fetch top-level comments for. Example: 6944028931875949829 · Default: "" |
searchHashtags_count | integer | Optional | Number of hashtags to retrieve. Default is 20. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 20 |
searchPosts_sortType | integer | Optional | Sort type for filtering posts. Default is 0. 0 = Relevance, 1 = Most Liked, 3 = Date · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0 |
searchSounds_keyword | string | Optional | Search for sounds by keyword. Example: 'japan' · Default: "" |
challengePosts_cursor | integer | Optional | Pagination cursor to retrieve more results for a challenge. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0 |
commentReplies_cursor | integer | Optional | Pagination cursor to retrieve more comment replies. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0 |
searchHashtags_cursor | integer | Optional | Pagination cursor to retrieve more hashtags. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0 |
searchHashtags_region | string | Optional | Optional 2-letter code for region (which might affect the data that appears). Defaults to 'GB' · Default: "GB" |
searchSounds_filterBy | integer | Optional | Filter by. Default is 0. 0 = All, 1 = Title, 2 = Creators · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0 |
searchSounds_sortType | integer | Optional | Sort type for filtering sounds. Default is 0. 0 = Relevance, 1 = Most used, 2 = Most recent, 3 = Shortest, 4 = Longest · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0 |
usernameToId_username | string | Optional | Get the user ID from the username. You'll use this ID for most requests. Example: 'katyperry' · Default: "" |
commentReplies_awemeId | string | Optional | ID of the TikTok post containing the comment. Example: 6996617408010112262 · Default: "" |
searchHashtags_keyword | string | Optional | Search for hashtags by keyword. Example: 'japan' · Default: "" |
searchPosts_publishTime | integer | Optional | Publish time for filtering posts. Default is 0. 0 = All Time, 1 = Yesterday, 7 = This Week, 30 = This Month, 90 = Last 3 Months, 180 = Last 6 Months · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0 |
searchSounds_useFilters | boolean | Optional | Whether to use filters. Default is false. 0 is no, 1 is yes. · Default: false |
commentReplies_commentId | string | Optional | ID of the parent comment to fetch replies for. Example: 6999860547420766982 · Default: "" |
videoWithoutWatermark_awemeId | string | Optional | Get the video without watermark. Example: 6811123699203329285 · Default: "" |
02
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
03
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "tiktok/bulk/mobile-api",
"music_id": "",
"post_region": "GB",
"post_awemeId": "",
"profile_region": "GB",
"profile_userId": "",
"followers_count": 10,
"following_count": 10,
"userLikes_count": 10,
"userPosts_count": 10,
"followers_userId": "",
"following_userId": "",
"musicPosts_count": 18,
"profile_username": "",
"userLikes_userId": "",
"userPosts_region": "GB",
"userPosts_userId": "",
"followers_maxTime": 0,
"following_maxTime": 0,
"musicPosts_cursor": 0,
"profile_secUserId": "",
"searchLives_count": 20,
"searchPosts_count": 10,
"searchUsers_count": 20,
"challengePosts_cid": "",
"listComments_count": 10,
"musicPosts_musicId": "",
"searchLives_offset": 0,
"searchPosts_offset": 0,
"searchPosts_region": "GB",
"searchSounds_count": 10,
"searchUsers_cursor": 0,
"followers_secUserId": "",
"following_secUserId": "",
"listComments_cursor": 0,
"searchLives_keyword": "",
"searchPosts_keyword": "",
"searchSounds_cursor": 0,
"searchSounds_region": "GB",
"searchUsers_keyword": "",
"userLikes_maxCursor": "0",
"userPosts_maxCursor": "0",
"userPosts_secUserId": "",
"challengePosts_count": 20,
"commentReplies_count": 10,
"listComments_awemeId": "",
"searchHashtags_count": 20,
"searchPosts_sortType": 0,
"searchSounds_keyword": "",
"challengePosts_cursor": 0,
"commentReplies_cursor": 0,
"searchHashtags_cursor": 0,
"searchHashtags_region": "GB",
"searchSounds_filterBy": 0,
"searchSounds_sortType": 0,
"usernameToId_username": "",
"commentReplies_awemeId": "",
"searchHashtags_keyword": "",
"searchPosts_publishTime": 0,
"searchSounds_useFilters": false,
"commentReplies_commentId": "",
"videoWithoutWatermark_awemeId": "",
"prompt": "a beautiful sunset over mountains"
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"
