登录 注册

1~40日天气v3

  • 请求限制:
  • 每日10万次 (可升级,量大请联系客服)
  • 计费方式:
  • 包年/永久
  • 价格:
  • 365/年起
  • 发票:
  • 普票/电子票/专票
功能介绍

该接口2小时更新一次,返回最近40日天气, 包含每日日期、农历日期、星期几、天气情况、白天天气、夜间天气、高温低温、日出日落时间、空气质量等,可按地名、城市编号、LBS、IP查询。

请求方式及url:

  • 请求方式:GET

接口地址:(建议在服务端设置线路地址为动态可修改的)

  • 线路1(推荐)https://v0.yiketianqi.com/api
  • 线路2:https://yiketianqi.com/api

请求示例

https://v0.yiketianqi.com/api?version=v3&appid=&appsecret=

请求参数说明:

参数名 必选 类型 说明 备注(示例)
appid string 用户appid 注册开发账号
appsecret string 用户appsecret
version string 接口版本标识 固定值: v2v3 v2:15日 v3:40日
cityid string 城市ID 请参考 城市ID列表
city string 城市名称 不要带市和区; 如: 青岛、铁西
province string 所在省 如果您担心city重名可传此参数, 不要带省和市; 如: 山东、上海
ip string IP地址 查询IP所在城市天气
lng String 经度 如: 119.545023 (需额外开通lbs权限, 500/年, 2000/5年, 3000/永久)
lat String 纬度 如: 36.044254
point String 坐标体系 默认百度坐标, 如使用高德坐标, 请传参: gaode
callback string jsonp参数 如: jQuery.Callbacks
vue string 跨域参数 如果您使用的是react、vue、angular请填写值: 1

备注

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

响应JSON
{
    "city":"济南", #城市名称
    "cityid":"101120101", #城市ID
    "update_time":"2021-06-16 21:06:20", #更新时间
    "data":[
        {
            "date":"2021-06-16", #日期
            "date_nl":"五月初七", #农历日期
            "week":"星期三", #星期
            "wea":"多云转雷阵雨", #天气情况
            "wea_c":"01", #天气情况代码
            "wea_img":"lei", #天气情况图标 固定9种类型: xue、lei、shachen、wu、bingbao、yun、yu、yin、qing
            "wea_day":"多云", #白天天气
            "wea_day_img":"yun",
            "wea_night":"雷阵雨", #夜间天气
            "wea_night_img":"lei",
            "tem1":"29", #高温
            "tem2":"21", #低温
            "sunrise":"04:52", #日出时间
            "sunset":"19:32", #日落时间
            "air":"41", #空气质量
            "win":"南风<3级", #风力风向
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-06-17",
            "date_nl":"五月初八",
            "week":"星期四",
            "wea":"雷阵雨转多云",
            "wea_c":"04",
            "wea_img":"lei",
            "wea_day":"雷阵雨",
            "wea_day_img":"lei",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem1":"25",
            "tem2":"19",
            "sunrise":"04:52",
            "sunset":"19:32",
            "air":"40",
            "win":"北风<3级",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-06-18",
            "date_nl":"五月初九",
            "week":"星期五",
            "wea":"晴",
            "wea_c":"00",
            "wea_img":"qing",
            "wea_day":"晴",
            "wea_day_img":"qing",
            "wea_night":"晴",
            "wea_night_img":"qing",
            "tem1":"31",
            "tem2":"21",
            "sunrise":"04:52",
            "sunset":"19:32",
            "air":"12",
            "win":"南风<3级",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-06-19",
            "date_nl":"五月初十",
            "week":"星期六",
            "wea":"晴",
            "wea_c":"00",
            "wea_img":"qing",
            "wea_day":"晴",
            "wea_day_img":"qing",
            "wea_night":"晴",
            "wea_night_img":"qing",
            "tem1":"34",
            "tem2":"24",
            "sunrise":"04:52",
            "sunset":"19:32",
            "air":"22",
            "win":"南风<3级",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-06-20",
            "date_nl":"五月十一",
            "week":"星期日",
            "wea":"晴",
            "wea_c":"00",
            "wea_img":"qing",
            "wea_day":"晴",
            "wea_day_img":"qing",
            "wea_night":"晴",
            "wea_night_img":"qing",
            "tem1":"34",
            "tem2":"24",
            "sunrise":"04:52",
            "sunset":"19:33",
            "air":"25",
            "win":"南风3-4级",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-06-21",
            "date_nl":"五月十二",
            "week":"星期一",
            "wea":"晴转多云",
            "wea_c":"00",
            "wea_img":"yun",
            "wea_day":"晴",
            "wea_day_img":"qing",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem1":"33",
            "tem2":"24",
            "sunrise":"04:53",
            "sunset":"19:33",
            "air":"",
            "win":"南风<3级",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-06-22",
            "date_nl":"五月十三",
            "week":"星期二",
            "wea":"多云转晴",
            "wea_c":"01",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"晴",
            "wea_night_img":"qing",
            "tem1":"33",
            "tem2":"23",
            "sunrise":"04:53",
            "sunset":"19:33",
            "air":"",
            "win":"南风<3级",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-06-23",
            "date_nl":"五月十四",
            "week":"星期三",
            "wea":"雨",
            "wea_c":"301",
            "wea_img":"yu",
            "wea_day":"雨",
            "wea_day_img":"yu",
            "wea_night":"雨",
            "wea_night_img":"yu",
            "tem1":"30",
            "tem2":"21",
            "sunrise":"04:53",
            "sunset":"19:33",
            "air":"",
            "win":"东南风<3级",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-06-24",
            "date_nl":"五月十五",
            "week":"星期四",
            "wea":"雨转多云",
            "wea_c":"301",
            "wea_img":"yun",
            "wea_day":"雨",
            "wea_day_img":"yu",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem1":"32",
            "tem2":"21",
            "sunrise":"04:53",
            "sunset":"19:33",
            "air":"",
            "win":"南风<3级",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-06-25",
            "date_nl":"五月十六",
            "week":"星期五",
            "wea":"雨",
            "wea_c":"301",
            "wea_img":"yu",
            "wea_day":"雨",
            "wea_day_img":"yu",
            "wea_night":"雨",
            "wea_night_img":"yu",
            "tem1":"31",
            "tem2":"22",
            "sunrise":"04:54",
            "sunset":"19:34",
            "air":"",
            "win":"南风<3级",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-06-26",
            "date_nl":"五月十七",
            "week":"星期六",
            "wea":"阴转雨",
            "wea_c":"02",
            "wea_img":"yu",
            "wea_day":"阴",
            "wea_day_img":"yin",
            "wea_night":"雨",
            "wea_night_img":"yu",
            "tem1":"34",
            "tem2":"24",
            "sunrise":"04:54",
            "sunset":"19:34",
            "air":"",
            "win":"东风<3级",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-06-27",
            "date_nl":"五月十八",
            "week":"星期日",
            "wea":"雨",
            "wea_c":"301",
            "wea_img":"yu",
            "wea_day":"雨",
            "wea_day_img":"yu",
            "wea_night":"雨",
            "wea_night_img":"yu",
            "tem1":"35",
            "tem2":"23",
            "sunrise":"04:54",
            "sunset":"19:34",
            "air":"",
            "win":"东风<3级",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-06-28",
            "date_nl":"五月十九",
            "week":"星期一",
            "wea":"雨",
            "wea_c":"301",
            "wea_img":"yu",
            "wea_day":"雨",
            "wea_day_img":"yu",
            "wea_night":"雨",
            "wea_night_img":"yu",
            "tem1":"33",
            "tem2":"22",
            "sunrise":"04:55",
            "sunset":"19:34",
            "air":"",
            "win":"南风<3级",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-06-29",
            "date_nl":"五月二十",
            "week":"星期二",
            "wea":"晴",
            "wea_c":"00",
            "wea_img":"qing",
            "wea_day":"晴",
            "wea_day_img":"qing",
            "wea_night":"晴",
            "wea_night_img":"qing",
            "tem1":"30",
            "tem2":"20",
            "sunrise":"04:55",
            "sunset":"19:34",
            "air":"",
            "win":"东南风<3级",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-06-30",
            "date_nl":"五月廿一",
            "week":"星期三",
            "wea":"阴转晴",
            "wea_c":"02",
            "wea_img":"yin",
            "wea_day":"阴",
            "wea_day_img":"yin",
            "wea_night":"晴",
            "wea_night_img":"qing",
            "tem1":"32",
            "tem2":"22",
            "sunrise":"04:56",
            "sunset":"19:34",
            "air":"",
            "win":"南风<3级",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-01",
            "date_nl":"五月廿二",
            "week":"星期四",
            "wea":"中雨",
            "wea_c":"08",
            "wea_img":"yu",
            "wea_day":"中雨",
            "wea_day_img":"yu",
            "wea_night":"中雨",
            "wea_night_img":"yu",
            "tem1":"33",
            "tem2":"26",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-02",
            "date_nl":"五月廿三",
            "week":"星期五",
            "wea":"小雨",
            "wea_c":"07",
            "wea_img":"yu",
            "wea_day":"小雨",
            "wea_day_img":"yu",
            "wea_night":"小雨",
            "wea_night_img":"yu",
            "tem1":"32",
            "tem2":"26",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-03",
            "date_nl":"五月廿四",
            "week":"星期六",
            "wea":"多云",
            "wea_c":"01",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem1":"33",
            "tem2":"26",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-04",
            "date_nl":"五月廿五",
            "week":"星期日",
            "wea":"多云",
            "wea_c":"01",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem1":"33",
            "tem2":"26",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-05",
            "date_nl":"五月廿六",
            "week":"星期一",
            "wea":"中雨",
            "wea_c":"08",
            "wea_img":"yu",
            "wea_day":"中雨",
            "wea_day_img":"yu",
            "wea_night":"中雨",
            "wea_night_img":"yu",
            "tem1":"32",
            "tem2":"26",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-06",
            "date_nl":"五月廿七",
            "week":"星期二",
            "wea":"多云",
            "wea_c":"01",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem1":"32",
            "tem2":"26",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-07",
            "date_nl":"五月廿八",
            "week":"星期三",
            "wea":"多云",
            "wea_c":"01",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem1":"33",
            "tem2":"27",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-08",
            "date_nl":"五月廿九",
            "week":"星期四",
            "wea":"多云",
            "wea_c":"01",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem1":"33",
            "tem2":"27",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-09",
            "date_nl":"五月三十",
            "week":"星期五",
            "wea":"多云",
            "wea_c":"01",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem1":"33",
            "tem2":"27",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-10",
            "date_nl":"六月初一",
            "week":"星期六",
            "wea":"多云",
            "wea_c":"01",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem1":"34",
            "tem2":"27",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-11",
            "date_nl":"六月初二",
            "week":"星期日",
            "wea":"多云",
            "wea_c":"01",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem1":"34",
            "tem2":"27",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-12",
            "date_nl":"六月初三",
            "week":"星期一",
            "wea":"小雨",
            "wea_c":"07",
            "wea_img":"yu",
            "wea_day":"小雨",
            "wea_day_img":"yu",
            "wea_night":"小雨",
            "wea_night_img":"yu",
            "tem1":"33",
            "tem2":"26",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-13",
            "date_nl":"六月初四",
            "week":"星期二",
            "wea":"中雨",
            "wea_c":"08",
            "wea_img":"yu",
            "wea_day":"中雨",
            "wea_day_img":"yu",
            "wea_night":"中雨",
            "wea_night_img":"yu",
            "tem1":"33",
            "tem2":"27",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-14",
            "date_nl":"六月初五",
            "week":"星期三",
            "wea":"多云",
            "wea_c":"01",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem1":"33",
            "tem2":"27",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-15",
            "date_nl":"六月初六",
            "week":"星期四",
            "wea":"小雨",
            "wea_c":"07",
            "wea_img":"yu",
            "wea_day":"小雨",
            "wea_day_img":"yu",
            "wea_night":"小雨",
            "wea_night_img":"yu",
            "tem1":"33",
            "tem2":"26",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-16",
            "date_nl":"六月初七",
            "week":"星期五",
            "wea":"小雨",
            "wea_c":"07",
            "wea_img":"yu",
            "wea_day":"小雨",
            "wea_day_img":"yu",
            "wea_night":"小雨",
            "wea_night_img":"yu",
            "tem1":"33",
            "tem2":"27",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-17",
            "date_nl":"六月初八",
            "week":"星期六",
            "wea":"多云",
            "wea_c":"01",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem1":"33",
            "tem2":"27",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-18",
            "date_nl":"六月初九",
            "week":"星期日",
            "wea":"多云",
            "wea_c":"01",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem1":"33",
            "tem2":"27",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-19",
            "date_nl":"六月初十",
            "week":"星期一",
            "wea":"多云",
            "wea_c":"01",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem1":"33",
            "tem2":"27",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-20",
            "date_nl":"六月十一",
            "week":"星期二",
            "wea":"多云",
            "wea_c":"01",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem1":"33",
            "tem2":"27",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-21",
            "date_nl":"六月十二",
            "week":"星期三",
            "wea":"中雨",
            "wea_c":"08",
            "wea_img":"yu",
            "wea_day":"中雨",
            "wea_day_img":"yu",
            "wea_night":"中雨",
            "wea_night_img":"yu",
            "tem1":"33",
            "tem2":"27",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-22",
            "date_nl":"六月十三",
            "week":"星期四",
            "wea":"中雨",
            "wea_c":"08",
            "wea_img":"yu",
            "wea_day":"中雨",
            "wea_day_img":"yu",
            "wea_night":"中雨",
            "wea_night_img":"yu",
            "tem1":"33",
            "tem2":"27",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-23",
            "date_nl":"六月十四",
            "week":"星期五",
            "wea":"中雨",
            "wea_c":"08",
            "wea_img":"yu",
            "wea_day":"中雨",
            "wea_day_img":"yu",
            "wea_night":"中雨",
            "wea_night_img":"yu",
            "tem1":"33",
            "tem2":"27",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-24",
            "date_nl":"六月十五",
            "week":"星期六",
            "wea":"多云",
            "wea_c":"01",
            "wea_img":"yun",
            "wea_day":"多云",
            "wea_day_img":"yun",
            "wea_night":"多云",
            "wea_night_img":"yun",
            "tem1":"33",
            "tem2":"26",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        },
        {
            "date":"2021-07-25",
            "date_nl":"六月十六",
            "week":"星期日",
            "wea":"小雨",
            "wea_c":"07",
            "wea_img":"yu",
            "wea_day":"小雨",
            "wea_day_img":"yu",
            "wea_night":"小雨",
            "wea_night_img":"yu",
            "tem1":"33",
            "tem2":"26",
            "sunrise":"",
            "sunset":"",
            "air":"",
            "win":"",
            "win_day":"",
            "win_night":""
        }
    ]
}
示例代码
$ curl "https://v0.yiketianqi.com/api?version=v3&appid=&appsecret="
错误码参考
字段 错误码 说明
errcode 100 该接口有任何异常报错都会返回errcode报错, 并且只有100, 具体报错描述请参考字段:errmsg
{
    "errcode":100,
    "errmsg":"缺少注册参数appid或appsecret"
}
  • 服务商:
  • 济南易客云网络科技有限公司
  • 认证状态:
  • 客服电话:
  • 0531-67820804
  • 对接QQ:
  • 445899710
  • 对接微信:

济南易客云网络科技有限公司. 网站备案号:鲁ICP备20002338号-3