道路路况查询
GET
/traffic/v1/road
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'https://api.map.baidu.com/traffic/v1/road?road_name=东二环&city=北京市&ak=&sn='
响应示例响应示例
{
status: 0,
message: "成功",
description: "北五环:自东向西较为畅通;自西向东畅通;东向西,佳全教会附近拥堵。",
evaluation: {
status: 1,
status_desc: "自东向西较为畅通;自西向东畅通"
},
road_traffic: [{
congestion_sections: [{
congestion_distance: 780,
speed: 13.45,
status: 3,
congestion_trend: "加重",
section_desc: "东向西,佳全教会附近"
}],
road_name: "北五环"
}]
}
请求参数
Query 参数
road_name
string
必需
示例值:
东二环
city
string
必需
示例值:
北京市
ak
string
必需
默认值:
{{ak}}
sn
string
可选
默认值:
{{sn}}
返回响应
修改于 2022-08-22 02:55:54