天气[v1]
可自动或手动获取对应城市天气
支持自动定位及手动定位(仅限中国)

接口地址: https://api.htloli.com/api/v2/weather_v1

返回格式: JSON

请求方式: GET / POST

请求示例: https://api.htloli.com/api/v2/weather_v1?authorization=你的Authorization&type=city&city=北京

请求参数说明:

名称 必填 类型 说明
type string 类型:auto(自动获取地址,默认)、city(根据城市获取)、ip(根据IP获取)
city 按需 string 仅限 type 为city时必填
ip 按需 string 仅限 type 为ip时必填

返回参数说明:

返回内容为图片或者直接跳转链接,无返回参数(如果有返回示例,请根据返回示例的内容分析返回参数)

额外说明:

暂无额外说明

返回示例:

{
    "data": {
        "city": "北京",
        "forecast": [
            {
                "date": [
                    "21号",
                    "星期三"
                ],
                "fengli": "2级",
                "fengxiang": "北风",
                "type": "阴",
                "temp": {
                    "high": [
                        "最高气温",
                        "1℃"
                    ],
                    "low": [
                        "最低气温",
                        "-7℃"
                    ]
                }
            },
            {
                "date": [
                    "22号",
                    "星期四"
                ],
                "fengli": "3级",
                "fengxiang": "西北风",
                "type": "晴",
                "temp": {
                    "high": [
                        "最高气温",
                        "-2℃"
                    ],
                    "low": [
                        "最低气温",
                        "-8℃"
                    ]
                }
            },
            {
                "date": [
                    "23号",
                    "星期五"
                ],
                "fengli": "2级",
                "fengxiang": "北风",
                "type": "晴",
                "temp": {
                    "high": [
                        "最高气温",
                        "2℃"
                    ],
                    "low": [
                        "最低气温",
                        "-7℃"
                    ]
                }
            },
            {
                "date": [
                    "24号",
                    "星期六"
                ],
                "fengli": "2级",
                "fengxiang": "北风",
                "type": "晴",
                "temp": {
                    "high": [
                        "最高气温",
                        "2℃"
                    ],
                    "low": [
                        "最低气温",
                        "-7℃"
                    ]
                }
            }
        ],
        "ganmao": "感冒多发期,适当减少外出频率,适量补充水分,适当增减衣物。",
        "wendu": "0",
        "day": {
            "date": [
                "20号",
                "星期二"
            ],
            "fengli": "2级",
            "fengxiang": "西北风",
            "type": "多云",
            "temp": {
                "high": [
                    "最高气温",
                    "3℃"
                ],
                "low": [
                    "最低气温",
                    "-5℃"
                ]
            },
            "image": "https://images.unsplash.com/photo-1559963110-71b394e7494d?auto=format&fit=crop&ixid=eyJhcHBfaWQiOjEyMDd9&ixlib=rb-1.2.1&q=80&w=675"
        }
    },
    "status": 1000,
    "desc": "OK",
    "ipFrom": "[HenTaiAPI][https://api.htloli.com]"
}
{{ item.label }} {{ item.value }} 请求



                                

                                

                                
MarkDown编辑器

代码示例:

暂无代码示例