> ## 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.

# 获取视频下载地址

> 通过web端的url地址或app端视频分享地址，获取视频的封面、播放、无水印下载地址等。

🪙
1 credit每次请求

## Copy for AI

🤖 让 AI 帮你写调用代码点击按钮复制一段结构化提示词，可直接交给 ChatGPT、Claude 或其他 AI 助手生成接口调用代码。

✨ 复制给 AI


## OpenAPI

````yaml zh/tiktok.zh.openapi.json GET /v1/tiktok/video/download-url
openapi: 3.0.1
info:
  title: Tiktok API 中文文档
  description: Tiktok API 的中文参考文档，包含接口用途、参数说明、响应状态和示例结构。
  version: 1.0.0
servers:
  - url: https://api.keyapi.ai
    description: Production
security: []
tags:
  - name: TikTok 达人
  - name: TikTok 店铺
  - name: TikTok 内容数据
  - name: TikTok 趋势洞察
paths:
  /v1/tiktok/video/download-url:
    get:
      tags:
        - TikTok 内容数据
      summary: 获取视频下载地址
      description: 通过web端的url地址或app端视频分享地址，获取视频的封面、播放、无水印下载地址等。
      operationId: get_api_v3_realtime_video_download_url
      parameters:
        - name: url
          in: query
          description: >-
            支持短链或标准视频链接，例如 https://vt.tiktok.com/ZShA8F5de/ 或
            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: 请求成功
          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':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '402':
          $ref: '#/components/responses/402'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      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:
  responses:
    '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
  securitySchemes:
    JWT Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        接口鉴权凭证。请在请求 Header 中传入 `Authorization: Bearer <YOUR_API_KEY>`。
        可在 [Dashboard](https://keyapi.ai/app/dashboard) 获取你的 API Key。

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.