接口描述
请求路径:https://mapapi-places.apigw-gz.didiyunapi.com/api/v1/place/polygon
请求方法:GET
输入参数
参数名称 | 必填 | 默认值 | 说明 |
---|---|---|---|
polygon | 是 | 无 | lng,lat|lng,lat|…。经纬度小数点后不超过6位。至少3个坐标对;最多100个坐标对。 |
keywords | 是 | 无 | 搜索关键词,keywords与categories必填其一。 |
categories | 是 | 无 | 搜索POI类型编码或者名称,最多5个,类型之间“|”分隔,详见滴滴POI类型列表。也支持品牌和风味编码。输入时POI分类编码请添加大写字母 C 前缀;品牌分类编码请添加大写字母 B 前缀;风味分类编码请添加大写字母 F 前缀。keywords与categories必填其一。 |
city | 否 | 无 | 优先返回city指定城市的结果。支持省、市中文、全拼、adcode格式输入;若不输入city,则进行全国范围搜索 |
page_index | 否 | 1 | 当前页数,最多100页,最多返回1000个结果。 |
page_size | 否 | 20 | 每页POI个数,最大50 |
extensions | 否 | false | 除返回POI基本信息外,是否返回详细信息,返回详细信息收费更高。 |
children | 否 | 0 | 指定显示子POI的方式:0(归类到父POI之中,折叠显示),1(子POI单独显示);目前只支持0 |
输出参数
参数名称 | 类型 | 描述 |
---|---|---|
status | int | 状态码 |
info | string | 状态说明 |
result | Result | 请求返回数据 |
Result:
参数名称 | 类型 | 描述 |
---|---|---|
suggestion | Suggestion | 泛搜索的时候,将显示城市列表 |
pois | array<Poi> | poi列表 |
is_current_city | int | |
target_city | string | |
target_city_name | string | |
count | int | 结果poi总数量,最多1000个 |
Suggestion:
参数名称 | 类型 | 描述 |
---|---|---|
cities | array<City> | 城市列表 |
City:
参数名称 | 类型 | 描述 |
---|---|---|
name | string | 城市名 |
num | int | 该城市包含搜索关键词的个数 |
adcode | string | 该城市的adcode |
Poi:
参数名称 | 类型 | 描述 |
---|---|---|
id | string | 滴滴poi id |
parent | int | |
name | string | 名称 |
category | string | poi类型 |
category_code | string | poi类型编码 |
address | string | 地址 |
location | string | 经纬度 |
distance | string | 周边检索时离中心点距离 |
provincecode | string | poi所在省编码 |
provincename | string | poi所在省名称 |
citycode | string | poi所在城市编码 |
cityname | string | poi所在城市名称 |
adcode | string | poi所在区县编码 |
adname | string | poi所在区县名称 |
tel | string | 电话 |
postcode | string | 邮编 |
website | string | 网站 |
string | 邮箱 | |
entr_location | string | 入口经纬度 |
exit_location | string | 出口经纬度 |
navi_location | string | poi对应的导航引导点坐标 |
alias | string | 别名 |
brand | string | 品牌 |
brand_code | string | 品牌编码 |
food_type | string | 风味类型 |
food_type_code | string | 风味类型编码 |
business_area | string | 所在商圈 |
parking_type | string | 停车场类型:地下,地面,路边等 |
indoor_map | Indoor | 室内地图相关数据 |
deep_info | DeepInfo | |
photos | array<Photo> | 照片相关信息 |
subpois | array<SubPoi> |
Indoor:
参数名称 | 类型 | 描述 |
---|---|---|
cpid | string | 父poi id |
floor | string | 楼层索引,一般数字表示,例如8 |
truefloor | string | 所在楼层,例如F8 |
DeepInfo:
参数名称 | 类型 | 描述 |
---|---|---|
rating | string | 评价 |
cost | string | 人均消费,景点门票等 |
price | string | 景点门票,酒店起步价 |
price_highest | string | 酒店最高价 |
star | string | 星级标准 |
service | string | 服务评分 |
wifi | string | 是否有wifi |
opentime | string | 营业时间 |
is_24h | int | 是否24小时 |
is_open | int | 现在是否在营业 |
intro | string | 介绍 |
Pohto:
参数名称 | 类型 | 描述 |
---|---|---|
title | string | 图片介绍 |
url | string | 具体链接 |
height | int | 图片高度 |
width | int | 图片宽度 |
SubPoi:
参数名称 | 类型 | 描述 |
---|---|---|
id | string | 滴滴poi id |
name | string | 名称 |
address | string | 地址 |
location | string | 经纬度 |
provincename | string | poi所在省名称 |
cityname | string | poi所在城市名称 |
adcode | string | poi所在区县编码 |
adname | string |
错误码
示例
请求:
curl -X GET \
'https://mapapi-places.apigw-gz.didiyunapi.com/api/v1/place/polygon?polygon=116.520402,39.966272|116.570994,39.951671|116.46061,39.918477&keywords=%E4%B8%89%E5%85%83%E6%A1%A5'\
--header 'Authorization: AppCode XXX'
输出:
{
"status": 0,
"info": "OK",
"result": {
"count": 1,
"pois": [
{
"business_area": "北京西城商贸区",
"indoor_map": {
"cpid": "2000000000000028664",
"floor": 8,
"truefloor": "F8"
},
"provincename": "北京",
"adname": "西城区",
"distance": 15.1,
"category_code": "100000",
"food_type": "川菜",
"entr_location": "116.364881,39.906314",
"navi_location": "116.364881,39.906314",
"subpois": [
{
"name": "名称",
"cityname": "北京",
"adcode": 110102,
"category": "美食",
"location": "116.364881,39.906314",
"id": "2000000000000028666",
"adname": "西城区",
"provincename": "北京",
"address": "北京市西城区复兴门内大街28号"
}
],
"parent": "2000000000000028665",
"address": "北京市西城区复兴门内大街28号",
"tel": "18010127781",
"brand_code": "100000",
"citycode": "010",
"name": "凯晨世贸中心",
"alias": "凯晨",
"brand": "办公楼",
"photos": [
{
"width": 1.3,
"title": "图片介绍",
"url": "http://abc",
"height": 1.2
}
],
"location": "116.364881,39.906314",
"adcode": 110102,
"email": "abc@didi.com",
"deep_info": {
"star": 4,
"opentime": "08:00~23:00",
"is_open": 0,
"price": 200,
"intro": "介绍",
"rating": "评价",
"service": 5,
"wifi": 0,
"cost": 100,
"price_highest": 500,
"is_24h": 1
},
"postcode": "100009",
"exit_location": "116.364881,39.906314",
"website": "www.didi.com",
"category": "美食",
"food_type_code": "100000",
"parking_type": "地面",
"provincecode": "010",
"cityname": "北京市",
"id": "2000000000000028666"
}
]
}
}