TikTok Transcription

TikTok Scraping & Transcription

Real-time Scraping

Extract and transcribe TikTok video content in near real-time through our secure API

Secure Processing

Protected data retrieval and transcription through TEE nodes with rate limiting

Key Endpoints

MethodEndpointDescription
POST/v1/search/live/tiktokSubmit a TikTok video transcription request
GET/v1/search/live/tiktok/status/:jobUUIDCheck transcription job status
GET/v1/search/live/tiktok/result/:jobUUIDRetrieve transcription results

Submit Transcription Request

Submit a TikTok video URL to initiate transcription. The API will process the video, extract the audio, and return a transcription of the spoken content. You can optionally specify the expected language to improve accuracy.

Request Parameters

FieldTypeRequiredDescription
video_urlstringFull URL of the TikTok video to transcribe
languagestringExpected language code (e.g. “eng-US”, “spa”, “fra”)

Authentication

  • Authorization: Bearer Token
  • Header: Authorization: Bearer <API_KEY>

Transcribing a TikTok Video

Submit a TikTok video URL to start the transcription process. The API will return a job UUID that you can use to check the status and retrieve results. The transcription process typically takes 30-60 seconds depending on video length.

curl https://data.masa.ai/v1/search/live/tiktok \
  -H "Authorization: Bearer <API_KEY>" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "https://www.tiktok.com/@example/video/1234567890",
    "language": "eng-US"
  }'

Retrieve Transcription Results

curl https://data.masa.ai/v1/search/live/tiktok/result/<JOB_UUID> \
  -H "Authorization: Bearer <API_KEY>"

Response example:

{
  "transcription_text": "This is the extracted text from the video...",
  "detected_language": "eng-US",
  "video_title": "Example TikTok Video",
  "original_url": "https://www.tiktok.com/@example/video/1234567890",
  "thumbnail_url": "https://example.com/thumbnail.jpg",
  "timestamp": "2024-01-01T12:00:00Z"
}

Use this endpoint to perform semantic searches on previously indexed TikTok video transcriptions. Results are ranked based on vector similarity, allowing you to find semantically related content across your stored TikTok data. Perfect for discovering thematically similar videos or analyzing content patterns.

curl https://data.masa.ai/v1/search/similarity/tiktok \
  -H "Authorization: Bearer <API KEY>" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "query": "funny cat videos",
    "keywords": [ "pets", "humor" ],
    "max_results": 10
  }'

Combine semantic and keyword search capabilities to find relevant TikTok videos. This hybrid approach leverages both vector embeddings for semantic similarity and traditional text search, allowing you to discover content that matches both meaning and specific keywords.

curl https://data.masa.ai/v1/search/hybrid/tiktok \
  -H "Authorization: Bearer <API KEY>" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "similarity_query": {
      "query": "funny cat videos",
      "weight": 0.7
    },
    "text_query": {
      "query": "cat memes viral",
      "weight": 0.3
    },
    "keywords": ["pets", "funny"],
    "keyword_operator": "or",
    "max_results": 10
  }'