嗨豆壳API,获取数据其实如此简单.
hi-docs.com

全国城市7日天气预报 Weather API

接口地址 :

https://api.hi-docs.com/weather/

请求方法 :

GET

请求参数 :

参数名类型必填描述
cityGET必填城市名称,如:北京

返回示例 :

{
    "code": 200,
    "res": [
        [
            "4日(今天)",
            "雷阵雨",
            "30/25℃",
            "3-4级转微风"
        ],
        [
            "5日(明天)",
            "雷阵雨转多云",
            "32/26℃",
            "3-4级转微风"
        ],
        [
            "6日(后天)",
            "多云转雷阵雨",
            "33/26℃",
            "3-4级转微风"
        ],
        [
            "7日(周五)",
            "雷阵雨",
            "33/26℃",
            "3-4级转微风"
        ],
        [
            "8日(周六)",
            "雷阵雨转多云",
            "33/27℃",
            "微风"
        ],
        [
            "9日(周日)",
            "多云",
            "34/27℃",
            "微风"
        ],
        [
            "10日(周一)",
            "多云转中雨",
            "34/25℃",
            "微风"
        ]
    ]
}