维梦API - 提供免费接口调用平台
该API已经过安全认证,请放心使用
工具 · 多日天气
用于查询某城市地区多日的###天气

接口地址: https://api.52vmy.cn/api/query/tian/many

返回格式: JSON

请求方式: GET

请求示例: https://api.52vmy.cn/api/query/tian/many?city=北京市

接口定制: 点此加入用户群

默认QPS: 每2秒最多3次 携带Token可无视限制

接口备注:点击前往当日详细天气API

请求参数说明:

名称 必填 类型 说明
city string 城市
type string 返回格式默认JSON可选text

返回参数说明:

名称 类型 说明

返回示例:

{
    "code": 200,
    "msg": "成功",
    "data": {
        "city": "北京市",
        "info": [
            {
                "Time": "周三",
                "temperature": "-4~6℃",
                "weather": "晴",
                "bearing": "西北风-4级",
                "air_quality": "良"
            },
            {
                "Time": "周四",
                "temperature": "-5~3℃",
                "weather": "晴",
                "bearing": "西北风-3级",
                "air_quality": "优"
            },
            {
                "Time": "周五",
                "temperature": "-7~2℃",
                "weather": "晴",
                "bearing": "西北风-3级",
                "air_quality": "优"
            },
            {
                "Time": "周六",
                "temperature": "-8~5℃",
                "weather": "晴",
                "bearing": "西南风-2级",
                "air_quality": "优"
            },
            {
                "Time": "周日",
                "temperature": "-7~5℃",
                "weather": "晴",
                "bearing": "西南风-1级",
                "air_quality": "轻度"
            },
            {
                "Time": "周一",
                "temperature": "-5~6℃",
                "weather": "晴",
                "bearing": "西北风-3级",
                "air_quality": "良"
            }
        ]
    }
}

PHP代码示例:

$city = $_GET["city"];
$type = $_GET["type"];
$url = "https://api.52vmy.cn/api/query/tian/many?city=".$city."&type=".$type;
echo file_get_contents($url);