Skip to content

微博 API - 电视视频详情 (V1)

prod-global
GET
/api/weibo/tv-component/v1

根据对象ID获取单个微博视频的详细信息。 包含视频元数据、媒体URL、封面图片、作者信息和互动指标。

典型使用场景:

  • 视频内容分析与归档
  • 微博视频表现监控

请求参数

参数名位置类型必填说明
tokenquerystringAPI 访问令牌。
oidquerystring微博视频/对象ID。

代码示例

💡 环境说明

默认示例使用 https://api.justoneapi.com (prod-global)。中国大陆地区建议替换为 http://47.117.133.51:30015 (prod-cn) 以获得更好的访问体验。详见 环境选择

bash
# 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
curl -X GET "https://api.justoneapi.com/api/weibo/tv-component/v1?token=YOUR_API_KEY&oid=VALUE"
text
我想使用 Just One API 提供的“电视视频详情 (V1)”接口。
接口地址: https://api.justoneapi.com/api/weibo/tv-component/v1
HTTP 方法: GET
身份验证: 在 URL 后添加查询参数“?token=您的API密钥”。
OpenAPI 定义: https://docs.justoneapi.com/openapi/weibo-apis/tv-video-details-v1-zh.json

请求参数说明:
- token (query): API 访问令牌。 (必填)
- oid (query): 微博视频/对象ID。 (必填)

返回格式: JSON

响应处理与错误码:
1. 需通过返回体中的 "code" 字段判断业务结果(code 为 0 表示成功)。
2. 超时建议:建议将请求超时时间设置为至少 60 秒。
3. 业务码说明:
   - 0: 成功
   - 100: Token 无效或已失效
   - 301: 采集失败,请重试
   - 302: 超出速率限制
   - 303: 超出每日配额
   - 400: 参数错误
   - 500: 内部服务器错误
   - 600: 权限不足
   - 601: 余额不足

请帮我用我擅长的编程语言写一个脚本来调用这个接口,并处理返回结果。
python
# 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
import requests

url = "https://api.justoneapi.com/api/weibo/tv-component/v1?token=YOUR_API_KEY&oid=VALUE"
response = requests.get(url)
print(response.json())
js
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
const response = await fetch("https://api.justoneapi.com/api/weibo/tv-component/v1?token=YOUR_API_KEY&oid=VALUE", {
  method: "GET"
});
const data = await response.json();
console.log(data);
java
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.justoneapi.com/api/weibo/tv-component/v1?token=YOUR_API_KEY&oid=VALUE"))
            .method("GET", HttpRequest.BodyPublishers.noBody())
            .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
go
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
package main

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

func main() {
	client := &http.Client{}
	url := "https://api.justoneapi.com/api/weibo/tv-component/v1?token=YOUR_API_KEY&oid=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
php
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.justoneapi.com/api/weibo/tv-component/v1?token=YOUR_API_KEY&oid=VALUE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
curl_close($ch);
echo $response;

响应结果

json
{
  "code": 0,
  "data": {
    "code": "100000",
    "msg": "succ",
    "data": {
      "Component_Play_Playinfo": {
        "mid": 5250047550692533,
        "id": "1034:5250046363631919",
        "oid": "1034:5250046363631919",
        "media_id": 5250046363631919,
        "user": {
          "id": 2303608985
        },
        "is_follow": false,
        "attitude": false,
        "date": "2月前",
        "real_date": 1767192057,
        "idstr": "1034:5250046363631919",
        "author": "终极小腾",
        "author_id": 2303608985,
        "nickname": "终极小腾",
        "verified": true,
        "verified_type": 0,
        "verified_type_ext": 2,
        "verified_reason": "汽车博主 微博原创视频博主",
        "avatar": "//tvax2.sinaimg.cn/small/894e4899ly8i334gjloqej20u00u076u.jpg?KID=imgbed,tva&Expires=1773075600&ssig=o%2Fy7VFxHh6",
        "followers_count": "221.7万",
        "reposts_count": "330",
        "comments_count": "87",
        "attitudes_count": 889,
        "title": "终极小腾的微博视频",
        "urls": {
          "超清 4K60": "//f.video.weibocdn.com/o0/ZH5kVkZwlx08ubJwg28w0104120vhisy0E0c0.mp4?label=mp4_2160p60&template=3840x2160.23.0&media_id=5250046363631919&tp=8x8A3El:YTkl0eM8&us=0&ori=1&bf=2&ot=h&ps=3lckmu&uid=8YcayF&ab=,15568-g4,8012-g2,3601-g42,8013-g0&Expires=1773068400&ssig=ZvuF3L9fEp&KID=unistore,video",
          "超清 2K60": "//f.video.weibocdn.com/o0/0OcaV2Fclx08ubJv31Pi0104120eGwdF0E060.mp4?label=mp4_1440p60&template=2560x1440.23.0&media_id=5250046363631919&tp=8x8A3El:YTkl0eM8&us=0&ori=1&bf=2&ot=h&ps=3lckmu&uid=8YcayF&ab=,15568-g4,8012-g2,3601-g42,8013-g0&Expires=1773068400&ssig=o%2F8wO%2BLXvV&KID=unistore,video",
          "高清 1080P": "//f.video.weibocdn.com/o0/ikU9xlnmlx08ubJlE0WI01041206Js7k0E030.mp4?label=mp4_1080p&template=1920x1080.25.0&media_id=5250046363631919&tp=8x8A3El:YTkl0eM8&us=0&ori=1&bf=2&ot=h&ps=3lckmu&uid=8YcayF&ab=,15568-g4,8012-g2,3601-g42,8013-g0&Expires=1773068400&ssig=BotC31GGVd&KID=unistore,video",
          "高清 720P": "//f.video.weibocdn.com/o0/XKxrjTmulx08ubJkYYVW01041203CbBR0E020.mp4?label=mp4_720p&template=1280x720.25.0&media_id=5250046363631919&tp=8x8A3El:YTkl0eM8&us=0&ori=1&bf=2&ot=h&ps=3lckmu&uid=8YcayF&ab=,15568-g4,8012-g2,3601-g42,8013-g0&Expires=1773068400&ssig=mo%2BRKfr%2F26&KID=unistore,video",
          "标清 480P": "//f.video.weibocdn.com/o0/p9fZ3tIulx08ubJkItbi01041201WraS0E010.mp4?label=mp4_hd&template=852x480.25.0&media_id=5250046363631919&tp=8x8A3El:YTkl0eM8&us=0&ori=1&bf=2&ot=h&ps=3lckmu&uid=8YcayF&ab=,15568-g4,8012-g2,3601-g42,8013-g0&Expires=1773068400&ssig=AiCL0RbKDY&KID=unistore,video"
        },
        "cover_image": "//wx3.sinaimg.cn/orj480/894e4899ly1i8ugp79vhbj20u00gxjxx.jpg",
        "duration": "3:53",
        "duration_time": 233.755,
        "play_start": 0,
        "play_start_time": 0,
        "topics": null,
        "uuid": "5250047154585765",
        "text": "开箱新年礼物,华为乾崑加持的奥迪现在强得可怕,新年平安快乐!各位<img src=\"//face.t.sinajs.cn/t4/appstyle/expression/ext/normal/67/201810_ganbei_mobile.png\" title=\"[干杯]\" alt=\"[干杯]\" />  ​",
        "url_short": "http://t.cn/AX4rMjdF",
        "is_show_bulletin": 2,
        "comment_manage_info": {
          "comment_permission_type": -1,
          "approval_comment_type": 0,
          "comment_sort_type": 0
        },
        "video_orientation": "horizontal",
        "is_contribution": 0,
        "live": false,
        "scrubber": [],
        "cooperate_video": 0,
        "is_pay_audio": 0,
        "is_paid": false,
        "display_duration": null,
        "gov_like_icon_data": null,
        "spotlights": null,
        "stream_url": "http://f.video.weibocdn.com/o0/760AYdPJlx08ubJkkIwM01041201eVLf0E010.mp4?label=mp4_ld&template=640x360.25.0&ori=0&ps=IrBRQDE1x2Uj&Expires=1773068400&ssig=OcJnGHoyfd&KID=unistore,video",
        "object_type": "video",
        "play_count": "407万",
        "ip_info_str": "发布于 北京",
        "attitude_dynamic_adid": "",
        "user_video_count": 79,
        "allow_comment": true,
        "reward": {
          "version_state": 1,
          "state": 1,
          "welfare": 0,
          "desc": "点赞是美意,赞赏是鼓励",
          "reward_button_scheme": "https://reward.media.weibo.com/v1/public/h5/pay/reward?bid=1000303201&oid=5250047550692533&rewardsource=2&seller=2303608985&showmenu=0&topnavstyle=1&sign=8504371ba955db7807fef3e7e0db914c",
          "reward_params": "bid=1000303201&oid=5250047550692533&rewardsource=2&seller=2303608985&showmenu=0&topnavstyle=1&sign=8504371ba955db7807fef3e7e0db914c",
          "mid": "5250047550692533",
          "user": {
            "id": 2303608985,
            "idstr": "2303608985",
            "class": 1,
            "screen_name": "终极小腾",
            "name": "终极小腾",
            "province": "11",
            "city": "1000",
            "location": "北京",
            "description": "最开眼的汽车视频 工作事宜:[email protected]",
            "url": "",
            "profile_image_url": "https://tvax2.sinaimg.cn/crop.0.0.1080.1080.50/894e4899ly8i334gjloqej20u00u076u.jpg?KID=imgbed,tva&Expires=1773075601&ssig=gYQUtNDylr",
            "light_ring": false,
            "cover_image": "https://ww1.sinaimg.cn/crop.0.0.920.300/894e4899jw1f182tp8121j20pk08cdko.jpg",
            "cover_image_phone": "https://wx1.sinaimg.cn/crop.0.0.640.640.640/894e4899ly1hczk5mdln5j20u00u0q5g.jpg",
            "profile_url": "u/2303608985",
            "domain": "",
            "weihao": "",
            "gender": "m",
            "followers_count": 2216912,
            "followers_count_str": "221.7万",
            "friends_count": 156,
            "pagefriends_count": 8,
            "statuses_count": 1695,
            "video_status_count": 327,
            "video_play_count": 0,
            "super_topic_not_syn_count": 0,
            "favourites_count": 795,
            "created_at": "Thu Aug 25 11:31:43 +0800 2011",
            "following": false,
            "allow_all_act_msg": false,
            "geo_enabled": true,
            "verified": true,
            "verified_type": 0,
            "remark": "",
            "insecurity": {
              "sexual_content": false
            },
            "ptype": 0,
            "allow_all_comment": true,
            "avatar_large": "https://tvax2.sinaimg.cn/crop.0.0.1080.1080.180/894e4899ly8i334gjloqej20u00u076u.jpg?KID=imgbed,tva&Expires=1773075601&ssig=VrOFDMvyXZ",
            "avatar_hd": "https://tvax2.sinaimg.cn/crop.0.0.1080.1080.1024/894e4899ly8i334gjloqej20u00u076u.jpg?KID=imgbed,tva&Expires=1773075601&ssig=wVI0CHyTL6",
            "verified_reason": "汽车博主 微博原创视频博主",
            "verified_trade": "",
            "verified_reason_url": "",
            "verified_source": "",
            "verified_source_url": "",
            "verified_state": 0,
            "verified_level": 3,
            "verified_type_ext": 2,
            "has_service_tel": false,
            "verified_reason_modified": "",
            "verified_contact_name": "",
            "verified_contact_email": "",
            "verified_contact_mobile": "",
            "follow_me": false,
            "like": false,
            "like_me": false,
            "online_status": 0,
            "bi_followers_count": 132,
            "lang": "zh-cn",
            "star": 0,
            "mbtype": 12,
            "mbrank": 2,
            "svip": 1,
            "vvip": 1,
            "mb_expire_time": 1778428800,
            "block_word": 0,
            "block_app": 1,
            "chaohua_ability": 0,
            "brand_ability": 0,
            "nft_ability": 0,
            "vplus_ability": 0,
            "wenda_ability": 0,
            "live_ability": 0,
            "gongyi_ability": 0,
            "paycolumn_ability": 0,
            "newbrand_ability": 0,
            "ecommerce_ability": 0,
            "hardfan_ability": 1,
            "wbcolumn_ability": 0,
            "interaction_user": 0,
            "audio_ability": 2,
            "place_ability": 1,
            "credit_score": 80,
            "user_ability": 10749448,
            "cardid": "star_003",
            "urank": 36,
            "story_read_state": -1,
            "verified_detail": {
              "custom": 0,
              "data": [
                {
                  "key": 2,
                  "sub_key": 0,
                  "weight": 101,
                  "desc": "汽车博主",
                  "timestamp": 0
                },
                {
                  "key": 16,
                  "sub_key": 1,
                  "weight": 103,
                  "desc": "微博原创视频博主",
                  "timestamp": 0
                }
              ]
            },
            "vclub_member": 0,
            "is_teenager": 0,
            "is_guardian": 0,
            "is_teenager_list": 0,
            "pc_new": 7,
            "special_follow": false,
            "planet_video": 2,
            "video_mark": 15,
            "live_status": 0,
            "user_ability_extend": 67,
            "status_total_counter": {
              "total_cnt": 1490883,
              "repost_cnt": 101604,
              "comment_cnt": 169957,
              "like_cnt": 1104554,
              "comment_like_cnt": 114768
            },
            "video_total_counter": {
              "play_cnt": 160762712
            },
            "brand_account": 0,
            "hongbaofei": 0,
            "green_mode": 0,
            "green_mode_source": 0,
            "delete_mode_time": 0,
            "urisk": 8796093022208,
            "unfollowing_recom_switch": 1,
            "block": 0,
            "block_me": 0,
            "avatar_type": 0,
            "is_big": 0,
            "auth_status": 2,
            "auth_realname": null,
            "auth_career": null,
            "auth_career_name": null,
            "show_auth": 0,
            "is_auth": 1,
            "is_punish": 0,
            "avatar_hd_pid": "894e4899ly8i334gjloqej20u00u076u",
            "like_display": 0,
            "comment_display": 0
          }
        }
      }
    }
  }
}

💡 提示:为简化展示,列表类数据样例仅保留 1-2 条记录,实际返回条数以接口响应为准。