Query Live Calendar
Updated: 2026-07-23 14:37:39
API Description
1、按时间范围查询账号下的直播安排(直播日历),返回时间范围内逐日的直播列表
2、仅返回已设置直播时间的频道;开启了系列直播(多场次)的频道,按场次返回,并携带场次ID和场次名称
3、接口支持https协议
API URL
https://api.polyv.net/live/v4/user/live-calendar/list
Request Method
GET
API Constraints
- The API supports both HTTP and HTTPS. HTTPS is recommended for security. API calls have frequency limits. See details
startDateandendDateare required.startDatemust not be greater thanendDate, and the query span must not exceed 35 days.- The calendar only includes channels with scheduled live times. Channels without scheduled live times will not appear in the results.
- The results cover the entire query interval by day. When there is no live event on a given day,
liveswill be an empty array.
Request Parameter Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | true | String | Account appId See details on obtaining keys |
| timestamp | true | Long | Current 13-digit millisecond timestamp, valid for 3 minutes |
| sign | true | String | Signature, a 32-character uppercase MD5 value. The appSecret key used to generate the signature is critical for communication data security. It must never be stored or used directly on the client side. All APIs must be called through the customer's own server to relay requests to the POLYV server for response data. See signature generation rules |
| startDate | true | String | Query start date, format: yyyy-MM-dd |
| endDate | true | String | Query end date, format: yyyy-MM-dd. Must be greater than or equal to startDate, and the span must not exceed 35 days. |
Example
https://api.polyv.net/live/v4/user/live-calendar/list?appId=frlr1zazn3×tamp=1720406400000&startDate=2026-08-01&endDate=2026-08-03&sign=14A0FA6A31D03D9D1164F55A14E6DB5B
Response Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Response status code. 200 indicates success, non-200 indicates failure. |
| status | String | Response result, determined by business logic. Returns success on success, error on failure. |
| success | Boolean | Response result, determined by business logic. Returns true on success, false on failure. |
| data | Object | Live calendar information See data field description |
| error | Object | Error information when status code is not 200 See Error field description |
| requestId | String | Request ID, a unique UUID generated for each request. Only used for troubleshooting and debugging, should not be tied to business logic. |
Error Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Error code, used to determine the specific error cause. |
| desc | String | Error description, corresponding to error.code. |
data Parameter Description
| Parameter | Type | Description |
|---|---|---|
| dailyLiveSchedules | Array | List of live schedules grouped by day. Each day within the query interval will return an entry See dailyLiveSchedules field description |
dailyLiveSchedules Parameter Description
| Parameter | Type | Description |
|---|---|---|
| date | String | Date, format: yyyy-MM-dd |
| lives | Array | List of live events for the day, sorted by start time in ascending order. Empty array if no live events on that day See lives field description |
lives Parameter Description
| Parameter | Type | Description |
|---|---|---|
| channelId | Integer | Channel ID |
| channelName | String | Channel name |
| sessionId | String | Session ID. Only returned for channels with series live (multiple sessions). Returns null if not enabled. |
| sessionName | String | Session name. Only returned for channels with series live (multiple sessions). Returns null if not enabled. |
| startTime | Long | Live start time, 13-digit millisecond timestamp |
| endTime | Long | Live end time, 13-digit millisecond timestamp. Returns null if end time is not set. |
| teacherName | String | Presenter nickname. Returns null if not set. |
| teacherActor | String | Presenter title. Returns null if not set. |
| teacherAvatar | String | Presenter avatar URL. Returns null if not set. |
| status | String | Live status See live status description |
Live Status Description
| status | Description |
|---|---|
| live | Currently live |
| pause | Paused |
| playback | Live replay |
| waiting | Waiting to go live |
| unStart | Not started |
| end | Live ended |
| testing | Testing |
| banpush | Banned from streaming |
| expired | Expired |
Java Request Example
For quick integration of basic code, please download the relevant dependency source code. Click here to download the source code. After downloading, add it to your own source project. The test cases include HttpUtil.java and LiveSignUtil.java in the downloaded file.
It is strongly recommended to use the Live Java SDK for API integration. The Live Java SDK provides unified encapsulation and optimization for API call logic, exception handling, data signing, and HTTP request thread pools.
private static final Logger log = LoggerFactory.getLogger(UserTest.class);
/**
* 查询直播日历
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void testListLiveCalendar() throws IOException, NoSuchAlgorithmException {
// 公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String timestamp = String.valueOf(System.currentTimeMillis());
// 业务参数
String url = "https://api.polyv.net/live/v4/user/live-calendar/list";
// http调用逻辑
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("startDate", "2026-08-01");
requestMap.put("endDate", "2026-08-03");
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
String response = HttpUtil.get(url, requestMap);
log.info("测试查询直播日历成功:{}", response);
// do somethings
}
Response Example
For global system error descriptions, see Global Error Description
Success Example
{
"code": 200,
"status": "success",
"requestId": "7c4ef056-1f32-4dfe-a970-5d29515ab600",
"data": {
"dailyLiveSchedules": [
{
"date": "2026-08-01",
"lives": [
{
"channelId": 1234567,
"channelName": "8月新品发布会",
"sessionId": null,
"sessionName": null,
"startTime": 1785000000000,
"endTime": 1785010800000,
"teacherName": "张三",
"teacherActor": "讲师",
"teacherAvatar": "//s1.videocc.net/default-img/avatar/teacher.png",
"status": "waiting"
}
]
},
{
"date": "2026-08-02",
"lives": [
{
"channelId": 7654321,
"channelName": "8月系列课",
"sessionId": "hklgq621x0",
"sessionName": "第一场",
"startTime": 1785088800000,
"endTime": 1785096000000,
"teacherName": "李四",
"teacherActor": "讲师",
"teacherAvatar": "//s1.videocc.net/default-img/avatar/teacher.png",
"status": "unStart"
}
]
},
{
"date": "2026-08-03",
"lives": []
}
]
},
"success": true
}
Error Example
{
"code": 400,
"status": "error",
"requestId": "d310b70bc329403f87f77f9203d50f89.128.16360831552223589",
"error": {
"code": 10001,
"desc": "开始日期不能大于结束日期,且查询跨度不能超过35天"
},
"success": false
}
