微博视频解析

GET
http://api.xuewutheme.com/api/video/weibo

解析微博视频,获取下载链接+详细信息

接口概述

请求示例: http://api.xuewutheme.com/api/video/weibo?url=https://video.weibo.com/show?fid=1034:5201778053152960

解析微博视频,获取下载链接+详细信息

请求参数

参数名 类型 必填 描述
apikey string 整数 string

用户开通的apikey

url string 整数 string

微博视频链接

响应参数

成功响应

状态码: 200 OK
格式: json
参数名 类型 描述
code integer integer

返回的状态码

data object object

返回的数据/数据对象

msg string string

返回的消息

time string string

请求时间

data.title string string

标题

data.author string string

作者

data.author_id number number

作者ID

data.author_avatar string string

作者头像

data.urls.[] string string

视频地址

data.cover string string

封面图

data.time number number

发布时间

data.duration string string

时长

响应示例

JSON
{
  "code": 200,
  "msg": "视频解析成功",
  "time": "2025-09-20 11:56:23",
  "data": {
    "title": "内娱日记的微博视频",
    "author": "内娱日记",
    "author_id": 5862006754,
    "author_avatar": "//tvax3.sinaimg.cn/small/006oInK2ly1i4950p1937j30u00u0n0g.jpg?KID=imgbed,tva&Expires=1758351383&ssig=GkFEP39Gb0",
    "urls": {
      "高清 1080P": "//f.video.weibocdn.com/o0/oCb5ePkGlx08qLhfUXqM01041201BiWT0E010.mp4?label=mp4_1080p&template=1440x1080.25.0&media_id=5201778053152960&tp=8x8A3El:YTkl0eM8&us=0&ori=1&bf=4&ot=h&ps=3lckmu&uid=6KchQJ&ab=,15568-g4,8012-g2,8013-g0,3601-g41,3601-g36,3601-g36,3601-g27,3601-g38&Expires=1758344183&ssig=6WPHXS8Kel&KID=unistore,video",
      "高清 720P": "//f.video.weibocdn.com/o0/fI6TFGIDlx08qLhekLkk01041200WWh70E010.mp4?label=mp4_720p&template=960x720.25.0&media_id=5201778053152960&tp=8x8A3El:YTkl0eM8&us=0&ori=1&bf=4&ot=h&ps=3lckmu&uid=6KchQJ&ab=,15568-g4,8012-g2,8013-g0,3601-g41,3601-g36,3601-g36,3601-g27,3601-g38&Expires=1758344183&ssig=qf2MDsq%2BHA&KID=unistore,video",
      "标清 480P": "//f.video.weibocdn.com/o0/Dd6C3z4xlx08qLhcChoA01041200wto80E010.mp4?label=mp4_hd&template=640x480.25.0&media_id=5201778053152960&tp=8x8A3El:YTkl0eM8&us=0&ori=1&bf=4&ot=h&ps=3lckmu&uid=6KchQJ&ab=,15568-g4,8012-g2,8013-g0,3601-g41,3601-g36,3601-g36,3601-g27,3601-g38&Expires=1758344183&ssig=VGjnu8I4bE&KID=unistore,video"
    },
    "cover": "//wx2.sinaimg.cn/orj480/006oInK2ly1i4kh33n7qtj31400u0dht.jpg",
    "time": 1755683995,
    "duration": "2:17"
  }
}

请求示例

cURL

Bash
curl -X GET \
  "https://api.example.com/v1/users/12345" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
  -H "Content-Type: application/json"

Python

Python
import requests

url = "https://api.example.com/v1/users/12345"
headers = {
    "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "Content-Type": "application/json"
}

response = requests.get(url, headers=headers)
print(response.json())

JavaScript

JavaScript
const response = await fetch(
  'https://api.example.com/v1/users/12345',
  {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
      'Content-Type': 'application/json'
    }
  }
);

const data = await response.json();
console.log(data);

PHP

PHP
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://api.example.com/v1/users/12345");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");

$headers = array();
$headers[] = "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...";
$headers[] = "Content-Type: application/json";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

curl_close($ch);

错误码

状态码 描述
100 您的apikey值为空!
101 您的apikey值不存在!
103 当前接口为实名认证后可用,请您先进行实名!
104 请求频率超限!
105 接口不存在或已下线!
106 您的余额不足,请及时充值!
107 您当前的接口免费使用次数已用完,请明日再来!
109 您的账号已被封禁,不可使用任何接口!
110 接口维护中,请稍后再试!
111 请求参数不完整,请检查后再次访问!

错误响应示例

JSON
{
  "code": 1001,
  "message": "用户不存在",
  "data": null
}