抖音解析

抖音视频/图集解析

API 文档

  • 接口地址: https://apicx.asia/api/douyin_parser
  • 返回格式: JOSN
  • 请求方式: GET
  • 请求示例: https://apicx.asia/api/douyin_parser?url=https://v.douyin.com/-4AgpbACYj8/&token=你的token

请求参数说明:

名称 必填 类型 说明
token string 登录获取token
urlstring请输入要解析抖音分享链接

返回参数说明:

名称 类型 说明
code integer 返回的状态码
data object 返回的数据/数据对象
msg string 返回的消息
time string 请求时间
data.titlestring文案
data.authorstring用户名
data.uidstringuid
data.music_urlstringmusic_url
data.aweme_idstringaweme_id
data.aweme_typenumberaweme_type
data.duration_secondsnumberduration_seconds
data.durationstringduration
data.typestringtype
data.video_idstringvideo_id
data.coverstringcover
data.urlstringurl
data.widthnumberwidth
data.heightnumberheight

返回示例:

{
  "code": 200,
  "msg": "解析成功",
  "timestamp": "2025-10-01 23:01:05",
  "data": {
    "title": "#柯基宝宝 #狗狗的快乐有多简单 #毛孩子也是孩子",
    "author": "小葵酱🌻",
    "uid": "198915215",
    "music_url": "https://lf26-music-east.douyinstatic.com/obj/ies-music-hj/7542275545665473340.mp3",
    "aweme_id": "7549923567762574651",
    "aweme_type": 61,
    "duration_seconds": 10,
    "duration": "00:10",
    "type": "video",
    "video_id": "v1e00fgi0000d33bddfog65gmmu2svs0",
    "cover": "https://p3-sign.douyinpic.com/tos-cn-p-0015c000-ce/oo4aiBeDoCthfFcFEZ2rJAIaAEhGfxDw39I471~tplv-dy-360p.webp?lk3s=138a59ce&x-expires=1760540400&x-signature=CF%2FmcH5RIeaI5erpGGDSFSbwiL4%3D&from=327834062&s=PackSourceEnum_AWEME_DETAIL&se=false&sc=origin_cover&biz_tag=aweme_video&l=202510012301056DE57B982957FECD2B70",
    "url": "https://v3-reading.douyin.com/852447a37e23ab1f30913c1ace311ca2/68dd504c/video/tos/cn/tos-cn-ve-15c000-ce/ow49hxEvhCaMNGe4A3a1tFwIDfADFEQfcCZorE/?a=1967&ch=0&cr=0&dr=0&cd=0%7C0%7C0%7C0&cv=1&br=1956&bt=1956&cs=0&ds=2&ft=eJEkmAS302P12Nvj3KPKHnRfY6zak-4kSYNc&mime_type=video_mp4&qs=0&rc=ODlnOWZoOGU5OTk5NjU1OEBpM3k1cGo5cmdlNjMzbGkzNEBiYDY0Yl4zNTYxMS0uNjU1YSNwcHJqMmRjYTBhLS1kLWJzcw%3D%3D&btag=c0000e00008000&dy_q=1759330866&feature_id=fea919893f650a8c49286568590446ef&l=20251001230106C4D085A665619BD63F1A",
    "width": 648,
    "height": 360
  },
  "cached_time": "2025-10-01 23:01:06"
}

错误码格式说明:

名称 类型 说明
200 string 返回状态码(成功)
500 string 返回的状态码(失败)

代码示例:


<?php
// 初始化cURL会话
$ch = curl_init();
// 设置请求URL,用户中心获取token,自行替换其他参数
curl_setopt($ch, CURLOPT_URL, "https://apicx.asia/api/douyin_parser?url=https://v.douyin.com/-4AgpbACYj8/&token=你的token");
// 设置请求头
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Authorization: YOUR_TOKEN'
));
// 返回响应而不是直接输出
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// 执行请求并获取响应
$response = curl_exec($ch);
// 关闭cURL会话
curl_close($ch);
// 将响应解析为JSON格式
$data = json_decode($response, true);
// 输出JSON数据
print_r($data);
?>
            

import requests

# 设置请求URL和头部,用户中心获取token,自行替换其他参数
url = "https://apicx.asia/api/douyin_parser?url=https://v.douyin.com/-4AgpbACYj8/&token=你的token"
headers = {
    'Authorization': 'YOUR_TOKEN'
}

# 发送GET请求
response = requests.get(url, headers=headers)
# 将响应解析为JSON格式
data = response.json()
# 输出JSON数据
print(data)
            

// 发送GET请求,用户中心获取token,自行替换其他参数
fetch("https://apicx.asia/api/douyin_parser?url=https://v.douyin.com/-4AgpbACYj8/&token=你的token", {
    method: "GET",
    headers: {
        "Authorization": "YOUR_TOKEN"
    }
})
.then(response => response.json()) // 将响应解析为JSON格式
.then(data => console.log(data)) // 输出JSON数据
.catch(error => console.error('Error:', error));
            

import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;

public class Main {
    public static void main(String[] args) throws Exception {
        // 创建URL对象,用户中心获取token,自行替换其他参数
        URL url = new URL("https://apicx.asia/api/douyin_parser?url=https://v.douyin.com/-4AgpbACYj8/&token=你的token");
        // 打开连接
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        // 设置请求方法
        conn.setRequestMethod("GET");
        // 设置请求头
        conn.setRequestProperty("Authorization", "YOUR_TOKEN");

        // 读取响应
        BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
        String inputLine;
        StringBuffer content = new StringBuffer();
        while ((inputLine = in.readLine()) != null) {
            content.append(inputLine);
        }
        in.close();
        // 输出JSON数据
        System.out.println(content.toString());
    }
}
            

using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program {
    static async Task Main() {
        using (HttpClient client = new HttpClient()) {
            // 设置请求头
            client.DefaultRequestHeaders.Add("Authorization", "YOUR_TOKEN");
            // 发送GET请求,用户中心获取token,自行替换其他参数
            HttpResponseMessage response = await client.GetAsync("https://apicx.asia/api/douyin_parser?url=https://v.douyin.com/-4AgpbACYj8/&token=你的token");
            // 将响应解析为字符串
            string responseBody = await response.Content.ReadAsStringAsync();
            // 输出JSON数据
            Console.WriteLine(responseBody);
        }
    }
}
            

require 'net/http'
require 'uri'

# 创建URI对象,用户中心获取token,自行替换其他参数
uri = URI.parse("https://apicx.asia/api/douyin_parser?url=https://v.douyin.com/-4AgpbACYj8/&token=你的token")
# 创建GET请求
request = Net::HTTP::Get.new(uri)
# 设置请求头
request["Authorization"] = "YOUR_TOKEN"

# 发送请求并获取响应
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end

# 输出JSON数据
puts response.body
            

package main

import (
    "fmt"
    "io/ioutil"
    "net/http"
)

func main() {
    client := &http.Client{}
    // 创建GET请求,用户中心获取token,自行替换其他参数
    req, err := http.NewRequest("GET", "https://apicx.asia/api/douyin_parser?url=https://v.douyin.com/-4AgpbACYj8/&token=你的token", nil)
    if err != nil {
        panic(err)
    }
    // 设置请求头
    req.Header.Add("Authorization", "YOUR_TOKEN")

    // 发送请求并获取响应
    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    // 读取响应体
    body, err := ioutil.ReadAll(resp.Body)
    if err != nil {
        panic(err)
    }
    // 输出JSON数据
    fmt.Println(string(body))
}