周边路况查询
GET
/traffic/v1/around
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'https://api.map.baidu.com/traffic/v1/around?center=39.912078,116.464303&radius=200&ak=&sn='
响应示例响应示例
{
"status": 0,
"message": "成功",
"description": "该区域整体拥堵。京包高速:北向南,从开拓路5到京新高速拥堵。京新上地桥:北向南,京新上地桥拥堵。京新高速:北向南,从京包高速到耳通百安拥堵。小营西路:西向东,上地三街附近拥堵。",
"evaluation": {
"status": 3,
"status_desc": "拥堵"
},
"road_traffic": [
{
"road_name": "UNKNOW"
},
{
"road_name": "上地三街"
},
{
"road_name": "上地三街辅路"
},
{
"road_name": "上地东路"
},
{
"road_name": "上地五街"
},
{
"road_name": "上地六街"
},
{
"road_name": "上地四街"
},
{
"congestion_sections": [
{
"congestion_distance": 1870,
"speed": 8.45,
"status": 3,
"congestion_trend": "持平",
"section_desc": "北向南,从开拓路5到京新高速",
}
],
"road_name": "京包高速"
},
{
"congestion_sections": [
{
"congestion_distance": 1610,
"speed": 7.79,
"status": 3,
"congestion_trend": "持平",
"section_desc": "北向南,京新上地桥",
}
],
"road_name": "京新上地桥"
},
{
"congestion_sections": [
{
"congestion_distance": 1870,
"speed": 8.45,
"status": 3,
"congestion_trend": "持平",
"section_desc": "北向南,从京包高速到耳通百安",
}
],
"road_name": "京新高速"
},
{
"road_name": "信息路"
},
{
"road_name": "创业路"
},
{
"road_name": "安宁庄西一条"
},
{
"road_name": "安宁庄西三条"
},
{
"road_name": "安宁庄西二条"
},
{
"road_name": "安宁庄路"
},
{
"congestion_sections": [
{
"congestion_distance": 760,
"speed": 6.39,
"status": 3,
"congestion_trend": "加重",
"section_desc": "西向东,上地三街附近",
}
],
"road_name": "小营西路"
},
{
"road_name": "小营西路辅路"
},
{
"road_name": "开拓路"
}
]
}
请求参数
Query 参数
center
string
必需
示例值:
39.912078,116.464303
radius
string
必需
示例值:
200
coord_type_input
string
可选
示例值:
gcj02
coord_type_output
string
可选
示例值:
gcj02
road_grade
string
可选
ak
string
必需
默认值:
{{ak}}
sn
string
可选
默认值:
{{sn}}
返回响应
修改于 2022-08-22 02:56:04