📡 接口信息

GEThttp://api.f166.cn/api/v1/parse

请求示例

http://api.f166.cn/api/v1/parse?key=vapi_your_api_key&url=https%3A%2F%2Fv.douyin.com%2Fxxxxxx%2F

📋 请求参数

参数名必填类型说明
key* string 您的API密钥,格式如 vapi_xxxxxxxxxxxx,在用户中心激活后获取
url* string 短视频分享链接,需URL编码。支持各平台分享文本中的链接

💡 提示:url 参数需要对特殊字符进行 URL 编码(如 :%3A/%2F

📤 返回参数

参数名类型说明
codeint状态码,200 表示成功
msgstring提示信息
data.titlestring视频/图集标题
data.coverstring视频/图集封面地址
data.urlstring无水印视频下载地址(视频类型时返回)
data.typestring内容类型:video 视频 / image 图集
data.imagesarray无水印图集地址列表(图集类型时返回)

📦 返回示例

视频类型(抖音示例)

JSON{
  "code": 200,
  "msg": "解析成功",
  "data": {
    "title": "这个视频太有趣了 #搞笑",
    "cover": "https://p3-sign.douyinpic.com/cover.jpg",
    "url": "https://v9-dy.ixigua.com/video/no-watermark.mp4",
    "type": "video",
    "images": []
  }
}

图集类型(小红书示例)

JSON{
  "code": 200,
  "msg": "解析成功",
  "data": {
    "title": "今日穿搭分享~",
    "cover": "https://sns-img-bd.xhscdn.com/cover.jpg",
    "url": "",
    "type": "image",
    "images": [
      "https://sns-img-bd.xhscdn.com/img1.jpg",
      "https://sns-img-bd.xhscdn.com/img2.jpg",
      "https://sns-img-bd.xhscdn.com/img3.jpg"
    ]
  }
}

⚠️ 错误码说明

错误码说明解决方案
200解析成功-
400参数错误检查 key 和 url 参数是否完整
401API密钥无效检查 key 是否正确,是否已过期
403密钥已禁用联系客服确认账号状态
429请求过于频繁降低调用频率或升级套餐
429今日调用次数已达上限明日重试或升级套餐
429总调用次数已用完续费或购买新套餐
500解析失败链接可能不支持或平台接口变动,稍后重试

💻 代码示例

Pythonimport requests

# 短视频去水印解析
api_url = "http://api.f166.cn/api/v1/parse"
params = {
    "key": "vapi_your_api_key",      # 替换为你的API密钥
    "url": "https://v.douyin.com/xxxxxx/"  # 替换为短视频分享链接
}

response = requests.get(api_url, params=params)
result = response.json()

if result["code"] == 200:
    data = result["data"]
    print(f"标题: {data['title']}")
    if data["type"] == "video":
        print(f"视频地址: {data['url']}")
    elif data["type"] == "image":
        print(f"图集数量: {len(data['images'])}")
else:
    print(f"解析失败: {result['msg']}")
JavaScriptconst apiKey = "vapi_your_api_key";      // 替换为你的API密钥
const videoUrl = "https://v.douyin.com/xxxxxx/"; // 替换为短视频分享链接

const url = `http://api.f166.cn/api/v1/parse?key=${apiKey}&url=${encodeURIComponent(videoUrl)}`;

fetch(url)
  .then(res => res.json())
  .then(result => {
    if (result.code === 200) {
      const { title, type, url, images } = result.data;
      console.log("标题:", title);
      if (type === "video") console.log("视频:", url);
      if (type === "image") console.log("图集:", images);
    } else {
      console.log("解析失败:", result.msg);
    }
  });
PHP<?php
$apiKey = "vapi_your_api_key";       // 替换为你的API密钥
$videoUrl = "https://v.douyin.com/xxxxxx/"; // 替换为短视频分享链接

$url = "http://api.f166.cn/api/v1/parse?key=" . $apiKey 
     . "&url=" . urlencode($videoUrl);

$response = file_get_contents($url);
$result = json_decode($response, true);

if ($result["code"] == 200) {
    echo "标题: " . $result["data"]["title"] . "\n";
    if ($result["data"]["type"] == "video") {
        echo "视频: " . $result["data"]["url"] . "\n";
    }
} else {
    echo "解析失败: " . $result["msg"] . "\n";
}
?>
Gopackage main

import (
    "encoding/json"
    "fmt"
    "net/http"
    "net/url"
)

func main() {
    apiKey := "vapi_your_api_key"
    videoUrl := "https://v.douyin.com/xxxxxx/"
    
    reqUrl := fmt.Sprintf(
        "http://api.f166.cn/api/v1/parse?key=%s&url=%s",
        apiKey, url.QueryEscape(videoUrl),
    )
    
    resp, _ := http.Get(reqUrl)
    defer resp.Body.Close()
    
    var result map[stringinterface{}}
    json.NewDecoder(resp.Body).Decode(&result)
    
    fmt.Println(result["data"].(map[string]interface{})["title"])
}
Javaimport java.net.*;
import java.io.*;

public class VideoParse {
    public static void main(String[] args) throws Exception {
        String apiKey = "vapi_your_api_key";
        String videoUrl = URLEncoder.encode("https://v.douyin.com/xxxxxx/", "UTF-8");
        
        String url = "http://api.f166.cn/api/v1/parse?key=" 
                   + apiKey + "&url=" + videoUrl;
        
        HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
        BufferedReader reader = new BufferedReader(
            new InputStreamReader(conn.getInputStream()));
        
        String line, response = "";
        while ((line = reader.readLine()) != null) response += line;
        reader.close();
        
        System.out.println(response);
    }
}
cURL# 基本请求
curl -X GET "http://api.f166.cn/api/v1/parse?key=vapi_your_api_key&url=https%3A%2F%2Fv.douyin.com%2Fxxxxxx%2F"

# 自动URL编码(推荐)
curl -G "http://api.f166.cn/api/v1/parse" \
  --data-urlencode "key=vapi_your_api_key" \
  --data-urlencode "url=https://v.douyin.com/xxxxxx/"

# 格式化输出
curl -s "http://api.f166.cn/api/v1/parse?key=vapi_your_api_key&url=https%3A%2F%2Fv.douyin.com%2Fxxxxxx%2F" | python3 -m json.tool

🧪 在线调试

❓ 常见问题

如何获取API密钥?

① 注册账号 → ② 购买套餐获取激活密钥 → ③ 在用户中心输入激活密钥 → ④ 获得 API 密钥(vapi_xxx 格式)

分享链接怎么获取?

在抖音/快手/小红书等APP中,点击视频的「分享」按钮,选择「复制链接」,粘贴即可。支持带文字的分享内容,系统会自动提取链接。

支持POST请求吗?

支持。GET 和 POST 均可,参数名相同。POST 时请使用 application/jsonapplication/x-www-form-urlencoded 格式。

解析失败怎么办?

常见原因:① 链接过期,请重新获取分享链接 ② 平台接口变动,请联系客服 ③ 链接格式不支持,请确认链接来自支持的平台

有频率限制吗?

有的。根据套餐不同,限制不同。同一密钥每秒最多 5 次请求,超限会返回 429 错误。