Get TikTok Transcript
API endpoint to retrieve the transcript from a TikTok video.
Description
This endpoint allows you to retrieve the transcript of a TikTok video. It attempts to fetch the available transcript for the given video URL in the specified language.
Endpoint
Request Headers
- Content-Type:
application/json
(required) - Authorization:
Bearer <YOUR_API_KEY>
(required)
Request Body
Parameter | Type | Description | Required | Default |
---|---|---|---|---|
videoUrl | string | The full URL of the TikTok video you want to get the transcript for. | Yes | |
preferredLanguage | string | The 2-letter ISO 639-1 language code for the desired transcript language. | No | en |
Responses
Success (200 OK)
Returns the transcript of the specified TikTok video, the requested language, and identifiers from the transcript service.
Response Body:
Response Headers:
- Content-Type:
application/json
- X-RateLimit-Limit: The rate limit for the user.
- X-RateLimit-Remaining: The remaining number of requests for the user.
Bad Request (400)
Returned if the request is invalid or missing required parameters, or if the underlying transcript service encounters an error with the request.
Possible Error Messages:
videoUrl parameter is required
Invalid JSON in request body
Invalid TikTok videoUrl format.
TikTok transcript API error: <details from service>
(if the external service returns a structured error)Failed to get TikTok transcript: <details>
(for other processing errors)
Unauthorized (401)
Returned if the API key is missing, invalid, or unauthorized.
Not Found (404)
Returned if the underlying service cannot find subtitles for the video, or in the requested language.
Internal Server Error (500)
Returned if there’s an unexpected error on our end or a critical error from the transcription service.
Possible Error Messages:
Invalid response from TikTok transcript service: <details>
TikTok transcript service API key not configured.
(if server-side configuration is missing)
Example Request
Example Successful Response (200 OK)
The transcript is returned in WebVTT format.
Notes
- The
videoUrl
parameter must be a valid TikTok video URL. - The availability of transcripts and specific languages depends on the TikTok video itself.
- The transcript is returned in WebVTT format. You may need to parse this format if you require plain text or structured timestamp data.
Credit Cost
This endpoint costs 2 credits per successful request. For more details on credit usage, see Credit Costs.
Rate Limiting
Rate limit headers (X-RateLimit-Limit
and X-RateLimit-Remaining
) are included in the response to indicate the user’s current rate limit status.