Appearance
周边推荐
根据当前所在位置,返回推荐的附近 POI(Point of Interest,兴趣点)点数组
周边推荐 API
接口描述
根据当前所在位置,返回推荐的附近 POI 点数组。
请求方式
| URL | 请求方式 |
|---|---|
| https://lbs.xiaojukeji.com/api/v2/aroundrecommend | POST、GET |
请求
查询参数(GET)
| 参数名 | 必选 | 类型 | 描述 | 示例值 |
|---|---|---|---|---|
| key | 是 | string | 鉴权用的 API Key | YOUR_API_KEY |
| location | 否 | string | 所在地的经纬度,格式'lng,lat',(经度,纬度) | 116.314230,39.979392 |
请求体参数(POST)
当使用POST方法时,请求体应为 AroundRecommendRequest 模型的JSON格式。
请求示例
GET
shell
curl -X GET "https://lbs.xiaojukeji.com/api/v2/aroundrecommend?key=YOUR_API_KEY&location=116.314230,39.979392"POST
shell
curl -X POST "https://lbs.xiaojukeji.com/api/v2/aroundrecommend?key=YOUR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"location": "116.314230,39.979392"
}'响应
成功响应为 AroundRecommendResponse 模型的JSON格式。
响应示例
json
{
"status": 10000,
"msg": "OK",
"trace_id": "ac19706768c3ab9f0dc83c35990c12b0",
"results": [
{
"poi_id": "102690491766161346620470421407705979491",
"name": "北京中关村领展广场",
"address": "北京市海淀区丹棱街甲1号",
"type": "131000",
"location": {
"lng": 116.31423038782228,
"lat": 39.97939241283731
},
"distance": 0,
"province": "北京市",
"city": "北京市",
"district": "海淀区"
}
]
}