POI范围搜索

提供指定区域范围内查询所有POI信息。

请求路径#

GET /geo/v2/poi/range

参数#

查询参数

  • location (必选) 需要查询地区的以英文逗号分隔的经度,纬度坐标(十进制,最多支持小数点后两位)。例如 location=116.41,39.92
  • type (必选) POI类型,可选择搜索某一类型的POI。scenic 景点,TSTA 潮汐站点
  • radius 搜索半径,范围为1-50公里,默认为5公里。
  • number 返回结果的数量,取值范围1-20,默认返回10个结果。
  • lang 多语言设置,请阅读多语言文档,了解我们的多语言是如何工作、如何设置以及数据是否支持多语言。

请求示例#

curl -X GET --compressed \
-H 'Authorization: Bearer your_token' \
'https://your-api-host/geo/v2/poi/range?location=116.41%2C39.92&type=scenic&radius=10&number=10&lang=zh'

请将your_token替换为你的JWT身份认证,将your_api_host替换为你的API Host

试一下

返回数据#

{
  "code": "200",
  "poi": [
    {
      "name": "中山公园",
      "id": "10101010016A",
      "lat": "39.90999985",
      "lon": "116.38999939",
      "adm2": "北京",
      "adm1": "北京",
      "country": "中国",
      "tz": "Asia/Shanghai",
      "utcOffset": "+08:00",
      "isDst": "0",
      "type": "scenic",
      "rank": "86",
      "fxLink": "https://www.qweather.com"
    },
    {
      "name": "故宫博物院",
      "id": "10101010018A",
      "lat": "39.90999985",
      "lon": "116.38999939",
      "adm2": "北京",
      "adm1": "北京",
      "country": "中国",
      "tz": "Asia/Shanghai",
      "utcOffset": "+08:00",
      "isDst": "0",
      "type": "scenic",
      "rank": "67",
      "fxLink": "https://www.qweather.com"
    },
    {
      "name": "北京市规划展览馆",
      "id": "10101010002A",
      "lat": "39.88999939",
      "lon": "116.40000153",
      "adm2": "北京",
      "adm1": "北京",
      "country": "中国",
      "tz": "Asia/Shanghai",
      "utcOffset": "+08:00",
      "isDst": "0",
      "type": "scenic",
      "rank": "68",
      "fxLink": "https://www.qweather.com"
    },
    {
      "name": "老舍茶馆",
      "id": "10101010021A",
      "lat": "39.88999939",
      "lon": "116.38999939",
      "adm2": "北京",
      "adm1": "北京",
      "country": "中国",
      "tz": "Asia/Shanghai",
      "utcOffset": "+08:00",
      "isDst": "0",
      "type": "scenic",
      "rank": "86",
      "fxLink": "https://www.qweather.com"
    },
    {
      "name": "景山公园",
      "id": "10101010012A",
      "lat": "39.91999817",
      "lon": "116.38999939",
      "adm2": "北京",
      "adm1": "北京",
      "country": "中国",
      "tz": "Asia/Shanghai",
      "utcOffset": "+08:00",
      "isDst": "0",
      "type": "scenic",
      "rank": "67",
      "fxLink": "https://www.qweather.com"
    }
  ],
  "refer": {
    "sources": [
      "https://developer.qweather.com/attribution.html"
    ],
    "license": [
      "QWeather Developers License"
    ]
  }
}
  • code string 状态码
  • poi object POI 列表
    • name string 位置名称
    • id string 位置ID
    • lat string 纬度
    • lon string 经度
    • adm2 string 上级行政区划名称
    • adm1 string 一级行政区域名称
    • country string 国家名称
    • tz string 时区
    • utcOffset string 当前位置与UTC时间偏移的小时数
    • isDst string 是否处于夏令时1 表示当前处于夏令时,0 表示当前不是夏令时
    • type string 位置的属性
    • rank string 位置的评分
    • fxLink uri 该位置的天气预报网页链接,便于嵌入你的网站或应用
  • refer object 数据来源和许可信息
    • sources array 原始数据来源,或数据源说明,可能为空
    • license array 数据许可或版权声明,可能为空