文档中心 > API类目 > 本地生活API

alibaba.eleme.groupvp.tblive.liveroom (获取淘宝直播直播间信息)

获取淘宝直播直播间信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_list String [] 可选 1
  • 最大列表长度:999
  • 直播间id集合
    param_live_room_read_option_request LiveRoomReadOptionRequest 可选 系统自动生成
    • └ include_anchor_type
    • Boolean
    • 可选
    • false
    • 是否包含主播身份
    • └ include_statistic
    • Boolean
    • 可选
    • false
    • 是否包含统计数据,只有指定true才会返回下文的statistic信息
    • └ include_stream_info
    • Boolean
    • 可选
    • false
    • 是否包含流信息,只有指定true才会返回下文的stream信息
    • └ pool_id
    • Number
    • 可选
    • 1
    • 1
    • └ use_cache
    • Boolean
    • 可选
    • false
    • 是否走缓存

    响应参数

    名称 类型 示例值 描述
    result LiveRoomResponse 返回参数
    • live_room_dto_list
    • LiveRoomDto []
    • 返回参数
    • └ anchor_id
    • Number
    • s
    • 主播ID
    • └ anchor_logo
    • String
    • a
    • 主播logo
    • └ anchor_nick
    • String
    • a
    • 主播昵称
    • └ anchor_type
    • String
    • 1
    • 主播身份 判断优先级只取一个
    • └ anchor_types
    • String []
    • 主播所有身份 shop, daren
    • └ cover16x9_url
    • String
    • 1
    • 16x9封面链接
    • └ cover1x1_url
    • String
    • 1
    • 1x1封面链接
    • └ cover9x16_url
    • String
    • 1
    • 9x16封面图
    • feature
    • Feature
    • 1
    • 业务方扩展字段
    • └ empty
    • Boolean
    • 1
    • 返回参数
    • └ id
    • Number
    • 1
    • 直播内容Id
    • └ item_ids
    • Number []
    • 直播间商品ID列表
    • └ land_scape
    • Boolean
    • false
    • 是否横屏
    • └ live_appointment_time
    • Date
    • 2023-03-20 12:00:00
    • 返回参数
    • └ live_channel_id
    • Number
    • 1
    • 直播频道id
    • └ live_column_id
    • Number
    • 1
    • 直播栏目id
    • └ live_end_time
    • Date
    • 2023-03-20 12:00:00
    • 直播结束时间
    • └ live_room_status
    • Number
    • 1
    • 直播间状态:0=预告,1=直播中,2=直播结束(回放
    • └ live_start_time
    • Date
    • 2023-03-20 12:00:00
    • 直播开始时间
    • └ live_uuid
    • String
    • 1
    • 直播间唯一标识
    • └ location
    • String
    • 1
    • 直播地理位置
    • └ pre_video_id
    • String
    • 1
    • 预告视频ID
    • └ pre_video_url
    • String
    • 1
    • 预告视频播放地址
    • statistic
    • StatisticDto
    • 统计信息
    • └ praise_count
    • Number
    • 1
    • 点赞次数
    • └ pv_count
    • Number
    • 1
    • 观看次数
    • └ status
    • Number
    • 1
    • 直播内容状态:0=正常,-1=用户删除,-2=小二删除
    • stream
    • StreamDto
    • 流信息
    • └ input_code_level
    • Number
    • 1
    • 推流码率
    • └ input_stream_url
    • String
    • 1
    • 推流地址
    • └ live_h_l_s_url
    • String
    • 1
    • 原始HLS直播地址
    • └ live_id
    • String
    • 1
    • 直播ID
    • └ live_url
    • String
    • 1
    • 直播地址:直播间的流媒体的地址
    • └ original_input_stream_url
    • String
    • 1
    • 原始推流地址
    • └ playback_url
    • String
    • http:\\livecaing.alicdn.com\/mediaplatform\/99879e77-533e-4d27-a6e0-98e0943ed0bd.m3u8","pull_stream_url":"rtmp:\/\/liveca.alicdn.com\/mediaplatform\/99879e77-533e-4d27-a6e0-98e0943ed0bd?auth_key=1660385653-0-0-b8b2f551a0739a2ae6e56d4274f75158
    • 回放地址
    • └ pull_stream_url
    • String
    • http:\\livecaing.alicdn.com\/mediaplatform\/99879e77-533e-4d27-a6e0-98e0943ed0bd.m3u8","pull_stream_url":"rtmp:\/\/liveca.alicdn.com\/mediaplatform\/99879e77-533e-4d27-a6e0-98e0943ed0bd?auth_key=1660385653-0-0-b8b2f551a0739a2ae6e56d4274f75158
    • 拉流地址
    • └ security_input_stream_url
    • String
    • http:\\livecaing.alicdn.com\/mediaplatform\/99879e77-533e-4d27-a6e0-98e0943ed0bd.m3u8","pull_stream_url":"rtmp:\/\/liveca.alicdn.com\/mediaplatform\/99879e77-533e-4d27-a6e0-98e0943ed0bd?auth_key=1660385653-0-0-b8b2f551a0739a2ae6e56d4274f75158
    • 安全的推流地址
    • └ stream_name
    • String
    • 1
    • 流名称
    • └ stream_status
    • Number
    • 1
    • 流状态 0断流,1推流,默认为0
    • └ summary
    • String
    • 1
    • 直播间简介
    • └ title
    • String
    • 1
    • 直播间标题

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    AlibabaElemeGroupvpTbliveLiveroomRequest req = new AlibabaElemeGroupvpTbliveLiveroomRequest();
    req.setParamList("1");
    AlibabaElemeGroupvpTbliveLiveroomRequest.LiveRoomReadOptionRequest obj1 = new AlibabaElemeGroupvpTbliveLiveroomRequest.LiveRoomReadOptionRequest();
    obj1.setIncludeAnchorType(false);
    obj1.setIncludeStatistic(false);
    obj1.setIncludeStreamInfo(false);
    obj1.setPoolId(1L);
    obj1.setUseCache(false);
    req.setParamLiveRoomReadOptionRequest(obj1);
    AlibabaElemeGroupvpTbliveLiveroomResponse rsp = client.execute(req);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <alibaba_eleme_groupvp_tblive_liveroom_response>
        <result>
            <live_room_dto_list>
                <live_room_dto>
                    <anchor_id>s</anchor_id>
                    <anchor_logo>a</anchor_logo>
                    <anchor_nick>a</anchor_nick>
                    <anchor_type>1</anchor_type>
                    <anchor_types>
                        <string></string>
                    </anchor_types>
                    <cover16x9_url>1</cover16x9_url>
                    <cover1x1_url>1</cover1x1_url>
                    <cover9x16_url>1</cover9x16_url>
                    <feature>
                        <empty>1</empty>
                    </feature>
                    <id>1</id>
                    <item_ids>
                        <number></number>
                    </item_ids>
                    <land_scape>false</land_scape>
                    <live_appointment_time>2023-03-20 12:00:00</live_appointment_time>
                    <live_channel_id>1</live_channel_id>
                    <live_column_id>1</live_column_id>
                    <live_end_time>2023-03-20 12:00:00</live_end_time>
                    <live_room_status>1</live_room_status>
                    <live_start_time>2023-03-20 12:00:00</live_start_time>
                    <live_uuid>1</live_uuid>
                    <location>1</location>
                    <pre_video_id>1</pre_video_id>
                    <pre_video_url>1</pre_video_url>
                    <statistic>
                        <praise_count>1</praise_count>
                        <pv_count>1</pv_count>
                    </statistic>
                    <status>1</status>
                    <stream>
                        <input_code_level>1</input_code_level>
                        <input_stream_url>1</input_stream_url>
                        <live_h_l_s_url>1</live_h_l_s_url>
                        <live_id>1</live_id>
                        <live_url>1</live_url>
                        <original_input_stream_url>1</original_input_stream_url>
                        <playback_url>http:\\livecaing.alicdn.com\/mediaplatform\/99879e77-533e-4d27-a6e0-98e0943ed0bd.m3u8&quot;,&quot;pull_stream_url&quot;:&quot;rtmp:\/\/liveca.alicdn.com\/mediaplatform\/99879e77-533e-4d27-a6e0-98e0943ed0bd?auth_key=1660385653-0-0-b8b2f551a0739a2ae6e56d4274f75158</playback_url>
                        <pull_stream_url>http:\\livecaing.alicdn.com\/mediaplatform\/99879e77-533e-4d27-a6e0-98e0943ed0bd.m3u8&quot;,&quot;pull_stream_url&quot;:&quot;rtmp:\/\/liveca.alicdn.com\/mediaplatform\/99879e77-533e-4d27-a6e0-98e0943ed0bd?auth_key=1660385653-0-0-b8b2f551a0739a2ae6e56d4274f75158</pull_stream_url>
                        <security_input_stream_url>http:\\livecaing.alicdn.com\/mediaplatform\/99879e77-533e-4d27-a6e0-98e0943ed0bd.m3u8&quot;,&quot;pull_stream_url&quot;:&quot;rtmp:\/\/liveca.alicdn.com\/mediaplatform\/99879e77-533e-4d27-a6e0-98e0943ed0bd?auth_key=1660385653-0-0-b8b2f551a0739a2ae6e56d4274f75158</security_input_stream_url>
                        <stream_name>1</stream_name>
                        <stream_status>1</stream_status>
                    </stream>
                    <summary>1</summary>
                    <title>1</title>
                </live_room_dto>
            </live_room_dto_list>
        </result>
    </alibaba_eleme_groupvp_tblive_liveroom_response>

    异常示例

    • XML示例
    • JSON示例
    <error_response>
        <code>50</code>
        <msg>Remote service error</msg>
        <sub_code>isv.invalid-parameter</sub_code>
        <sub_msg>非法参数</sub_msg>
    </error_response>

    错误码解释

    错误码 错误描述 解决方案

    API工具

    如何获得此API

    FAQ

    返回
    顶部