首页使用教程YouTube videos and Shorts 开放接口集成教程
教程

YouTube videos and Shorts 开放接口集成教程

了解如何通过 TapSave 开放接口解析公开YouTube videos and Shorts链接,并在应用中处理返回的媒体资源。

更新时间:2026-09-04

YouTube videos and Shorts 开放接口集成教程

了解如何通过 TapSave 开放接口解析公开YouTube videos and Shorts链接,并在应用中处理返回的媒体资源。

接入流程

https://api.videotool.cc/openapi/parse 发送 POST 请求,设置 Content-Type: application/jsonX-API-Key 请求头,并在 JSON 请求体中传入公开链接字段 url

响应处理

先检查 code === 200data.resultCode === 0data.hasResource === true。随后只处理本次响应实际返回的资源数组;不要自行拼接链接,也不要假定固定格式。

YouTube videos and Shorts resources

YouTube 结果的音频可能出现在 videoList[].audioUrlaudioList;它们为空时不能承诺带声音或固定 MP4。

限制与安全

API Key 必须保存在服务端,不能暴露在浏览器代码中。私密、删除、受限或不可访问的链接应作为预期的解析失败处理。