天气信息(微软)

获取天气信息(微软)

接口状态:正常
总调用:76
添加时间:2025-12-21
更新时间:2026-01-15

请求信息

https://api.andeer.top/API/weather_ms.php
https://api.andeer.top/API/weather_ms.php?city=广州

请求参数

参数名类型必填说明
citystring城市的名称

状态码说明

状态码说明
200请求成功,服务器已成功处理了请求。
403服务器拒绝请求。这可能是由于缺少必要的认证凭据(如API密钥)或权限不足。
404请求的资源未找到。请检查您的请求地址是否正确。
429请求过于频繁。您已超出速率限制,请稍后再试。
500服务器内部错误。服务器在执行请求时遇到了问题。

在线测试

此处将显示接口返回结果...

调用示例

<?php
$url = 'https://api.andeer.top/API/weather_ms.php';
$params = ['city' => 'YOUR_VALUE', ];
$url .= '?' . http_build_query($params);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import requests

url = "https://api.andeer.top/API/weather_ms.php"
params = {
    'city': 'YOUR_VALUE',
}
response = requests.get(url, params=params)
print(response.text)
const url = new URL('https://api.andeer.top/API/weather_ms.php');
const params = {
    'city': 'YOUR_VALUE',
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

                fetch(url)
                    .then(response => response.text())
                    .then(data => console.log(data))
                    .catch(error => console.error('Error:', error));

返回示例

{
    "success": true,
    "code": 200,
    "msg": "获取成功",
    "data": [
        {
            "城市": "江苏省, 南京市",
            "天气": "晴朗",
            "温度": "4°C",
            "体感温度": "-1°",
            "小提示": "今天大部分地区多云。 最高气温9°。",
            "空气": "30",
            "空气质量": "空气优 (0-50)",
            "主要污染物": "PM10 29 μg\/m³",
            "风速": "东风 2级",
            "风速说明1": "轻风 (6 - 11 公里\/小时)",
            "风速说明2": "脸上感觉到风; 树叶沙沙作响; 风吹动  风向标 。",
            "湿度": "70%",
            "湿度说明": "相对于空气在当前温度下所能包含的最大水分量,空气中存在的水分量。",
            "能见度": "24.9 公里",
            "能见度说明": "非常好的能见度 (10 - 30 公里)",
            "气压": "1025 hPa",
            "气压说明": "气压是大气中空气的重量。它被归纳为标准大气压力 1,013.25 mb (29.9212 inHg)。较高的气压通常与晴朗的天气相关,较低的气压与暴风雨天气相关。",
            "露点": "-1°",
            "露点说明": "使空气中水分凝结成液态水(例如露水)所需要降至的温度。露点越高,感觉越“闷热”。"
        }
    ],
    "text": {
        "copyright": "Aurora 2022.8.14",
        "time": "当前时间为:2025-12-22 00:07:53"
    }
}