开发指南

发布api对接文章到CSDN可联系客服领取10万次请求次数, 感谢您的支持

免费31日天气接口


包含基本天气、温度、风力风向等,可按地名、城市编号、IP查询。

收费方案

地区权限 请求限制 使用方案 发票
全国所有市区县 每日500次(不固定) 免费
全国所有市区县 每日2万次 100/一年 350/五年 600/永久 可开普票/电子票
全国所有市区县 每日5万次 200/一年 700/五年 1200/永久 可开普票/电子票
全国所有市区县 每日10万次 400/一年 1400/五年 2400/永久 可开普票/电子票
全国所有市区县 每日20万次 1000/一年 3500/五年 6000/永久 可开普票/电子票
全国所有市区县 每日50万次 2500/一年 8750/五年 15000/永久 可开普票/电子票
全国所有市区县 每日百万~千万次 联系客服开通独享版本,最低8800/年 可开普票/电子票

请求方式及url:

  • 请求方式:GET

  • 线路1(推荐)http://v1.yiketianqi.com/free/month

请求示例

http://v1.yiketianqi.com/free/month?unescape=1&appid=&appsecret=

请求参数说明:

参数名 必选 类型 说明 备注(示例)
appid string 用户appid 注册开发账号
appsecret string 用户appsecret
adcode string 国家统计局城市ID 如:130200000000 请参考 全国统计用区划代码表
cityid string 城市ID 请参考 城市ID列表
city string 城市名称 不要带市和区, 支持市区县, 不支持乡镇级别; 如: 青岛、铁西
ip string IP地址 查询IP所在城市天气
callback string jsonp参数 如: jQuery.Callbacks
vue string 跨域参数 如果您使用的是react、vue、angular请填写值: 1
unescape Int 是否转义中文 如果您希望json不被unicode, 直接输出中文, 请传此参数: 1

备注

cityid、city和ip参数3选一提交,如果不传,默认返回当前ip城市天气,cityid优先级最高。

响应JSON

{
    "nums":3,
    "cityid":"101120101",
    "city":"济南",
    "update_time":"2023-09-06 11:52:52",
    "data":[
        {
            "date":"2023-09-06",
            "wea":"晴",
            "wea_img":"qing",
            "wea_day":"晴",
            "wea_day_img":"qing",
            "wea_night":"晴",
            "wea_night_img":"qing",
            "tem_day":"32",
            "tem_night":"21",
            "win":"东北风<3级"
        },
        {
            "date":"2023-09-07",
            "wea":"晴",
            "wea_img":"qing",
            "wea_day":"晴",
            "wea_day_img":"qing",
            "wea_night":"晴",
            "wea_night_img":"qing",
            "tem_day":"33",
            "tem_night":"23",
            "win":"南风<3级"
        },
        {
            "date":"2023-09-08",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"33",
            "tem_night":"23",
            "win":"南风<3级"
        },
        {
            "date":"2023-09-09",
            "wea":"多云转小雨",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"小雨",
            "wea_night_img":"yu",
            "tem_day":"32",
            "tem_night":"24",
            "win":"南风<3级"
        },
        {
            "date":"2023-09-10",
            "wea":"多云转阴",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"阴",
            "wea_night_img":"yin",
            "tem_day":"31",
            "tem_night":"23",
            "win":"西南风<3级"
        },
        {
            "date":"2023-09-11",
            "wea":"阴",
            "wea_img":"yin",
            "wea_day":"阴",
            "wea_day_img":"yin",
            "wea_night":"阴",
            "wea_night_img":"yin",
            "tem_day":"31",
            "tem_night":"24",
            "win":"西南风<3级"
        },
        {
            "date":"2023-09-12",
            "wea":"小雨转多云",
            "wea_img":"yun",
            "wea_day":"小雨",
            "wea_day_img":"yu",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"32",
            "tem_night":"22",
            "win":"西南风<3级"
        },
        {
            "date":"2023-09-13",
            "wea":"雨转晴",
            "wea_img":"yu",
            "wea_day":"雨",
            "wea_day_img":"yu",
            "wea_night":"晴",
            "wea_night_img":"qing",
            "tem_day":"27",
            "tem_night":"18",
            "win":"东北风<3级"
        },
        {
            "date":"2023-09-14",
            "wea":"晴",
            "wea_img":"qing",
            "wea_day":"晴",
            "wea_day_img":"qing",
            "wea_night":"晴",
            "wea_night_img":"qing",
            "tem_day":"28",
            "tem_night":"20",
            "win":"东风<3级"
        },
        {
            "date":"2023-09-15",
            "wea":"晴转阴",
            "wea_img":"yin",
            "wea_day":"晴",
            "wea_day_img":"qing",
            "wea_night":"阴",
            "wea_night_img":"yin",
            "tem_day":"29",
            "tem_night":"19",
            "win":"东风<3级"
        },
        {
            "date":"2023-09-16",
            "wea":"阴",
            "wea_img":"yin",
            "wea_day":"阴",
            "wea_day_img":"yin",
            "wea_night":"阴",
            "wea_night_img":"yin",
            "tem_day":"29",
            "tem_night":"21",
            "win":"东风<3级"
        },
        {
            "date":"2023-09-17",
            "wea":"阴",
            "wea_img":"yin",
            "wea_day":"阴",
            "wea_day_img":"yin",
            "wea_night":"阴",
            "wea_night_img":"yin",
            "tem_day":"29",
            "tem_night":"23",
            "win":"西南风<3级"
        },
        {
            "date":"2023-09-18",
            "wea":"雨",
            "wea_img":"yu",
            "wea_day":"雨",
            "wea_day_img":"yu",
            "wea_night":"雨",
            "wea_night_img":"yu",
            "tem_day":"31",
            "tem_night":"23",
            "win":"东风<3级"
        },
        {
            "date":"2023-09-19",
            "wea":"雨",
            "wea_img":"yu",
            "wea_day":"雨",
            "wea_day_img":"yu",
            "wea_night":"雨",
            "wea_night_img":"yu",
            "tem_day":"25",
            "tem_night":"18",
            "win":"北风<3级"
        },
        {
            "date":"2023-09-20",
            "wea":"阴",
            "wea_img":"yin",
            "wea_day":"阴",
            "wea_day_img":"yin",
            "wea_night":"阴",
            "wea_night_img":"yin",
            "tem_day":"25",
            "tem_night":"18",
            "win":"东北风<3级"
        },
        {
            "date":"2023-09-21",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"27",
            "tem_night":"18",
            "win":""
        },
        {
            "date":"2023-09-22",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"27",
            "tem_night":"18",
            "win":""
        },
        {
            "date":"2023-09-23",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"26",
            "tem_night":"17",
            "win":""
        },
        {
            "date":"2023-09-24",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"27",
            "tem_night":"18",
            "win":""
        },
        {
            "date":"2023-09-25",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"27",
            "tem_night":"18",
            "win":""
        },
        {
            "date":"2023-09-26",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"27",
            "tem_night":"18",
            "win":""
        },
        {
            "date":"2023-09-27",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"27",
            "tem_night":"18",
            "win":""
        },
        {
            "date":"2023-09-28",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"27",
            "tem_night":"18",
            "win":""
        },
        {
            "date":"2023-09-29",
            "wea":"小雨",
            "wea_img":"yu",
            "wea_day":"小雨",
            "wea_day_img":"yu",
            "wea_night":"小雨",
            "wea_night_img":"yu",
            "tem_day":"26",
            "tem_night":"17",
            "win":""
        },
        {
            "date":"2023-09-30",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"26",
            "tem_night":"17",
            "win":""
        },
        {
            "date":"2023-10-01",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"26",
            "tem_night":"17",
            "win":""
        },
        {
            "date":"2023-10-02",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"25",
            "tem_night":"16",
            "win":""
        },
        {
            "date":"2023-10-03",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"25",
            "tem_night":"16",
            "win":""
        },
        {
            "date":"2023-10-04",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"25",
            "tem_night":"16",
            "win":""
        },
        {
            "date":"2023-10-05",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"25",
            "tem_night":"16",
            "win":""
        },
        {
            "date":"2023-10-06",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"25",
            "tem_night":"16",
            "win":""
        },
        {
            "date":"2023-10-07",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"25",
            "tem_night":"15",
            "win":""
        },
        {
            "date":"2023-10-08",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"25",
            "tem_night":"16",
            "win":""
        },
        {
            "date":"2023-10-09",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"25",
            "tem_night":"16",
            "win":""
        },
        {
            "date":"2023-10-10",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"24",
            "tem_night":"14",
            "win":""
        },
        {
            "date":"2023-10-11",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"24",
            "tem_night":"15",
            "win":""
        },
        {
            "date":"2023-10-12",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"24",
            "tem_night":"14",
            "win":""
        },
        {
            "date":"2023-10-13",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"24",
            "tem_night":"15",
            "win":""
        },
        {
            "date":"2023-10-14",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"24",
            "tem_night":"15",
            "win":""
        },
        {
            "date":"2023-10-15",
            "wea":"多云",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem_day":"24",
            "tem_night":"14",
            "win":""
        }
    ]
}

响应参数说明

参数名 类型 说明 备注
nums String 今日请求次数
cityid String 城市ID
city String 城市名称
update_time String 更新时间
date String 预报日期
wea String 天气情况
wea_day String 白天天气
wea_night String 夜间天气
wea_img String 天气对应图标 固定9种类型(您也可以根据wea字段自己处理):
xue、lei、shachen、wu、bingbao、yun、yu、yin、qing
tem_day String 白天温度(高温)
tem_night String 白天温度(低温)
win String 风力风向