GET 免费 无需 KEY 实时天气

天气查询API V3(正在优化街道级天气)

天气查询API是一个实时天气数据接口,支持当天天气,7天预报,40天长期预报,三种查询模式。本地缓存机制(30分钟有效期)!

接口信息

GET api.11as.cn/api/weather/v3.php
Method
GET
分类
实时天气
Calls
212
KEY
无需 KEY
计费
免费
QPM
60/MIN
鉴权方式
无需密钥
请求参数
参数名 类型 必填 说明 示例
key string 平台 API 访问密钥(选填) sk_xxxxxxxxxxxxxxxx
cityid string 城市天气代码(9位数字,如 `101010200`)。与 `cityname` 二选一,两者都不传则返回错误 101010200
cityname string 城市名称(如 `海淀`、`北京`、`朝阳区`)。支持中文名、简称、拼音,自动匹配城市ID。与 `cityid` 二选一 海淀
type string 气查询类型:`1d`=当天天气(默认),`7d`=7天预报,`40d`=40天长期预报 1d
返回示例
{
    "code": 200,
    "message": "success (cached)",
    "data": {
        "city_id": "101010200",
        "type": "1d",
        "location": {
            "city_code": "101010200",
            "city_name": "海淀",
            "full_name": "中国,北京,北京市,海淀区",
            "province": "北京",
            "city": "北京市",
            "district": "海淀区",
            "city_lv": 3,
            "lng": 116.29812,
            "lat": 39.95931
        },
        "from_cache": false,
        "fetch_ms": 343.59,
        "weather": {
            "city": "海淀",
            "city_name": "中国,北京,北京市,海淀区",
            "update_time": "18:00",
            "summary": "05月23日20时 周六  多云  17/28°C",
            "night": {
                "title": "23日夜间",
                "icon": "n01",
                "weather": "多云",
                "temp": "17",
                "wind_direction": "南风",
                "wind_speed": "<3级",
                "sunset": "日落 19:29"
            },
            "day": {
                "title": "24日白天",
                "icon": "d01",
                "weather": "多云",
                "temp": "28",
                "wind_direction": "南风",
                "wind_speed": "<3级",
                "sunrise": "日出 04:53"
            },
            "hourly": [
                {
                    "time": "23日23时",
                    "icon": "n01",
                    "weather": "多云",
                    "temp": "20℃",
                    "wind_direction": "西南风",
                    "wind_speed": "<3级",
                    "rain_prob": "0"
                }
            ],
            "observe": [
                {
                    "hour": "23",
                    "temp": "22.4",
                    "wind_angle": "202",
                    "wind_direction": "西南风",
                    "wind_speed_level": "1",
                    "rain": "0",
                    "humidity": "86",
                    "air_pressure": ""
                }
            ],
            "life_index": [
                {
                    "level": "少发",
                    "name": "感冒指数",
                    "desc": "无明显降温,感冒机率较低。"
                },
                {
                    "level": "适宜",
                    "name": "运动指数",
                    "desc": "天气较好,尽情感受运动的快乐吧。"
                },
                {
                    "level": "较舒适",
                    "name": "穿衣指数",
                    "desc": "建议穿薄外套或牛仔裤等服装。"
                },
                {
                    "level": "适宜",
                    "name": "洗车指数",
                    "desc": "天气较好,适合擦洗汽车。"
                },
                {
                    "level": "很强",
                    "name": "紫外线指数",
                    "desc": "涂擦SPF20以上,PA++护肤品,避强光。"
                },
                {
                    "level": "较易发",
                    "name": "过敏指数",
                    "desc": "外出需远离过敏源,适当采取防护措施。"
                }
            ]
        }
    },
    "time": "2026-05-23 12:00:00",
    "api_info": {
        "developer": "尋鯨錄",
        "blog": "https://www.xunjinlu.fun",
        "api_platform": "https://api.xunjinlu.fun"
    }
}

接口反馈

快速上手

暂无代码示例。管理员可在后台用 AI 生成或手动编写。

免责声明

使用本平台接口即表示同意本声明。

  1. 数据来源:接口数据来自第三方公开网络或用户上传,本平台不保证准确性、完整性、实时性,请以官方信息为准。
  2. 合法性与安全性:本平台无法核实每个接口的安全性、合法性,使用者自行承担相关风险。
  3. 用途限制:标注“学习专用”的接口禁止商用;严禁用于违法违规行为(如诈骗、赌博、侵权等)。违规后果由使用者自行承担。
  4. 损害免责:使用本接口产生的任何直接或间接损失,本平台不承担责任。
  5. 第三方上传:用户/商户上传的接口若侵权或违法,由上传者承担全部责任。
  6. 监督配合:本平台依法记录访问日志,如发现违法活动将配合执法部门处理,并有权随时限制或封禁服务。
    注:本平台保留最终解释权,并可能随时更新本声明。

在线测试

请求地址
api.11as.cn/api/weather/v3.php
参数
Response 等待中
// 结果将在此处显示

推荐接口

免费
GET

中国天气

数据来源盒盖API,中国天气网

/apis/zgtq
查看详情