开发指南

新用户可测试2000次 比某度更精准、及时,请进入气象台网站对比数据

乡镇7日天气 收费在线测试此接口(需要登录)


支持全国4.6万个乡镇数据, 和气象局数据同步

请求方式及url:

  • 请求方式:GET

  • 接口地址:(请将线路地址设置为动态可修改的)

  • 线路1(推荐)https://town.yiketianqi.com

请求示例

https://town.yiketianqi.com/?appid=&appsecret=&version=week&citycode=398772

请求参数说明:

参数名 必选 类型 说明 备注(示例)
appid string 用户appid 注册开发账号
appsecret string 用户appsecret
version string 接口类型 固定值: week
citycode string 城市ID 购买后请联系客服索要 全国4.6万+乡镇城市ID列表
callback string jsonp参数 如: jQuery.Callbacks
vue string 跨域参数 如果您使用的是react、vue、angular请填写值: 1

备注

该接口只能根据citycode查询。

响应JSON

{
    "citycode":"398772",
    "province":"天津",
    "city":"东丽",
    "area":"",
    "town":"综合保税区",
    "update_time":"21:04",
    "data":[
        {
            "date":"2021-01-17",
            "wea":"晴转多云",
            "wea_img":"yun",
            "win":"西风转北风",
            "win_speed":"3-4级转<3级",
            "tem_day":"4",
            "tem_night":"-4",
            "hours":[
                {
                    "hours":"20时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"-2",
                    "win":"西南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"21时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"-2",
                    "win":"西南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"22时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"-3",
                    "win":"西风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"23时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"-3",
                    "win":"西风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"00时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"-3",
                    "win":"西风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"01时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"-3",
                    "win":"西北风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"02时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"-4",
                    "win":"西北风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"03时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"-3",
                    "win":"北风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"04时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"-3",
                    "win":"北风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"05时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"-3",
                    "win":"北风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"06时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"-3",
                    "win":"西风",
                    "win_speed":"3-4级"
                },
                {
                    "hours":"07时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"-3",
                    "win":"西南风",
                    "win_speed":"<3级"
                }
            ]
        },
        {
            "date":"2021-01-18",
            "wea":"晴转阴",
            "wea_img":"yin",
            "win":"东南风转东南风",
            "win_speed":"3-4级",
            "tem_day":"4",
            "tem_night":"-5",
            "hours":[
                {
                    "hours":"08时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"-4",
                    "win":"北风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"09时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"00",
                    "win":"北风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"10时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"00",
                    "win":"东北风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"11时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"02",
                    "win":"东北风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"12时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"02",
                    "win":"东北风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"13时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"03",
                    "win":"东北风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"14时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"03",
                    "win":"东风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"15时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"03",
                    "win":"东风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"16时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"03",
                    "win":"东风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"17时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"00",
                    "win":"东南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"18时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"-2",
                    "win":"东南风",
                    "win_speed":"3-4级"
                },
                {
                    "hours":"19时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"-3",
                    "win":"东南风",
                    "win_speed":"3-4级"
                },
                {
                    "hours":"20时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"-3",
                    "win":"东南风",
                    "win_speed":"3-4级"
                },
                {
                    "hours":"21时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"-3",
                    "win":"东南风",
                    "win_speed":"3-4级"
                },
                {
                    "hours":"22时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"-3",
                    "win":"东南风",
                    "win_speed":"3-4级"
                },
                {
                    "hours":"23时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"-4",
                    "win":"东南风",
                    "win_speed":"3-4级"
                },
                {
                    "hours":"00时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"-4",
                    "win":"东南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"01时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"-4",
                    "win":"东南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"02时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"-4",
                    "win":"东南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"03时",
                    "wea":"阴",
                    "wea_img":"yin",
                    "tem":"-4",
                    "win":"东南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"04时",
                    "wea":"阴",
                    "wea_img":"yin",
                    "tem":"-4",
                    "win":"东南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"05时",
                    "wea":"阴",
                    "wea_img":"yin",
                    "tem":"-4",
                    "win":"东南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"06时",
                    "wea":"阴",
                    "wea_img":"yin",
                    "tem":"-4",
                    "win":"东南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"07时",
                    "wea":"阴",
                    "wea_img":"yin",
                    "tem":"-4",
                    "win":"东南风",
                    "win_speed":"<3级"
                }
            ]
        },
        {
            "date":"2021-01-19",
            "wea":"多云转阴",
            "wea_img":"yun",
            "win":"东南风转北风",
            "win_speed":"<3级",
            "tem_day":"2",
            "tem_night":"-5",
            "hours":[
                {
                    "hours":"08时",
                    "wea":"阴",
                    "wea_img":"yin",
                    "tem":"-5",
                    "win":"东南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"09时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"-3",
                    "win":"东南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"10时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"-1",
                    "win":"东南风",
                    "win_speed":"3-4级"
                },
                {
                    "hours":"11时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"00",
                    "win":"东南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"12时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"00",
                    "win":"东南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"13时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"01",
                    "win":"东南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"14时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"01",
                    "win":"东南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"15时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"02",
                    "win":"东南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"16时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"01",
                    "win":"东南风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"17时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"00",
                    "win":"东风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"18时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"-2",
                    "win":"东风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"19时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"-2",
                    "win":"东风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"20时",
                    "wea":"晴",
                    "wea_img":"qing",
                    "tem":"-2",
                    "win":"东北风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"21时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"-3",
                    "win":"东风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"22时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"-3",
                    "win":"东风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"23时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"-3",
                    "win":"北风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"00时",
                    "wea":"多云",
                    "wea_img":"yun",
                    "tem":"-3",
                    "win":"东风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"01时",
                    "wea":"阴",
                    "wea_img":"yin",
                    "tem":"-4",
                    "win":"东风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"02时",
                    "wea":"阴",
                    "wea_img":"yin",
                    "tem":"-4",
                    "win":"北风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"03时",
                    "wea":"阴",
                    "wea_img":"yin",
                    "tem":"-4",
                    "win":"东风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"04时",
                    "wea":"阴",
                    "wea_img":"yin",
                    "tem":"-4",
                    "win":"东风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"05时",
                    "wea":"阴",
                    "wea_img":"yin",
                    "tem":"-4",
                    "win":"北风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"06时",
                    "wea":"阴",
                    "wea_img":"yin",
                    "tem":"-4",
                    "win":"东风",
                    "win_speed":"<3级"
                },
                {
                    "hours":"07时",
                    "wea":"阴",
                    "wea_img":"yin",
                    "tem":"-4",
                    "win":"东风",
                    "win_speed":"<3级"
                }
            ]
        },
        {
            "date":"2021-01-20",
            "wea":"阴转多云",
            "wea_img":"yun",
            "win":"北风转西北风",
            "win_speed":"<3级",
            "tem_day":"4",
            "tem_night":"-5",
            "hours":[

            ]
        },
        {
            "date":"2021-01-21",
            "wea":"晴转阴",
            "wea_img":"yin",
            "win":"南风转西南风",
            "win_speed":"<3级",
            "tem_day":"6",
            "tem_night":"-4",
            "hours":[

            ]
        },
        {
            "date":"2021-01-22",
            "wea":"阴",
            "wea_img":"yin",
            "win":"东风转东北风",
            "win_speed":"<3级",
            "tem_day":"5",
            "tem_night":"-3",
            "hours":[

            ]
        },
        {
            "date":"2021-01-23",
            "wea":"阴转晴",
            "wea_img":"yin",
            "win":"南风转西风",
            "win_speed":"<3级",
            "tem_day":"3",
            "tem_night":"-4",
            "hours":[

            ]
        }
    ]
}