Proximity search

更新时间:
复制 MD 格式

This topic explains how to call the enhanced nearby search interface using the Alibaba Cloud OpenAPI SDK and its parameters.

API

The natural language interface for nearby search supports natural language queries for all POI types.

For specific scenarios, you can use the scenario parameter to narrow the search scope. This improves both accuracy and response time. Currently, you can specify one of four scenarios: hotels, attractions, restaurants, or leisure and entertainment. You can also omit the scenario parameter, and the model will automatically identify the most relevant scenario.

API

API name

CommonQueryByScene

Request parameters

Parameter

Description

Required

Default

query

The search keyword.

Yes

N/A

querySceneEnumCode

The search scene. Possible values:

hotels - Hotels

attractions - Attractions

restaurants - Restaurants

entertainment - Entertainment

No

N/A

limit

The maximum number of results to return.

No

10

searchModel

The search mode. Possible values:

single - simple mode. Returns a subset of fields, including name, types, address, and metadata.

normal - normal mode. Returns all fields.

No

normal

Response parameters

Parameter

Type

Description

requestId

string

The unique request ID.

data

list

A list of returned locations.

id

string

The internal identifier.

name

string

The name of the location.

latitude

string

The latitude of the location.

longitude

string

The longitude of the location.

types

string

The location type(s).

typeCode

string

The type code.

provinceName

string

The province name.

provinceCode

string

The province code.

cityName

string

The city name.

cityCode

string

The city code.

districtName

string

The district name.

districtCode

string

The district code.

address

string

The full address.

distanceMeter

string

The distance, in meters, from the center point.

metadata

object

Related business information.

phone

string

The contact number.

businessArea

string

The business area.

mainTag

string

The primary tag.

score

string

The rating.

dailyOpeningHours

string

Today's opening hours.

weeklyOpeningDays

string

The weekly opening days.

averageSpend

string

The average spend, in CNY.

images

list

A list of image objects.

title

string

The image title.

url

string

The image URL.

Example

Request example

{
    "query":"High-end hotels within 5 km of Lingyin Temple, Hangzhou",
    "querySceneEnumCode":"hotels"
}

Response example

{
  "requestId": "15A85F99-408F-5BFA-B617-0C7D3E732ABD",
  "data": [
    {
      "id": "B023B0BI3J",
      "name": "Amanfayun",
      "latitude": "30.234403",
      "longitude": "120.097327",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "815",
      "address": "No. 22 Fayun Lane, West Lake Scenic Area",
      "metadata": {
        "phone": "0571-8732****",
        "businessArea": "Central Area of the West Lake Tourist Area",
        "mainTag": "Luxury",
        "score": "4.7",
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/6ca3129317745e14b893e731408c9610"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/083b8318d55c09256d38a21940f87af2"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/0d56912b30beb84176c2c898e68a9c75"
        }
      ]
    },
    {
      "id": "B023B03721",
      "name": "Jiu Li Yun Song Resort Hotel, Hangzhou",
      "latitude": "30.244454",
      "longitude": "120.113209",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "1204",
      "address": "No. 18-8 Lingyin Road",
      "metadata": {
        "phone": "0571-8798****|0571-8799****|0571-8898****",
        "businessArea": "West Lake",
        "mainTag": "Luxury",
        "score": "4.8",
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/e1c1705c58ce9e61c1e61421188da16d"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/5b727b0573ac9fa21eb833971db8a600"
        },
        {
          "title": "lobby",
          "url": "http://store.is.autonavi.com/showpic/e76beb3bedca3fe0375cef12742ea23e"
        }
      ]
    },
    {
      "id": "B023B09QFZ",
      "name": "Landison Longjing Manor, Hangzhou",
      "latitude": "30.228845",
      "longitude": "120.114077",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "1806",
      "address": "No. 86 Lijilongshan",
      "metadata": {
        "phone": "0571-5655****|0571-8691****|1377755****",
        "businessArea": "Longjing",
        "mainTag": "Luxury",
        "score": "4.4",
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": "Logo",
          "url": "http://store.is.autonavi.com/showpic/ba0257fbb9a93700efdce6d8f4f59401"
        },
        {
          "title": "Poolside Superior Twin Room",
          "url": "http://store.is.autonavi.com/showpic/706c1036280856d41d5a717f87c1d740"
        },
        {
          "title": "One-Bedroom Duplex Suite",
          "url": "http://store.is.autonavi.com/showpic/0628fd2799802e299889b2cd806eeb52"
        }
      ]
    },
    {
      "id": "B023B157YK",
      "name": "Amanfayun - Aman Pavilion",
      "latitude": "30.235544",
      "longitude": "120.097306",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "708",
      "address": "No. 22 Fayun Lane, West Lake Scenic Area",
      "metadata": {
        "phone": "0571-8732****",
        "businessArea": "Central Area of the West Lake Tourist Area",
        "mainTag": "Accommodation Services,Hotels,Five-Star Hotels",
        "score": null,
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": null,
          "url": "https://aos-comment.amap.com/B023B157YK/headerImg/f4b78292a87486446ac723c715c10177_2048_2048_80.jpg"
        },
        {
          "title": null,
          "url": "https://aos-comment.amap.com/B023B157YK/headerImg/4174d44cb22acab9c2c98221b2735ec2_2048_2048_80.jpg"
        },
        {
          "title": null,
          "url": "https://comment-oss-online.oss-cn-wulanchabu.aliyuncs.com/B023B157YK/comment/F5FDB171_386E_4519_B6B7_F8CDA745AFBE_L0_001_IMG_4132.JPG"
        }
      ]
    },
    {
      "id": "B023B08U8P",
      "name": "Narada Grand Hotel Zhejiang",
      "latitude": "30.266359",
      "longitude": "120.140608",
      "types": "Accommodation Services|Hotels|Five-Star Hotels|Dining Services|Dining-related Venues|Dining-related",
      "typeCode": "100102|050000",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "4721",
      "address": "No. 122 Shuguang Road",
      "metadata": {
        "phone": "0571-8799****|1875816****",
        "businessArea": "Beishan",
        "mainTag": "Five-star hotel",
        "score": "4.7",
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": "Western Restaurant",
          "url": "http://store.is.autonavi.com/showpic/b915aba6a703ee13c74533a82b6f793c"
        },
        {
          "title": "guest room",
          "url": "http://store.is.autonavi.com/showpic/437c3ea388a894ae5be132127937ad18"
        },
        {
          "title": "guest room",
          "url": "http://store.is.autonavi.com/showpic/039cc7c6f770299da4b6b7de0012db04"
        }
      ]
    },
    {
      "id": "B023B0BCMM",
      "name": "Four Seasons Hotel Hangzhou at West Lake",
      "latitude": "30.251363",
      "longitude": "120.128537",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "2860",
      "address": "No. 5 Lingyin Road",
      "metadata": {
        "phone": "0571-8829****",
        "businessArea": "West Lake",
        "mainTag": "Western Restaurant",
        "score": "4.7",
        "dailyOpeningHours": "07:00-22:00",
        "weeklyOpeningDays": "Monday to Sunday 07:00-22:00",
        "averageSpend": null
      },
      "images": [
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/b147d32655510d419dfea917ac651968"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/b52d378c3cd0d74e608b2c51961c2529"
        },
        {
          "title": "guest room",
          "url": "http://store.is.autonavi.com/showpic/91754378a4650ace57f591646c2d360e"
        }
      ]
    },
    {
      "id": "B0FFFPZE3J",
      "name": "SSAW Boutique Hotel Hangzhou Xixi Park",
      "latitude": "30.264442",
      "longitude": "120.106033",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "2666",
      "address": "No. 535 Xixi Road",
      "metadata": {
        "phone": "0571-8715****",
        "businessArea": "West Lake",
        "mainTag": "Luxury",
        "score": "4.6",
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": "Logo",
          "url": "http://store.is.autonavi.com/showpic/a20db49eb63fd6e196aad76cede1817e"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/b05fe59c9afd75d80f7c18cb4a0def09"
        },
        {
          "title": "Deluxe King Room",
          "url": "http://store.is.autonavi.com/showpic/c1ba206c13dca29f0cb7393b170e394a"
        }
      ]
    },
    {
      "id": "B0FFG8VE36",
      "name": "Xihu State Guesthouse",
      "latitude": "30.256428",
      "longitude": "120.142041",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "4276",
      "address": "No. 84 Beishan Street",
      "metadata": {
        "phone": "0571-5808****",
        "businessArea": "Central Area of the West Lake Tourist Area",
        "mainTag": "Luxury",
        "score": "4.8",
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/ae69f1f2573d0a90cb685a17cd99f3eb"
        },
        {
          "title": "Exclusive Twin Room",
          "url": "http://store.is.autonavi.com/showpic/a59cd4e02f3e4b83a2d1e1e31824b72d"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/fad3732031fa7bbcba7f0bff1b369677"
        }
      ]
    },
    {
      "id": "B023B02167",
      "name": "Xizi Hotel",
      "latitude": "30.232386",
      "longitude": "120.149789",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "4747",
      "address": "No. 37 Nanshan Road",
      "metadata": {
        "phone": "0571-8702****",
        "businessArea": "West Lake",
        "mainTag": "Upscale",
        "score": "4.8",
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/c874be41bab7fb3c52fb9d79065d815e"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/056f45f363de39f20b0e61d3345d17c4"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/5c90d5aebd0a97576f5cdfc9806fb152"
        }
      ]
    },
    {
      "id": "B023B0A4Z0",
      "name": "Banyan Tree Hangzhou",
      "latitude": "30.267148",
      "longitude": "120.086956",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "3242",
      "address": "No. 2 Xixi Paradise International Tourism Complex, 21 Zijingang Road",
      "metadata": {
        "phone": "0571-8586****",
        "businessArea": "Xixi",
        "mainTag": "Luxury",
        "score": "4.6",
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/efd67f7f0038d30cfe08f230e82d45bf"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/94558b37aa02647aa13ac6fdc246fe4a"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/dc53c2860b7968672e63fc3198f39cfe"
        }
      ]
    },
    {
      "id": "B023B02BLI",
      "name": "The Dragon Hotel, Hangzhou",
      "latitude": "30.267140",
      "longitude": "120.142820",
      "types": "Accommodation Services|Hotels|Five-Star Hotels|Dining Services|Dining-related Venues|Dining-related",
      "typeCode": "100102|050000",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "4943",
      "address": "No. 120 Shuguang Road (a 90 m walk from Exit A2 of Huanglong Cave Metro Station)",
      "metadata": {
        "phone": "0571-8799****|1875816****",
        "businessArea": "Beishan",
        "mainTag": "Five-star hotel",
        "score": "4.7",
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": "hotel exterior",
          "url": "http://store.is.autonavi.com/showpic/e07eaa8d82c2a745125dee1af1fb79d2"
        },
        {
          "title": "Logo",
          "url": "http://store.is.autonavi.com/showpic/149300987639746fd46f64f8b688645c"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/6092beae85931ef344ea31d6d79759cf"
        }
      ]
    },
    {
      "id": "B023B1450V",
      "name": "Xixuan Hotel at Xixi Paradise",
      "latitude": "30.265201",
      "longitude": "120.087595",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "3021",
      "address": "No. 9 Xixi Paradise International Tourism Complex, Zijingang Road",
      "metadata": {
        "phone": "0571-8500****",
        "businessArea": "Xixi",
        "mainTag": "Luxury",
        "score": "4.7",
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": "Logo",
          "url": "http://store.is.autonavi.com/showpic/022fbfff286d56b46da61b13c2945962"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/5e0e7d3c5c2f55890836794eba4d0106"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/5a351411d18841e6bff3ccdb16629deb"
        }
      ]
    },
    {
      "id": "B023B0I01E",
      "name": "Sheraton Grand Hangzhou Wetland Park Resort",
      "latitude": "30.267714",
      "longitude": "120.088728",
      "types": "Accommodation Services|Hotels|Five-Star Hotels|Dining Services|Dining-related Venues|Dining-related",
      "typeCode": "100102|050000",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "3231",
      "address": "No. 1 Xixi Paradise International Tourism Complex, Zijingang Road",
      "metadata": {
        "phone": "0571-8500****",
        "businessArea": "Xixi",
        "mainTag": "Five-star hotel",
        "score": "4.7",
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/946fe51850228ee86991a67f81a97581"
        },
        {
          "title": "Business",
          "url": "http://store.is.autonavi.com/showpic/28116e7a789b0561a4675fdf20cc2cc0"
        },
        {
          "title": "guest room",
          "url": "http://store.is.autonavi.com/showpic/ccdb0b13787e98de08f3f140ba329ef0"
        }
      ]
    },
    {
      "id": "B023B1681T",
      "name": "Hangzhou Xixi Heyue Resort Hotel",
      "latitude": "30.249346",
      "longitude": "120.061499",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "3953",
      "address": "No. 128 Baijiayuan Road, Liuxia Town",
      "metadata": {
        "phone": "0571-5607****|0571-5633****|0571-8522****",
        "businessArea": "Xixi",
        "mainTag": "Upscale",
        "score": "4.3",
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": "Logo",
          "url": "http://store.is.autonavi.com/showpic/701b4445dd3ed0835c724f51eaf6aa9f"
        },
        {
          "title": "Logo",
          "url": "http://store.is.autonavi.com/showpic/cc7e01aa71028d8033205c80b9110dcc"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/64af7a4a6487bfbfa56db18a03501ab8"
        }
      ]
    },
    {
      "id": "B0FFGH3N2Q",
      "name": "SSAW Hotel Plaza Hangzhou",
      "latitude": "30.268634",
      "longitude": "120.111775",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "3252",
      "address": "No. 546 Xixi Road",
      "metadata": {
        "phone": "0571-8768****|0571-8775****",
        "businessArea": "West Lake",
        "mainTag": "Luxury",
        "score": "4.8",
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": "Logo",
          "url": "http://store.is.autonavi.com/showpic/51a6f151e51999e2e09d55626029141e"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/555223c70b5b3bc979665d168b50f47c"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/9bef2af3ed018cfd94c2529b7c0ca9fc"
        }
      ]
    },
    {
      "id": "B023B01844",
      "name": "Huajiashan Resort",
      "latitude": "30.223908",
      "longitude": "120.132272",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "3515",
      "address": "No. 25 Santai Shan Road (near Huagang Park)",
      "metadata": {
        "phone": "0571-8797****|0571-8797****",
        "businessArea": "West Lake",
        "mainTag": "Luxury",
        "score": "4.9",
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/84ce4c4d79d54902fbeb72b818258d90"
        },
        {
          "title": "Scenic Family Suite",
          "url": "http://store.is.autonavi.com/showpic/e92dfe9d293743b3c87e73ba518237a4"
        },
        {
          "title": "Scenic Executive Room - King Bed",
          "url": "http://store.is.autonavi.com/showpic/dd11712410ddbbd7a12c4711a5fecbcd"
        }
      ]
    },
    {
      "id": "B023B01F50",
      "name": "Shangri-La Hotel, Hangzhou",
      "latitude": "30.253052",
      "longitude": "120.137602",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "3737",
      "address": "No. 78 Beishan Road",
      "metadata": {
        "phone": "0571-8797****",
        "businessArea": "Beishan",
        "mainTag": "Luxury",
        "score": "4.6",
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/211101a2f1cacdea19b7e0b4635baf04"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/d3d12a7816bf7ee34cc654327b6ed7ec"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/7a6f0afd877657bbfcd5e726c566d038"
        }
      ]
    },
    {
      "id": "B0FFG2LZQL",
      "name": "Xixuan Hotel Lobby, Hangzhou",
      "latitude": "30.265327",
      "longitude": "120.087599",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "3033",
      "address": "1F, Xixuan Hotel, No. 9 Xixi Paradise International Tourism Complex, Zijingang Road, Hangzhou",
      "metadata": {
        "phone": "0571-8500****",
        "businessArea": "Xixi",
        "mainTag": "Accommodation Services,Hotels,Five-Star Hotels",
        "score": null,
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": null,
          "url": "https://aos-comment.amap.com/B0FFG2LZQL/comment/0297c32520f99e6b6642f176648dadfd_2048_2048_80.jpg"
        },
        {
          "title": null,
          "url": "https://aos-comment.amap.com/B0FFG2LZQL/comment/b97c9466274d75d855081b65306c82c6_2048_2048_80.jpg"
        },
        {
          "title": null,
          "url": "https://aos-comment.amap.com/B0FFG2LZQL/comment/c2869512b1de77833f3451f029807646_2048_2048_80.jpg"
        }
      ]
    },
    {
      "id": "B0H3RMFKS0",
      "name": "Shangri-La Hotel, Hangzhou Lobby",
      "latitude": "30.252575",
      "longitude": "120.136917",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "3656",
      "address": "Shangri-La Hotel, Hangzhou, No. 78 Beishan Road",
      "metadata": {
        "phone": null,
        "businessArea": "Beishan",
        "mainTag": "Accommodation Services,Hotels,Five-Star Hotels",
        "score": null,
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/be5793355c1ff8db9386c3d11621f647"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/f3083ebd1e29cdac40146759280c7283"
        },
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/3233ba03e19d68e81592fd41be1b1057"
        }
      ]
    },
    {
      "id": "B0H3AXD1MH",
      "name": "The Dragon Hotel, Hangzhou - South Lobby",
      "latitude": "30.266611",
      "longitude": "120.143127",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "4932",
      "address": "120 m west of the intersection of Shuguang Road and Baoshi Mountain Greenway Line 2",
      "metadata": {
        "phone": null,
        "businessArea": "Beishan",
        "mainTag": "Accommodation Services,Hotels,Five-Star Hotels",
        "score": null,
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": [
        {
          "title": null,
          "url": "http://store.is.autonavi.com/showpic/6c03b633c5696c3fb2702f2f7a158976"
        }
      ]
    },
    {
      "id": "B0H377BRRJ",
      "name": "Banyan Tree Hangzhou Lobby",
      "latitude": "30.267270",
      "longitude": "120.087065",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "3250",
      "address": "Banyan Tree Hangzhou, No. 2 Xixi Paradise International Tourism Complex, 21 Zijingang Road",
      "metadata": {
        "phone": null,
        "businessArea": "Xixi",
        "mainTag": "Accommodation Services,Hotels,Five-Star Hotels",
        "score": "5.0",
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": []
    },
    {
      "id": "B0H37SCCOQ",
      "name": "Four Seasons Hotel Hangzhou at West Lake Lobby",
      "latitude": "30.251189",
      "longitude": "120.127866",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "2793",
      "address": "120 m southeast of the intersection of Lingyin Road and Zhaogongdi Branch Road",
      "metadata": {
        "phone": "0571-8829****",
        "businessArea": "West Lake",
        "mainTag": "Accommodation Services,Hotels,Five-Star Hotels",
        "score": null,
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": []
    },
    {
      "id": "B0IA3MQ0A8",
      "name": "Sheraton Grand Hangzhou Wetland Park Resort Lobby",
      "latitude": "30.267679",
      "longitude": "120.088608",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "3232",
      "address": "Sheraton Grand Hangzhou Wetland Park Resort, No. 1 Xixi Paradise International Tourism Complex, Zijingang Road",
      "metadata": {
        "phone": null,
        "businessArea": "Xixi",
        "mainTag": "Accommodation Services,Hotels,Five-Star Hotels",
        "score": null,
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": []
    },
    {
      "id": "B0IAFA7FME",
      "name": "Huabei Hotel Lobby",
      "latitude": "30.253575",
      "longitude": "120.133513",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "3398",
      "address": "Huabei Hotel, No. 18 Qixialing, Beishan Road",
      "metadata": {
        "phone": null,
        "businessArea": "West Lake",
        "mainTag": "Accommodation Services,Hotels,Five-Star Hotels",
        "score": null,
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": []
    },
    {
      "id": "B0FFKWA9KW",
      "name": "Huajiashan Resort - Dujuan Building",
      "latitude": "30.222685",
      "longitude": "120.131430",
      "types": "Accommodation Services|Hotels|Five-Star Hotels",
      "typeCode": "100102",
      "provinceName": "Zhejiang Province",
      "provinceCode": "330000",
      "cityName": "Hangzhou City",
      "cityCode": "0571",
      "districtName": "Xihu District",
      "districtCode": "330106",
      "distanceMeter": "3523",
      "address": "No. 25 Santai Shan Road",
      "metadata": {
        "phone": "0571-8797****",
        "businessArea": "West Lake",
        "mainTag": "Accommodation Services,Hotels,Five-Star Hotels",
        "score": null,
        "dailyOpeningHours": null,
        "weeklyOpeningDays": null,
        "averageSpend": null
      },
      "images": []
    }
  ]
}

Error codes

HTTP status

Error code

Error message

Description

400

Throttling.User

Request was denied due to user throttling.

The request was denied due to user throttling.

400

MissingParameter

Required parameter xxx is not found.

The request is missing a required parameter.

403

NotActivate

Please activate POI search service.

You have not activated the POI search service.

403

NotAuthorised

Grant the AliyunIQSFullAccess permission to the sub-account.

The sub-account does not have the required IQS permissions.

500

InternalServerError

An unexpected error occurred

An internal server error occurred.

500

ServiceUnavailable

Service unavailable

The service is unavailable.

SDK

SDK download

Endpoint

Region name

Region ID

Public endpoint

China (Zhangjiakou)

cn-zhangjiakou

iqs.cn-zhangjiakou.aliyuncs.com

Example code

Java SDK

  • SDK configuration

We recommend using the latest version. The following code is for demonstration purposes only.

<dependency>
    <groupId>com.aliyun</groupId>
    <artifactId>iqs20240712</artifactId>
    <version>3.1.0</version>
</dependency>
  • Client configuration

@Configuration
public class ClientConfiguration {

    @Bean
    public Client clientConfig() throws Exception {
        Config config = new Config();
        config.setAccessKeyId("XXX");
        config.setAccessKeySecret("XXX");
        config.setEndpoint("iqs.cn-zhangjiakou.aliyuncs.com");
        config.setConnectTimeout(8000);
        Client client = new Client(config);
        return client;
    }
    
}
  • Example call

CommonQueryBySceneRequest queryAttractionsRequest = new CommonQueryBySceneRequest();
CommonAgentQuery commonAgentQuery = new CommonAgentQuery();
commonAgentQuery.setQuery("Premium hotels near West Lake, Hangzhou");
commonAgentQuery.setQuerySceneEnumCode(QuerySceneEnum.HOTEL.getCode());
queryAttractionsRequest.setBody(commonAgentQuery);
try {
    CommonQueryBySceneResponse commonQueryBySceneResponse = client.commonQueryByScene(queryAttractionsRequest);
    System.out.println(JSON.toJSONString(commonQueryBySceneResponse));
} catch (Exception e) {
    // Log the error.
}

Python SDK

  • SDK installation

pip install alibabacloud_iqs20240712
  • Example SDK call

# -*- coding: utf-8 -*-
# This file is auto-generated, don't edit it. Thanks.
import sys
import json

from typing import List

from alibabacloud_iqs20240712.client import Client as IQS20240712Client
from alibabacloud_iqs20240712.models import CommonAgentQuery
from alibabacloud_tea_openapi import models as open_api_models
from alibabacloud_iqs20240712 import models as iqs20240712_models
from alibabacloud_tea_util import models as util_models


class Sample:
    def __init__(self):
        pass

    @staticmethod
    def create_client() -> IQS20240712Client:
        """
        Initializes a client with credentials.
        @return: The client instance.
        @throws Exception
        """
        # For production, use a more secure credential management method instead of hardcoding your AccessKey pair.
        # For more information about how to configure your credentials, see https://help.aliyun.com/document_detail/378659.html.
        config = open_api_models.Config(
            access_key_id='', # Your AccessKey ID
            access_key_secret='' # Your AccessKey secret
        )
        # For the endpoint, see https://api.aliyun.com/product/IQS
        config.endpoint = f'iqs.cn-zhangjiakou.aliyuncs.com'
        return IQS20240712Client(config)

    @staticmethod
    def main(
            args: List[str],
    ) -> None:
        client = Sample.create_client()
        common_query_by_scene_request = iqs20240712_models.CommonQueryBySceneRequest(
            body=CommonAgentQuery(
                query="Premium hotels near West Lake, Hangzhou"
            )
        )
        runtime = util_models.RuntimeOptions()
        headers = {}
        try:
            resp = client.common_query_by_scene_with_options(common_query_by_scene_request, headers, runtime)
            print(json.dumps(resp, default=str, indent=2))
        except Exception as error:
            # This code is for demonstration only. In production, implement proper error handling and do not suppress exceptions.
            # Error message
            print(error.message)
            # Diagnostic information
            print(error.data.get("Recommend"))

    @staticmethod
    async def main_async(
            args: List[str],
    ) -> None:
        client = Sample.create_client()
        common_query_by_scene_request = iqs20240712_models.CommonQueryBySceneRequest()
        runtime = util_models.RuntimeOptions()
        headers = {}
        try:
            resp = await client.common_query_by_scene_with_options_async(common_query_by_scene_request, headers,
                                                                         runtime)
            print(json.dumps(resp, default=str, indent=2))
        except Exception as error:
            # This code is for demonstration only. In production, implement proper error handling and do not suppress exceptions.
            # Error message
            print(error.message)
            # Diagnostic information
            print(error.data.get("Recommend"))


if __name__ == '__main__':
    Sample.main(sys.argv[1:])