实时天气情况

接口类:天气预报 (506)
接口:weather.today (106004)
状态:正常
k780品牌已全新升级为NowAPI(原帐户体系不变).   立即使用新版的NowAPI
介绍
实时天气信息,数据来自国家气象局天气网,每小时更新一次
例:http://api.k780.com:88/?app=weather.today&weaid=1&&appkey=10003&sign=b59bc3ef6191eb9f747dd4e83c99f2a4&format=json

更新日志:
2015-05-13 weaid参数可指定IP地址(系统会分析该IP所在城市,并提取该城市天气数据)
2015-01-01 增加实时湿度 temperature_curr和temp_curr栏位.
请求方式
Get/Post
请求参数说明
参数名称类型是否必须说明
appkeystring1使用API的唯一凭证 说明
signstring1md5后的32位密文,登陆用. 说明
format{json|xml}0返回格式
weaidnumber1城市气象编号 如:beijing/北京/1/101010100/202.104.153.201
可以是weather.city接口中的weaid,cityid,citynm;也可以是IP地址(系统自动分析该IP所在城市)
jsoncallbackstring0js跨域使用jsonp时可使用此参数
返回参数说明
参数名称类型说明
success{0/1}执行结果
msgstring出错消息,当出错时将会出现此节点,否则不出现
daysdate日期
weekstring星期
citynmstring城市/地区
temperature_currstring实时温度
temperaturestring温度
cityidstring气象编号
humiditystring湿度
weatherstring天气 详见:weather.wtype
weather_iconstring天气图标(目录b/c/d/n供使用) 下载图标
weather_icon1string天气图标1(目录b/c/d/n供使用) 下载图标
windstring风向
winpstring风力
temp_highnumber最高温度
temp_lownumber最低温度
temp_currnumber实时湿度
humi_highnumber最高湿度
humi_lownumber最低湿度
weatidnumber天气ID 详见:weather.wtype
weatid1number天气ID1 详见:weather.wtype
windidnumber风向ID
winpidnumber风力ID
请求示例json
http://api.k780.com:88/?app=weather.today&weaid=1&appkey=你申请的AppKey&sign=你申请的Sign&format=json
请求示例jsonp
http://api.k780.com:88/?app=weather.today&weaid=1&appkey=你申请的AppKey&sign=你申请的Sign&format=json&jsoncallback=data
请求示例xml
http://api.k780.com:88/?app=weather.today&weaid=1&appkey=你申请的AppKey&sign=你申请的Sign&format=xml
返回示例(Json)
{

        "success":  "1",
        "result":  {
                "weaid":  "1",
                "days":  "2014-07-30",
                "week":  "星期三",
                "cityno":  "beijing",
                "citynm":  "北京",
                "cityid":  "101010100",
                "temperature":  "31℃/24℃",
                "humidity":  "87.8℉/75.2℉",
                "weather":  "多云转晴",
                "weather_icon":  "http://api.k780.com:88/upload/weather/d/1.gif",
                "weather_icon1":  "http://api.k780.com:88/upload/weather/d/0.gif",
                "wind":  "微风",
                "winp":  "小于3级",
                "temp_high":  "31",
                "temp_low":  "24",
                "humi_high":  "87.8",
                "humi_low":  "75.2",
                "weatid":  "2",
                "weatid1":  "1",
                "windid":  "1",
                "winpid":  "2"
        }

}
返回示例(Jsonp)
xx(
{

        "success":  "1",
        "result":  {
                "weaid":  "1",
                "days":  "2014-07-30",
                "week":  "星期三",
                "cityno":  "beijing",
                "citynm":  "北京",
                "cityid":  "101010100",
                "temperature":  "31℃/24℃",
                "humidity":  "87.8℉/75.2℉",
                "weather":  "多云转晴",
                "weather_icon":  "http://api.k780.com:88/upload/weather/d/1.gif",
                "weather_icon1":  "http://api.k780.com:88/upload/weather/d/0.gif",
                "wind":  "微风",
                "winp":  "小于3级",
                "temp_high":  "31",
                "temp_low":  "24",
                "humi_high":  "87.8",
                "humi_low":  "75.2",
                "weatid":  "2",
                "weatid1":  "1",
                "windid":  "1",
                "winpid":  "2"
        }

}
)
返回示例(xml)
<root>
                <success>1</success>
                <result>
                                <weaid>1</weaid>
                                <days>2014-07-30</days>
                                <week>星期三</week>
                                <cityno>beijing</cityno>
                                <citynm>北京</citynm>
                                <cityid>101010100</cityid>
                                <temperature>31℃/24℃</temperature>
                                <humidity>87.8℉/75.2℉</humidity>
                                <weather>多云转晴</weather>
                                <weather_icon>http://api.k780.com:88/upload/weather/d/1.gif</weather_icon>
                                <weather_icon1>http://api.k780.com:88/upload/weather/d/0.gif</weather_icon1>
                                <wind>微风</wind>
                                <winp>小于3级</winp>
                                <temp_high>31</temp_high>
                                <temp_low>24</temp_low>
                                <humi_high>87.8</humi_high>
                                <humi_low>75.2</humi_low>
                                <weatid>2</weatid>
                                <weatid1>1</weatid1>
                                <windid>1</windid>
                                <winpid>2</winpid>
                </result>
</root>
请求限制/费用
套餐 配额(每小时) 单价(次)  
R1套餐(永久免费) 500次 - 马上开通
R2套餐(1元) 1000次 - 马上开通
R3套餐(3元) 3000次 - 马上开通
R4套餐(5元) 5000次 - 马上开通
R5套餐(10元) 10000次 - 马上开通
R6套餐(50元) 50000次 - 马上开通
R7套餐(100元) 100000次 - 马上开通
R8套餐(300元) 300000次 - 马上开通
R99单价版 1000000次 0.0010元 马上开通
技术支持
项目详情
社区:http://wiki.nowapi.com/?weather.today
QQ群交流:213124622 k780开放数据交流群
在线客服QQ:1597000273
商务合作QQ:362705971