城市天气查询

城市天气查询

查询当前城市的天气情况,支持输入城市名称和id。

GET/POST JSON 总调用: 2621 次

接口详情

GET/POST
JSON

接口状态

调用频率 无限制
响应时间 测速中
稳定性 稳定

请求参数

名称 必填 类型 说明
city string 需要填的城市名
参数按重要性排序,必填参数已加粗显示

调用示例

HTTP 请求
https://api.bugpk.com/api/weather?city=武清区
代码示例

返回示例

JSON 响应
{
    "code": 200,
    "message": "获取成功!",
    "date": 20250709,
    "time": "2025-07-09 22:22:19",
    "cityInfo": {
        "city": "武清区",
        "citykey": 101030200,
        "parent": "天津市",
        "updateTime": "17:55"
    },
    "data": {
        "shidu": "64%",
        "pm25": 14,
        "pm10": 19,
        "quality": "优",
        "wendu": 31.5,
        "ganmao": "各类人群可自由活动",
        "forecast": [
            {
                "date": 9,
                "high": "高温 33℃",
                "low": "低温 24℃",
                "ymd": "2025-07-09",
                "week": "星期三",
                "sunrise": "04:53",
                "sunset": "19:40",
                "aqi": 33,
                "fx": "东南风",
                "fl": "3级",
                "type": "多云",
                "notice": "阴晴之间,谨防紫外线侵扰"
            },
            {
                "date": 10,
                "high": "高温 37℃",
                "low": "低温 24℃",
                "ymd": "2025-07-10",
                "week": "星期四",
                "sunrise": "04:53",
                "sunset": "19:40",
                "aqi": 33,
                "fx": "东南风",
                "fl": "2级",
                "type": "阴",
                "notice": "不要被阴云遮挡住好心情"
            },
            {
                "date": 11,
                "high": "高温 38℃",
                "low": "低温 24℃",
                "ymd": "2025-07-11",
                "week": "星期五",
                "sunrise": "04:54",
                "sunset": "19:40",
                "aqi": 40,
                "fx": "东南风",
                "fl": "3级",
                "type": "阴",
                "notice": "不要被阴云遮挡住好心情"
            },
            {
                "date": 12,
                "high": "高温 38℃",
                "low": "低温 25℃",
                "ymd": "2025-07-12",
                "week": "星期六",
                "sunrise": "04:55",
                "sunset": "19:39",
                "aqi": 59,
                "fx": "东南风",
                "fl": "2级",
                "type": "晴",
                "notice": "愿你拥有比阳光明媚的心情"
            },
            {
                "date": 13,
                "high": "高温 39℃",
                "low": "低温 25℃",
                "ymd": "2025-07-13",
                "week": "星期日",
                "sunrise": "04:55",
                "sunset": "19:39",
                "aqi": 61,
                "fx": "东北风",
                "fl": "3级",
                "type": "多云",
                "notice": "阴晴之间,谨防紫外线侵扰"
            },
            {
                "date": 14,
                "high": "高温 38℃",
                "low": "低温 25℃",
                "ymd": "2025-07-14",
                "week": "星期一",
                "sunrise": "04:56",
                "sunset": "19:38",
                "aqi": 62,
                "fx": "南风",
                "fl": "2级",
                "type": "多云",
                "notice": "阴晴之间,谨防紫外线侵扰"
            },
            {
                "date": 15,
                "high": "高温 29℃",
                "low": "低温 20℃",
                "ymd": "2025-07-15",
                "week": "星期二",
                "sunrise": "04:57",
                "sunset": "19:38",
                "aqi": 36,
                "fx": "东风",
                "fl": "3级",
                "type": "小雨",
                "notice": "雨虽小,注意保暖别感冒"
            },
            {
                "date": 16,
                "high": "高温 33℃",
                "low": "低温 20℃",
                "ymd": "2025-07-16",
                "week": "星期三",
                "sunrise": "04:58",
                "sunset": "19:37",
                "aqi": 33,
                "fx": "东北风",
                "fl": "2级",
                "type": "晴",
                "notice": "愿你拥有比阳光明媚的心情"
            },
            {
                "date": 17,
                "high": "高温 33℃",
                "low": "低温 22℃",
                "ymd": "2025-07-17",
                "week": "星期四",
                "sunrise": "04:58",
                "sunset": "19:37",
                "aqi": 27,
                "fx": "东南风",
                "fl": "2级",
                "type": "多云",
                "notice": "阴晴之间,谨防紫外线侵扰"
            },
            {
                "date": 18,
                "high": "高温 34℃",
                "low": "低温 21℃",
                "ymd": "2025-07-18",
                "week": "星期五",
                "sunrise": "04:59",
                "sunset": "19:36",
                "aqi": 32,
                "fx": "东南风",
                "fl": "3级",
                "type": "多云",
                "notice": "阴晴之间,谨防紫外线侵扰"
            },
            {
                "date": 19,
                "high": "高温 33℃",
                "low": "低温 23℃",
                "ymd": "2025-07-19",
                "week": "星期六",
                "sunrise": "05:00",
                "sunset": "19:35",
                "aqi": 36,
                "fx": "东北风",
                "fl": "2级",
                "type": "阴",
                "notice": "不要被阴云遮挡住好心情"
            },
            {
                "date": 20,
                "high": "高温 33℃",
                "low": "低温 23℃",
                "ymd": "2025-07-20",
                "week": "星期日",
                "sunrise": "05:01",
                "sunset": "19:35",
                "aqi": 45,
                "fx": "东南风",
                "fl": "2级",
                "type": "多云",
                "notice": "阴晴之间,谨防紫外线侵扰"
            },
            {
                "date": 21,
                "high": "高温 31℃",
                "low": "低温 24℃",
                "ymd": "2025-07-21",
                "week": "星期一",
                "sunrise": "05:02",
                "sunset": "19:34",
                "aqi": 49,
                "fx": "东北风",
                "fl": "2级",
                "type": "多云",
                "notice": "阴晴之间,谨防紫外线侵扰"
            },
            {
                "date": 22,
                "high": "高温 34℃",
                "low": "低温 25℃",
                "ymd": "2025-07-22",
                "week": "星期二",
                "sunrise": "05:02",
                "sunset": "19:33",
                "aqi": 27,
                "fx": "东南风",
                "fl": "1级",
                "type": "多云",
                "notice": "阴晴之间,谨防紫外线侵扰"
            },
            {
                "date": 23,
                "high": "高温 28℃",
                "low": "低温 26℃",
                "ymd": "2025-07-23",
                "week": "星期三",
                "sunrise": "05:03",
                "sunset": "19:32",
                "aqi": 36,
                "fx": "北风",
                "fl": "2级",
                "type": "阴",
                "notice": "不要被阴云遮挡住好心情"
            }
        ],
        "yesterday": {
            "date": 8,
            "high": "高温 35℃",
            "low": "低温 24℃",
            "ymd": "2025-07-08",
            "week": "星期二",
            "sunrise": "04:52",
            "sunset": "19:41",
            "aqi": 30,
            "fx": "东南风",
            "fl": "3级",
            "type": "多云",
            "notice": "阴晴之间,谨防紫外线侵扰"
        }
    }
}

响应参数

名称 类型 说明
code string 状态码
message string 提示信息
date string 日期
time string 时间
cityInfo string 城市信息
data string 近几天天气