百度天气预报接口
来源:互联网 发布:在家网络医疗咨询 编辑:程序博客网 时间:2024/06/06 02:04
接口说明
根据经纬度/城市名查询天气的结果
接口示例
http://api.map.baidu.com/telematics/v3/weather?location=北京&output=json&ak=5slgyqGDENN7Sy7pw29IUvrZ
百度ak申请地址:http://lbsyun.baidu.com/apiconsole/key
接口参数说明
返回结果
返回xml格式的数据
<?xml version="1.0" encoding="utf-8" ?> <CityWeatherResponse> <status>success</status> <date>2014-05-03</date> <results> <currentCity>北京</currentCity> <weather_data> <date>周六(今天, 实时:22℃)</date> <dayPictureUrl>http://api.map.baidu.com/images/weather/day/leizhenyu.png</dayPictureUrl> <nightPictureUrl>http://api.map.baidu.com/images/weather/night/duoyun.png</nightPictureUrl> <weather>雷阵雨转多云</weather> <wind>北风5-6级</wind> <temperature>24 ~ 11℃</temperature> <date>周日</date> <dayPictureUrl>http://api.map.baidu.com/images/weather/day/duoyun.png</dayPictureUrl> <nightPictureUrl>http://api.map.baidu.com/images/weather/night/qing.png</nightPictureUrl> <weather>多云转晴</weather> <wind>北风4-5级</wind> <temperature>19 ~ 8℃</temperature> <date>周一</date> <dayPictureUrl>http://api.map.baidu.com/images/weather/day/qing.png</dayPictureUrl> <nightPictureUrl>http://api.map.baidu.com/images/weather/night/qing.png</nightPictureUrl> <weather>晴</weather> <wind>微风</wind> <temperature>21 ~ 9℃</temperature> <date>周二</date> <dayPictureUrl>http://api.map.baidu.com/images/weather/day/duoyun.png</dayPictureUrl> <nightPictureUrl>http://api.map.baidu.com/images/weather/night/qing.png</nightPictureUrl> <weather>多云转晴</weather> <wind>微风</wind> <temperature>21 ~ 10℃</temperature> </weather_data> </results></CityWeatherResponse>
返回json格式的数据
{ "error": 0, "status": "success", "date": "2014-05-03", "results": [ { "currentCity": "北京", "weather_data": [ { "date": "周六(今天, 实时:22℃)", "dayPictureUrl": "http://api.map.baidu.com/images/weather/day/leizhenyu.png", "nightPictureUrl": "http://api.map.baidu.com/images/weather/night/duoyun.png", "weather": "雷阵雨转多云", "wind": "北风5-6级", "temperature": "24 ~ 11℃" }, { "date": "周日", "dayPictureUrl": "http://api.map.baidu.com/images/weather/day/duoyun.png", "nightPictureUrl": "http://api.map.baidu.com/images/weather/night/qing.png", "weather": "多云转晴", "wind": "北风4-5级", "temperature": "19 ~ 8℃" }, { "date": "周一", "dayPictureUrl": "http://api.map.baidu.com/images/weather/day/qing.png", "nightPictureUrl": "http://api.map.baidu.com/images/weather/night/qing.png", "weather": "晴", "wind": "微风", "temperature": "21 ~ 9℃" }, { "date": "周二", "dayPictureUrl": "http://api.map.baidu.com/images/weather/day/duoyun.png", "nightPictureUrl": "http://api.map.baidu.com/images/weather/night/qing.png", "weather": "多云转晴", "wind": "微风", "temperature": "21 ~ 10℃" } ] } ]}
0 0
- 百度天气预报接口
- 百度天气预报接口
- 百度天气预报接口
- 百度天气预报接口
- 百度天气预报接口
- 百度天气预报接口介绍
- 百度天气预报接口
- 百度天气预报接口
- 百度天气预报接口介绍
- 百度天气预报接口介绍
- 百度天气预报接口介绍
- Android天气预报+百度天气接口
- Android天气预报,Json解析,百度天气接口
- 百度提供天气预报查询接口API
- java天气预报调用百度接口实现
- 如何使用百度天气预报API接口
- 百度天气预报接口介绍--职坐标
- 如何使用百度天气预报API接口
- 总结几点关于做互联网产品的思路
- source命令
- escape()、encodeURI()、encodeURIComponent()区别详解
- 为Django中的模型Model添加JSON类型字段
- 100个优秀的loading进度条PSD素材下载
- 百度天气预报接口
- java 统计数据库中记录条数的函数
- lucene构建restful风格的简单搜索引擎服务
- 经纬财富:乐山稳健投资之道,积小胜为大胜
- H-1431-素数回文
- Ural1109_Conference(二分图最大匹配/匈牙利算法/网络最大流)
- 学习php需要了解的点4 - PHP中file_get_contents函数抓取https地址出错的解决方法
- 使用java程序比较mysql表结构
- Cocos2d-x 3.1.1 学习日志11--一Windows下Android环境搭建(一定对你有用的!!)