COST
扣费规则
items 表示本次响应实际返回的记录条数,按记录数计算后再应用最低扣费。
按本页返回条数计费,0.05 额度/条,向上取整,最低扣费额度为 1
实际扣费以响应头 x-api-cost 为准;请求失败时也可能触发最低扣费。
请求说明
参数
查询参数
datestring 必填
日期,格式为 YYYYMMDD。
示例:582660425
limitinteger
正整数分页大小;当请求值超过服务端配置上限时,服务端会自动截断。
示例:20
cursorstring
分页游标。
示例:1741996800:1024
响应说明
状态码与响应格式
200
一页每日记录数据。
响应头
x-api-remainx-api-cost
application/jsonobject
响应结构
{
"type": "object",
"required": [
"ok",
"data",
"error"
],
"properties": {
"ok": {
"type": "boolean",
"required": true
},
"data": {
"type": "object",
"required": true,
"shape": {
"type": "object",
"required": [
"date",
"cursor",
"limit",
"nextCursor",
"items"
],
"properties": {
"date": {
"type": "string",
"required": true
},
"cursor": {
"type": "string",
"required": true
},
"limit": {
"type": "integer",
"required": true
},
"nextCursor": {
"type": "string",
"required": true
},
"items": {
"type": "array<object>",
"required": true,
"shape": {
"type": "array",
"items": {
"type": "object",
"required": [
"startAt",
"endAt",
"id",
"emuCode",
"trainCode",
"startStation",
"endStation",
"line"
],
"properties": {
"startAt": {
"type": "integer",
"required": true
},
"endAt": {
"type": "integer",
"required": true
},
"id": {
"type": "string",
"required": true
},
"emuCode": {
"type": "string",
"required": true
},
"trainCode": {
"type": "string",
"required": true
},
"startStation": {
"type": "string",
"required": true
},
"endStation": {
"type": "string",
"required": true
},
"line": {
"type": "array<string>",
"required": true,
"shape": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
},
"error": {
"type": "string",
"required": true
}
}
}示例响应
{
"ok": true,
"data": {
"date": "20260321",
"cursor": "",
"limit": 20,
"nextCursor": "1741996800:15231",
"items": [
{
"startAt": 1774060020,
"endAt": 1774089060,
"id": "5201314",
"emuCode": "CRH2C-1-2070",
"trainCode": "G8388",
"startStation": "上海",
"endStation": "上海南",
"line": []
}
]
},
"error": ""
}400
查询参数不合法。
响应头
x-api-remainx-api-cost
application/jsonobject
响应结构
{
"type": "object",
"required": [
"ok",
"data",
"error"
],
"properties": {
"ok": {
"type": "boolean",
"required": true
},
"data": {
"type": "string",
"required": true
},
"error": {
"type": "string",
"required": true
}
}
}示例响应
{
"ok": false,
"data": "date 必须使用 YYYYMMDD 格式。",
"error": "invalid_param"
}