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.

POSThttps://api.sandbase.ai/v1/run
Model IDtiktok/bulk/mobile-api
01

Input Schema

61 parameters · 0 required · 61 optional

ParameterTypeRequiredDescription
music_idstringOptionalThe ID of the TikTok music track to retrieve. Example: 6873491642666469377 · Default: ""
post_regionstringOptionalOptional 2-letter code for region (which might affect the data that appears). Defaults to 'GB' · Default: "GB"
post_awemeIdstringOptionalThe ID of the TikTok video post to retrieve. Example: 6811123699203329285 · Default: ""
profile_regionstringOptionalOptional 2-letter code for region (which might affect the data that appears). Defaults to 'GB' · Default: "GB"
profile_userIdstringOptionalUser ID used for identifying a TikTok account. Example: 131256363632148480 · Default: ""
followers_countintegerOptionalNumber of followers to retrieve. Default is 10. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 10
following_countintegerOptionalNumber of followings to retrieve. Default is 10. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 10
userLikes_countintegerOptionalNumber of liked posts to retrieve. Default is 10. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 10
userPosts_countintegerOptionalNumber of posts to retrieve. Default is 10. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 10
followers_userIdstringOptionalUser ID to fetch followers for. Example: 131256363632148480 · Default: ""
following_userIdstringOptionalUser ID to fetch followings for. Example: 131256363632148480 · Default: ""
musicPosts_countintegerOptionalNumber of posts to retrieve. Default is 18. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 18
profile_usernamestringOptionalEnter one TikTok username (without the @ symbol). Example: 'katyperry' · Default: ""
userLikes_userIdstringOptionalUser ID whose liked posts should be retrieved. Example: 6546356850533602319 · Default: ""
userPosts_regionstringOptionalOptional 2-letter code for region (which might affect the data that appears). Defaults to 'GB' · Default: "GB"
userPosts_userIdstringOptionalUser ID whose posts should be retrieved. Example: 6546356850533602319 · Default: ""
followers_maxTimeintegerOptionalPagination cursor. Use the 'min_time' value from the previous response to fetch more results. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0
following_maxTimeintegerOptionalPagination cursor. Use the 'min_time' value from the previous response to fetch more results. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0
musicPosts_cursorintegerOptionalPagination cursor for loading additional results. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0
profile_secUserIdstringOptionalSecondary user ID used by TikTok for user identification. Example: MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM · Default: ""
searchLives_countintegerOptionalNumber of lives to retrieve. Default is 20. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 20
searchPosts_countintegerOptionalNumber of posts to retrieve. Default is 10. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 10
searchUsers_countintegerOptionalNumber of users to retrieve. Default is 20. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 20
challengePosts_cidstringOptionalHashtag/Challenge ID used to fetch associated posts. Example: 1592380847102982 · Default: ""
listComments_countintegerOptionalNumber of top-level comments to fetch. Default is 10. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 10
musicPosts_musicIdstringOptionalID of the music to fetch associated video posts. Example: 7047667719411370758 · Default: ""
searchLives_offsetintegerOptionalOffset for pagination. Default is 0. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0
searchPosts_offsetintegerOptionalOffset for pagination. Default is 0. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0
searchPosts_regionstringOptionalOptional 2-letter code for region (which might affect the data that appears). Defaults to 'GB' · Default: "GB"
searchSounds_countintegerOptionalNumber of sounds to retrieve. Default is 10. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 10
searchUsers_cursorintegerOptionalPagination cursor to retrieve more users. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0
followers_secUserIdstringOptionalSecondary user ID used by TikTok for user identification. Example: MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM · Default: ""
following_secUserIdstringOptionalOptional secondary user ID. Example: MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM · Default: ""
listComments_cursorintegerOptionalPagination cursor to retrieve more top-level comments. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0
searchLives_keywordstringOptionalSearch for lives by keyword. Example: 'tiktok' · Default: ""
searchPosts_keywordstringOptionalSearch for posts by keyword. Example: 'nike' · Default: ""
searchSounds_cursorintegerOptionalPagination cursor to retrieve more sounds. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0
searchSounds_regionstringOptionalOptional 2-letter code for region (which might affect the data that appears). Defaults to 'GB' · Default: "GB"
searchUsers_keywordstringOptionalSearch for users by keyword. Example: 'japan' · Default: ""
userLikes_maxCursorstringOptionalPagination cursor for fetching additional liked posts. · Default: "0"
userPosts_maxCursorstringOptionalPagination cursor for fetching next set of posts. · Default: "0"
userPosts_secUserIdstringOptionalOptional secondary user ID. Example: MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM · Default: ""
challengePosts_countintegerOptionalNumber of challenge posts to fetch. Default is 20. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 20
commentReplies_countintegerOptionalNumber of replies to fetch. Default is 10. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 10
listComments_awemeIdstringOptionalID of the TikTok post to fetch top-level comments for. Example: 6944028931875949829 · Default: ""
searchHashtags_countintegerOptionalNumber of hashtags to retrieve. Default is 20. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 20
searchPosts_sortTypeintegerOptionalSort type for filtering posts. Default is 0. 0 = Relevance, 1 = Most Liked, 3 = Date · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0
searchSounds_keywordstringOptionalSearch for sounds by keyword. Example: 'japan' · Default: ""
challengePosts_cursorintegerOptionalPagination cursor to retrieve more results for a challenge. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0
commentReplies_cursorintegerOptionalPagination cursor to retrieve more comment replies. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0
searchHashtags_cursorintegerOptionalPagination cursor to retrieve more hashtags. · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0
searchHashtags_regionstringOptionalOptional 2-letter code for region (which might affect the data that appears). Defaults to 'GB' · Default: "GB"
searchSounds_filterByintegerOptionalFilter by. Default is 0. 0 = All, 1 = Title, 2 = Creators · Min: -9007199254740991 · Max: 9007199254740991 · Default: 0
searchSounds_sortTypeintegerOptionalSort 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_usernamestringOptionalGet the user ID from the username. You'll use this ID for most requests. Example: 'katyperry' · Default: ""
commentReplies_awemeIdstringOptionalID of the TikTok post containing the comment. Example: 6996617408010112262 · Default: ""
searchHashtags_keywordstringOptionalSearch for hashtags by keyword. Example: 'japan' · Default: ""
searchPosts_publishTimeintegerOptionalPublish 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_useFiltersbooleanOptionalWhether to use filters. Default is false. 0 is no, 1 is yes. · Default: false
commentReplies_commentIdstringOptionalID of the parent comment to fetch replies for. Example: 6999860547420766982 · Default: ""
videoWithoutWatermark_awemeIdstringOptionalGet the video without watermark. Example: 6811123699203329285 · Default: ""
02

Output Schema

FieldTypeDescription
idstringUnique identifier for the generation task
statusstringTask status: pending, running, completed, failed, timeout
modelstringModel used for the generation
outputsarrayArray of output items
outputs[].urlstringURL of the generated artifact
outputs[].content_typestringMIME type (e.g. image/png, video/mp4)
errorobject | nullError details if failed, null on success
error.typestringMachine-readable error type code
error.messagestringHuman-readable error description

Async Workflow

This model uses asynchronous execution. Submit a request and poll for the result.

  1. Submit — POST to /v1/run, receive an id
  2. Poll — GET /v1/run/{id} until status is completed, failed, or timeout
  3. Retrieve — Read outputs from 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"