> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keyapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Video Download URL

> Retrieve the download URL for a TikTok video, returning a watermark-free link where available.

<div className="inline-flex items-center gap-2 px-4 py-2 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg">
  <span className="text-base">🪙</span>
  <span className="text-sm font-medium text-yellow-900 dark:text-yellow-100"><span className="font-semibold">1 credit</span><span className="text-yellow-700 dark:text-yellow-300 ml-1">per request</span></span>
</div>

## Copy for AI

<div className="my-6 rounded-xl border border-gray-200 bg-gray-50 p-5 dark:border-gray-800 dark:bg-gray-900/40">
  <div className="min-w-0">
    <p className="text-base font-semibold text-gray-900 dark:text-gray-100">🤖 Why Code When AI Can Do It For You?</p>
    <p className="mt-1 text-sm text-gray-700 dark:text-gray-300">Stop writing code like it's 1970! Let AI do the heavy lifting - click the sparkles to copy a perfectly formatted prompt for ChatGPT, Claude, or your favorite AI assistant.</p>
  </div>

  <div className="mt-4">
    <button
      type="button"
      className="inline-flex items-center gap-2 rounded-md border border-emerald-300 bg-emerald-50 px-3 py-2 text-sm font-medium text-emerald-800 hover:bg-emerald-100 dark:border-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-100 dark:hover:bg-emerald-900/50"
      onClick={() => navigator.clipboard.writeText(`I want to make an API call to https://api.keyapi.ai/v1/tiktok/video/download-url.

Please help me write code to make this API call and handle the response appropriately. Include error handling and best practices.

Here are the details:

Endpoint: GET https://api.keyapi.ai/v1/tiktok/video/download-url

Description: Retrieve the download URL for a TikTok video, returning a watermark-free link where available.

Required Headers:
--header 'Authorization: Bearer <YOUR_API_KEY>'

Parameters:
- url (Required): Can support the two formats: https://vt.tiktok.com/ZShA8F5de/ or https://www.tiktok.com/@soraryx_/video/7377855725290179873. Example: https://vt.tiktok.com/ZShA8F5de/

Example Response:
{
"code": 0,
"message": "success",
"data": {
"cover_url": "https://p19-common-sign-useastred.tiktokcdn-eu.com/tos-useast2a-p-0037-euttp/b0ba71f6b8074b37aee9b7f6db92cae9_1717790908~tplv-tiktokx-cropcenter-q:300:400:q72.heic?dr=9232&refresh_token=abe0094d&x-expires=1770519600&x-signature=d8%2F%2FVZMQcu4DTo6TlrrxCIBhPto%3D&t=bacd0480&ps=933b5bde&shp=d05b14bd&shcp=1d1a97fc&idc=no1a&biz_tag=tt_video&s=AWEME_DETAIL&sc=cover&item=7377855725290179873",
"play_url": "https://v19-perf.tiktokcdn-eu.com/b7d29c3456e5ed37f4560278aabb6661/69880955/video/tos/no1a/tos-no1a-ve-68c710-no/oIjGCEpEREfAMPhfh9IQq7DmuJVFEDg2BQYiaY/?a=1233&bti=OTg7QGo5QHM6OjZALTAzYCMvcCMxNDNg&ch=0&cr=13&dr=0&er=0&lr=all&net=0&cd=0%7C0%7C0%7C&cv=1&br=2658&bt=1329&cs=0&ds=6&ft=e_YlkGmrdPWsuNvjVXpla~zfuC01HowkaYlc&mime_type=video_mp4&qs=0&rc=OzwzNGkzOTY6NjZnZTo1M0BpajVmdGo5cjtwczMzZjczM0BiMzY2M2JiX18xL141YTItYSNeYGtzMmQ0ZWVgLS1kMWNzcw%3D%3D&vvpl=1&l=202602070355362289277E9383C31E1303&btag=e000b8000",
"download_url": "https://v19-perf.tiktokcdn-eu.com/b3470f0456b9b79ed35e7a3fd605ffef/69880955/video/tos/no1a/tos-no1a-ve-68c710-no/oACjgfiExqR7QEYICBFmAaVDQVPoED5Mf2YEGh/?a=1233&bti=OTg7QGo5QHM6OjZALTAzYCMvcCMxNDNg&ch=0&cr=13&dr=0&er=0&lr=all&net=0&cd=0%7C0%7C0%7C&cv=1&br=2680&bt=1340&cs=0&ds=3&ft=e_YlkGmrdPWsuNvjVXpla~zfuC01HowkaYlc&mime_type=video_mp4&qs=0&rc=PGlpODk1ZWdlNGc0NmRlO0BpajVmdGo5cjtwczMzZjczM0AtLTQ1L2I1NmExMmIvY2MyYSNeYGtzMmQ0ZWVgLS1kMWNzcw%3D%3D&vvpl=1&l=202602070355362289277E9383C31E1303&btag=e000
... (truncated)`)}
    >
      <span>✨</span>
      <span>Copy for AI</span>
    </button>
  </div>
</div>


## OpenAPI

````yaml en/tiktok.openapi.json GET /v1/tiktok/video/download-url
openapi: 3.0.1
info:
  title: Tiktok API english documentation
  description: >-
    The english reference documentation of the Tiktok API includes the
    interface's purpose, parameter description, response status, and sample
    structure.
  version: 1.0.0
servers:
  - url: https://api.keyapi.ai
    description: Production
security: []
tags:
  - name: TikTok Influencer
  - name: TikTok Shop
  - name: TikTok Content
  - name: TikTok Intelligence
paths:
  /v1/tiktok/video/download-url:
    get:
      tags:
        - TikTok Content
      summary: Get Video Download URL
      description: >-
        Retrieve the download URL for a TikTok video, returning a watermark-free
        link where available.
      operationId: get_api_v3_realtime_video_download_url
      parameters:
        - name: url
          in: query
          description: >-
            Can support the two formats: https://vt.tiktok.com/ZShA8F5de/ or
            https://www.tiktok.com/@soraryx_/video/7377855725290179873
          required: true
          schema:
            type: string
            example: https://vt.tiktok.com/ZShA8F5de/
            default: https://vt.tiktok.com/ZShA8F5de/
          example: https://vt.tiktok.com/ZShA8F5de/
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties: {}
                example:
                  code: 0
                  message: success
                  data:
                    cover_url: >-
                      https://p19-common-sign-useastred.tiktokcdn-eu.com/tos-useast2a-p-0037-euttp/b0ba71f6b8074b37aee9b7f6db92cae9_1717790908~tplv-tiktokx-cropcenter-q:300:400:q72.heic?dr=9232&refresh_token=abe0094d&x-expires=1770519600&x-signature=d8%2F%2FVZMQcu4DTo6TlrrxCIBhPto%3D&t=bacd0480&ps=933b5bde&shp=d05b14bd&shcp=1d1a97fc&idc=no1a&biz_tag=tt_video&s=AWEME_DETAIL&sc=cover&item=7377855725290179873
                    play_url: >-
                      https://v19-perf.tiktokcdn-eu.com/b7d29c3456e5ed37f4560278aabb6661/69880955/video/tos/no1a/tos-no1a-ve-68c710-no/oIjGCEpEREfAMPhfh9IQq7DmuJVFEDg2BQYiaY/?a=1233&bti=OTg7QGo5QHM6OjZALTAzYCMvcCMxNDNg&ch=0&cr=13&dr=0&er=0&lr=all&net=0&cd=0%7C0%7C0%7C&cv=1&br=2658&bt=1329&cs=0&ds=6&ft=e_YlkGmrdPWsuNvjVXpla~zfuC01HowkaYlc&mime_type=video_mp4&qs=0&rc=OzwzNGkzOTY6NjZnZTo1M0BpajVmdGo5cjtwczMzZjczM0BiMzY2M2JiX18xL141YTItYSNeYGtzMmQ0ZWVgLS1kMWNzcw%3D%3D&vvpl=1&l=202602070355362289277E9383C31E1303&btag=e000b8000
                    download_url: >-
                      https://v19-perf.tiktokcdn-eu.com/b3470f0456b9b79ed35e7a3fd605ffef/69880955/video/tos/no1a/tos-no1a-ve-68c710-no/oACjgfiExqR7QEYICBFmAaVDQVPoED5Mf2YEGh/?a=1233&bti=OTg7QGo5QHM6OjZALTAzYCMvcCMxNDNg&ch=0&cr=13&dr=0&er=0&lr=all&net=0&cd=0%7C0%7C0%7C&cv=1&br=2680&bt=1340&cs=0&ds=3&ft=e_YlkGmrdPWsuNvjVXpla~zfuC01HowkaYlc&mime_type=video_mp4&qs=0&rc=PGlpODk1ZWdlNGc0NmRlO0BpajVmdGo5cjtwczMzZjczM0AtLTQ1L2I1NmExMmIvY2MyYSNeYGtzMmQ0ZWVgLS1kMWNzcw%3D%3D&vvpl=1&l=202602070355362289277E9383C31E1303&btag=e000b8000
                    no_watermark_download_url: >-
                      https://v19-perf.tiktokcdn-eu.com/b7d29c3456e5ed37f4560278aabb6661/69880955/video/tos/no1a/tos-no1a-ve-68c710-no/oIjGCEpEREfAMPhfh9IQq7DmuJVFEDg2BQYiaY/?a=1233&bti=OTg7QGo5QHM6OjZALTAzYCMvcCMxNDNg&ch=0&cr=13&dr=0&er=0&lr=all&net=0&cd=0%7C0%7C0%7C&cv=1&br=2658&bt=1329&cs=0&ds=6&ft=e_YlkGmrdPWsuNvjVXpla~zfuC01HowkaYlc&mime_type=video_mp4&qs=0&rc=OzwzNGkzOTY6NjZnZTo1M0BpajVmdGo5cjtwczMzZjczM0BiMzY2M2JiX18xL141YTItYSNeYGtzMmQ0ZWVgLS1kMWNzcw%3D%3D&vvpl=1&l=202602070355362289277E9383C31E1303&btag=e000b8000
                    dynamic_cover_url: >-
                      https://p19-common-sign-useastred.tiktokcdn-eu.com/tos-useast2a-p-0037-euttp/d96e01b11c794dabb39979d23fe07b3e_1717790908~tplv-tiktokx-origin.image?dr=9229&refresh_token=e4837cb9&x-expires=1770519600&x-signature=VLRVj%2Bn%2F72A7T3jvqaggN21C9Fc%3D&t=bacd0480&ps=4f5296ae&shp=d05b14bd&shcp=1d1a97fc&idc=no1a&biz_tag=tt_video&s=AWEME_DETAIL&sc=dynamic_cover&item=7377855725290179873
                    video_id: '7377855725290179873'
                  requestId: c728bf41-118f-4136-92db-d9ee616e9968
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 400
                  data: null
                  message: 'Missing required parameter: handle'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 401
                  data: null
                  message: apiKey is null
        '402':
          description: Payment Required
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 402
                  data: null
                  message: apiKey quota is not enough
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 429
                  data: null
                  message: qps limit exceeded
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 500
                  data: null
                  message: Internal server error
      deprecated: false
      security:
        - JWT Bearer: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.keyapi.ai/v1/tiktok/video/download-url?url=https%3A%2F%2Fvt.tiktok.com%2FZShA8F5de%2F' \
              --header 'Authorization: Bearer <YOUR_API_KEY>'
        - lang: python
          label: Python
          source: |-
            import requests

            response = requests.get(
                'https://api.keyapi.ai/v1/tiktok/video/download-url',
                params={"url": "https://vt.tiktok.com/ZShA8F5de/"},
                headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
            )
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const params = new URLSearchParams({"url":
            "https://vt.tiktok.com/ZShA8F5de/"});


            const response = await
            fetch(`https://api.keyapi.ai/v1/tiktok/video/download-url?${params}`,
            {
              method: 'GET',
              headers: { 'Authorization': 'Bearer <YOUR_API_KEY>' }
            });

            const data = await response.json();

            console.log(data);
components:
  securitySchemes:
    JWT Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        API key for authentication. Format: `sk_live_xxxxxxxxxxxxx`
        Get your API key from the [Dashboard](http://keyapi.ai/app/dashboard).

````