周邊搜索
本文介紹通過阿里云OpenAPI SDK調(diào)用 周邊查詢-基礎(chǔ)API-周邊搜索 的方法以及參數(shù)說明。
周邊搜索
通過經(jīng)緯度查詢附近的地點。
API定義
請求參數(shù)
參數(shù)名 | 含義及規(guī)則 | 是否必須 | 缺省值 | 參數(shù)樣例 | |
longitude | 圓形區(qū)域檢索中心點的經(jīng)度 | 必填 | 無 | 116.310918 | |
latitude | 圓形區(qū)域檢索中心點的緯度 | 必填 | 無 | 39.992873 | |
radius | 搜索半徑,單位:米 | 可選 | 1000 | 3000 | |
keywords | 需要被檢索的地點文本信息。只支持一個關(guān)鍵字 ,文本總長度不可超過80字符 | 可選 | 無 | 餐廳 | |
types | 目標(biāo)類型的枚舉值,以 “|” 標(biāo)記分隔 | 可選 | 無 | ATTRACTION|RESTAURANT|HOTEL|GAS_STATION | |
page | 請求第幾分頁 | 可選 | 1 | 1 | |
size | 當(dāng)前分頁展示的數(shù)據(jù)條數(shù) | 可選 | 20 | 10 |
響應(yīng)參數(shù)
參數(shù)名 | 類型 | 說明 | ||
success | bool | 接口調(diào)用是否成功 | ||
errorCode | integer | 錯誤碼 | ||
errorMessage | string | 錯誤信息 | ||
data | list | 返回的地點數(shù)據(jù)列表 | ||
id | string | 地點的唯一標(biāo)識 | ||
name | string | 地點名稱 | ||
longitude | string | 地點的經(jīng)度 | ||
latitude | string | 地點的緯度 | ||
types | string | 地點的類型 | ||
typeCode | string | 地點的poi類型碼 | ||
provinceName | string | 地點所屬省份 | ||
provinceCode | string | 地點所屬省份編碼 | ||
cityName | string | 地點所屬城市 | ||
cityCode | string | 地點所屬城市編碼 | ||
districtName | string | 地點所屬區(qū)域 | ||
districtCode | string | 地點所屬區(qū)域編碼 | ||
address | string | 地點的詳細(xì)地址 | ||
distanceMeter | string | 地點到中心點的距離值,單位米 | ||
metadata | object | 地點的商業(yè)信息相關(guān) | ||
businessArea | string | 地點所屬商圈 | ||
mainTag | string | 地點的主標(biāo)簽 | ||
score | string | 評分,僅部分可返回 | ||
dailyOpeningHours | string | 地點的日營業(yè)時間 | ||
weeklyOpeningDays | string | 地點的周營業(yè)時間 | ||
averageSpend | string | 人均消費 | ||
tag | string | 特色內(nèi)容 | ||
phone | string | 聯(lián)系電話 | ||
images | list | 地點的圖片列表 | ||
title | string | 圖片名稱 | ||
url | string | 圖片鏈接 |
示例
響應(yīng)示例
{
"data": [
{
"types": "餐飲服務(wù)|中餐廳|中餐廳",
"metadata": {
"score": "4.6",
"averageSpend": "22.00",
"businessArea": "西苑",
"phone": "010-6276****",
"dailyOpeningHours": "11:00-14:00 17:00-21:00",
"weeklyOpeningDays": "每天",
"mainTag": "食堂",
"tag": "瓦罐湯"
},
"images": [
{
"url": "https://aos-comment.amap.com/B000A8UNZV/comment/f0a5ca9b58a31f63f8af51f459f75e4b_2048_2048_80.jpg"
},
{
"url": "https://aos-comment.amap.com/B000A8UNZV/comment/b5131dd3fcc9d06f9c4464af3daccc53_2048_2048_80.jpg"
},
{
"url": "https://aos-comment.amap.com/B000A8UNZV/comment/51e4d565c61cd26eb1c136ba60512a5e_2048_2048_80.jpg"
}
],
"districtCode": "110108",
"address": "頤和園路5號北京大學(xué)第二教學(xué)樓西門口正對面",
"districtName": "海淀區(qū)",
"provinceCode": "110000",
"cityCode": "010",
"latitude": "39.989027",
"typeCode": "050100",
"cityName": "北京市",
"name": "北京大學(xué)農(nóng)園餐廳",
"distanceMeter": "445",
"id": "B000A8UNZV",
"provinceName": "北京市",
"longitude": "116.312348"
},
{
"types": "餐飲服務(wù)|外國餐廳|西餐廳(綜合風(fēng)味)",
"metadata": {
"score": "4.7",
"averageSpend": "83.00",
"businessArea": "西苑",
"phone": "010-6275****|010-6275****",
"dailyOpeningHours": "09:00-21:00",
"weeklyOpeningDays": "每天",
"mainTag": "西餐",
"tag": "小蛋糕,雞排,牛排,薯條"
},
"images": [
{
"url": "http://store.is.autonavi.com/showpic/fb2d477da9b30bce716a58a373d698ac"
},
{
"url": "https://aos-comment.amap.com/B0FFFDC91L/comment/71fa9e3f93ddcbeeba0b2c8eb704f644_2048_2048_80.jpg"
},
{
"url": "https://aos-comment.amap.com/B0FFFDC91L/comment/3d7840d3ae18c34df8e8a0343bbd0987_2048_2048_80.jpg"
}
],
"districtCode": "110108",
"address": "頤和園路16號",
"districtName": "海淀區(qū)",
"provinceCode": "110000",
"cityCode": "010",
"latitude": "39.990948",
"typeCode": "050201",
"cityName": "北京市",
"name": "勺園西餐廳",
"distanceMeter": "502",
"id": "B0FFFDC91L",
"provinceName": "北京市",
"longitude": "116.305588"
},
{
"types": "餐飲服務(wù)|外國餐廳|西餐廳(綜合風(fēng)味)",
"metadata": {
"score": "4.0",
"averageSpend": "210.00",
"businessArea": "西苑",
"phone": "010-8268****",
"mainTag": "西餐"
},
"images": [
{
"url": "http://store.is.autonavi.com/showpic/53f8cb1b7fee201a4afd41cca2bf12b1"
},
{
"url": "http://store.is.autonavi.com/showpic/620c9b19ecd082d46eb1c17250ec74de"
},
{
"url": "http://store.is.autonavi.com/showpic/933df93ff87eb8d9faf5d0357e11148f"
}
],
"districtCode": "110108",
"address": "中關(guān)村北大街127號北大博雅國際酒店1層",
"districtName": "海淀區(qū)",
"provinceCode": "110000",
"cityCode": "010",
"latitude": "39.997865",
"typeCode": "050201",
"cityName": "北京市",
"name": "北大博雅國際酒店西餐廳",
"distanceMeter": "592",
"id": "B0FFK1XX12",
"provinceName": "北京市",
"longitude": "116.313334"
},
{
"types": "餐飲服務(wù)|中餐廳|中餐廳",
"metadata": {
"score": "4.8",
"averageSpend": "52.00",
"businessArea": "西苑",
"phone": "010-6276****",
"dailyOpeningHours": "10:00-23:00",
"weeklyOpeningDays": "每天",
"mainTag": "北京菜"
},
"images": [
{
"url": "https://aos-comment.amap.com/B0FFGIIKS4/comment/81BE04A1_B6EE_4F40_9430_770A11DBE981_L0_001_1284_1147_1730438734251_61310843.jpg"
},
{
"url": "http://store.is.autonavi.com/showpic/f37a7b145b1e7d82d31620299d2891eb"
},
{
"url": "http://store.is.autonavi.com/showpic/5b37ea0de398139bb025aa36d79add18"
}
],
"districtCode": "110108",
"address": "頤和園路5號北京大學(xué)45號",
"districtName": "海淀區(qū)",
"provinceCode": "110000",
"cityCode": "010",
"latitude": "39.988174",
"typeCode": "050100",
"cityName": "北京市",
"name": "北京大學(xué)藝園餐廳",
"distanceMeter": "620",
"id": "B0FFGIIKS4",
"provinceName": "北京市",
"longitude": "116.307002"
},
{
"types": "餐飲服務(wù)|中餐廳|中餐廳",
"metadata": {
"score": "4.0",
"averageSpend": "43.00",
"businessArea": "西苑",
"phone": "010-6276****|1851525****",
"dailyOpeningHours": "09:00-21:00",
"weeklyOpeningDays": "每天",
"mainTag": "北京菜"
},
"images": [],
"districtCode": "110108",
"address": "暢春園食堂三層",
"districtName": "海淀區(qū)",
"provinceCode": "110000",
"cityCode": "010",
"latitude": "39.993888",
"typeCode": "050100",
"cityName": "北京市",
"name": "北京暢春園三層餐廳",
"distanceMeter": "621",
"id": "B0FFF642P2",
"provinceName": "北京市",
"longitude": "116.303747"
},
{
"types": "餐飲服務(wù)|中餐廳|中餐廳",
"metadata": {
"score": "4.7",
"averageSpend": "132.00",
"phone": "010-6275****|010-6275****",
"dailyOpeningHours": "11:30-21:00",
"weeklyOpeningDays": "每天",
"mainTag": "創(chuàng)意菜"
},
"images": [
{
"url": "https://aos-comment.amap.com/B000AA4281/comment/content_media_external_images_media_100002521_1727767502417_74266199.jpg"
},
{
"url": "https://aos-comment.amap.com/B000AA4281/comment/content_media_external_images_media_100002521_1727767512901_97807208.jpg"
},
{
"url": "https://aos-comment.amap.com/B000AA4281/comment/content_media_external_images_media_100002521_1727767502416_10731974.jpg"
}
],
"districtCode": "110108",
"address": "中關(guān)村北大街126號北京大學(xué)中關(guān)新園2號樓1層(近北大東門)",
"districtName": "海淀區(qū)",
"provinceCode": "110000",
"cityCode": "010",
"latitude": "39.990170",
"typeCode": "050100",
"cityName": "北京市",
"name": "怡園中餐廳",
"distanceMeter": "644",
"id": "B000AA4281",
"provinceName": "北京市",
"longitude": "116.317606"
},
{
"types": "餐飲服務(wù)|中餐廳|中餐廳",
"metadata": {
"score": "4.4",
"averageSpend": "70.00",
"phone": "010-6275****|010-6275****",
"dailyOpeningHours": "11:00-14:30 17:00-21:00",
"weeklyOpeningDays": "每天",
"mainTag": "創(chuàng)意菜"
},
"images": [
{
"url": "http://store.is.autonavi.com/showpic/0cf29af79e1c0c8cf7ec6c5f94711b2e"
},
{
"url": "http://store.is.autonavi.com/showpic/08fd18d6f95369d20b6fbc2a450b1a86"
},
{
"url": "http://store.is.autonavi.com/showpic/9378f99f084039e48fa2e890c1a2c37d"
}
],
"districtCode": "110108",
"address": "中關(guān)村北大街126號北京大學(xué)中關(guān)新園5號樓1層",
"districtName": "海淀區(qū)",
"provinceCode": "110000",
"cityCode": "010",
"latitude": "39.989287",
"typeCode": "050100",
"cityName": "北京市",
"name": "和園主題餐廳",
"distanceMeter": "781",
"id": "B000A8WA8P",
"provinceName": "北京市",
"longitude": "116.318799"
},
{
"types": "餐飲服務(wù)|中餐廳|中餐廳",
"metadata": {
"score": "3.9",
"businessArea": "萬泉河",
"mainTag": "食堂"
},
"images": [
{
"url": "https://aos-comment.amap.com/B0KGCLTASF/comment/2e8e8a6fb25c027acafec920f9576050_2048_2048_80.jpg"
},
{
"url": "https://aos-comment.amap.com/B0KGCLTASF/comment/8d9eb61156c7f8c0e9a620541490f61e_2048_2048_80.jpg"
},
{
"url": "https://aos-comment.amap.com/B0KGCLTASF/comment/329f136fe7a2cb69413b37a602fb0f4d_2048_2048_80.jpg"
}
],
"districtCode": "110108",
"address": "頤和園路與海淀路交叉口西北140米",
"districtName": "海淀區(qū)",
"provinceCode": "110000",
"cityCode": "010",
"latitude": "39.987345",
"typeCode": "050100",
"cityName": "北京市",
"name": "未來科技大廈餐廳",
"distanceMeter": "817",
"id": "B0KGCLTASF",
"provinceName": "北京市",
"longitude": "116.304615"
},
{
"types": "餐飲服務(wù)|中餐廳|中餐廳",
"metadata": {
"score": "4.8",
"averageSpend": "17.00",
"phone": "010-6278****",
"dailyOpeningHours": "08:00-20:30",
"weeklyOpeningDays": "每天",
"mainTag": "食堂",
"tag": "麻辣香鍋"
},
"images": [
{
"url": "https://aos-comment.amap.com/B000A7R5S9/comment/f3bf6bd16faa9aea3ba2f1aee3746ee6_2048_2048_80.jpg"
},
{
"url": "https://aos-comment.amap.com/B000A7R5S9/comment/69aaa41ebe034f69ebcf7aed2a4d3f36_2048_2048_80.jpg"
},
{
"url": "https://aos-comment.amap.com/B000A7R5S9/comment/6f06edf67b0356fee848983c06e45e9e_2048_2048_80.jpg"
}
],
"districtCode": "110108",
"address": "雙清路30號清華大學(xué)",
"districtName": "海淀區(qū)",
"provinceCode": "110000",
"cityCode": "010",
"latitude": "39.998357",
"typeCode": "050100",
"cityName": "北京市",
"name": "寓園教工餐廳",
"distanceMeter": "926",
"id": "B000A7R5S9",
"provinceName": "北京市",
"longitude": "116.319091"
},
{
"types": "餐飲服務(wù)|中餐廳|中餐廳",
"metadata": {
"score": "4.4",
"averageSpend": "15.00",
"phone": "010-6278****",
"mainTag": "食堂",
"tag": "麻辣燙"
},
"images": [
{
"url": "http://store.is.autonavi.com/showpic/5c9967886e26efb0aabd965d1c0acd00"
},
{
"url": "http://store.is.autonavi.com/showpic/53a244a4a310b133764f087a"
},
{
"url": "http://store.is.autonavi.com/showpic/023508e4848639aae8567073ecc202f5"
}
],
"districtCode": "110108",
"address": "清華南路1號清華大學(xué)",
"districtName": "海淀區(qū)",
"provinceCode": "110000",
"cityCode": "010",
"latitude": "39.994663",
"typeCode": "050100",
"cityName": "北京市",
"name": "清華大學(xué)家園教工餐廳",
"distanceMeter": "993",
"id": "B000A9P9GY",
"provinceName": "北京市",
"longitude": "116.322336"
}
],
"success": true
}
枚舉定義
目標(biāo)類型types枚舉
Code | Value | 說明 |
GAS_STATION | 010100 | 加油站 |
RESTAURANT | 050000 | 餐館、飯店 |
HOTEL | 100100 | 酒店 |
ATTRACTION | 110000 | 景點 |