接口功能介绍
基础服务
http://api.map.baidu.com/weather/v1/?district_id=222405&data_type=all&ak=你的ak //GET请求
高级权限(国内经纬度天气查询)
http://api.map.baidu.com/weather/v1/?location=116.40387,39.91489&data_type=all&ak=你的ak //GET请求
注意:经纬度天气查询是付费服务,仅限高级权限用户使用,您可以联系我们开通15天试用并了解更多信息。
key:http://lbs.baidu.com/index.php?title=webapi/weather
url:http://lbs.baidu.com/index.php?title=webapi/weather
参数名 | 数据类型 | 是否必传 | 默认值 | 描述信息 |
---|---|---|---|---|
district_id | string | 否 | 无 | 区县的行政区划编码,和location二选一 |
location | double | 否 | 无 | 经纬度,经度在前纬度在后,逗号分隔。支持类型:bd09mc/bd09ll/wgs84/gcj02。开通高级权限后才能使用 |
ak | string | 是 | 无 | 开发者密钥,可在API控制台申请获得 |
data_type | string | 是 | 无 | 请求数据类型。数据类型有:now/fc/index/alert/fc_hour/all,控制返回内容 |
output | string | 否 | json | 返回格式,目前支持json/xml |
coordtype | string | 否 | bd09ll | 支持类型:wgs84/bd09ll/bd09mc/gcj02 |
注意ÿ