API reference · TikTok

tiktok/bulk/video-metadata

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/video-metadata
01

Input Schema

8 parameters · 1 required · 7 optional

ParameterTypeRequiredDescription
postURLsarrayRequiredAdd the URLs of posted videos you want to scrape. You can enter URLs one by one, or you can upload or link to a text file.
resultsPerPageintegerOptionalAdd the number of related videos you want to scrape for each post URL. This field is applicable when the Scrape related videos option is enabled. · Min: 1 · Max: 1000000 · Default: 1
scrapeRelatedVideosbooleanOptionalTick to scrape related videos for the post URLs you provide. - The maximum number of scraped related videos is set by the `resultsPerPage` count. · Default: false
shouldDownloadCoversbooleanOptionalTick to download TikTok video cover images (thumbnails). Note that this will increase time and costs needed to extract the data. · Default: false
shouldDownloadVideosbooleanOptionalThis is a charged add-on. Tick to download TikTok videos. · Default: false
videoKvStoreIdOrNamestringOptionalName (or ID) of the Key Value Store where the videos and other media like thumbnails will be stored. Omit to store in the default one. Using this option will provide a named Key-Value store can help bypass data retention and store the content forever until the store is manually deleted.The Key-Value store's name can consist of a versatile combination of uppercase letters, lowercase letters, digits, or hyphens, all without any spaces.
downloadSubtitlesOptionsstringOptionalChoose how to handle subtitles and audio transcription for input videos. Subtitles are provided by TikTok for some videos, and transcription means that this Actor will use speech-to-text AI to generate video transcript. · Options: NEVER_DOWNLOAD_SUBTITLES, DOWNLOAD_SUBTITLES, DOWNLOAD_AND_TRANSCRIBE_VIDEOS_WITHOUT_SUBTITLES, TRANSCRIBE_ALL_VIDEOS · Default: "NEVER_DOWNLOAD_SUBTITLES"
NEVER_DOWNLOAD_SUBTITLESDOWNLOAD_SUBTITLESDOWNLOAD_AND_TRANSCRIBE_VIDEOS_WITHOUT_SUBTITLESTRANSCRIBE_ALL_VIDEOS
shouldDownloadSlideshowImagesbooleanOptionalTick to download TikTok slideshow images. Note that this will increase costs and time required for scraping. · Default: false
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/video-metadata",
  "resultsPerPage": 1,
  "scrapeRelatedVideos": false,
  "shouldDownloadCovers": false,
  "shouldDownloadVideos": false,
  "downloadSubtitlesOptions": "NEVER_DOWNLOAD_SUBTITLES",
  "shouldDownloadSlideshowImages": false,
  "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"