正在启动平台

限行天气联动traffic-weather-alert

输入国内城市拼音(兼容中文),返回当天的限行尾号。如遇暴雨/台风等恶劣天气,附加居家办公建议。覆盖北京、天津、成都、杭州、贵阳、长春 6 个限行城市,天气支持所有国内主要城市。

1. 基本信息

接口地址https://v1.apizero.cn/api/traffic-weather-alert
请求方法GET
分类life
提供方极数本源
计费模式免费试用
单次消耗0 积分
起步价
QPS 限制3 req/s
每日免费额度100 次(已认证用户)
匿名每日额度50 次(无 API Key)
VIP 免费
调用次数

2. 认证

匿名可调用:QPS 1 / 每日 50 次。登录用户:QPS 3 / 每日 100 次。

获取 API Key:登录 https://apizero.cn/account/keys

3. 请求参数

参数名类型必填说明示例
citystring城市拼音(如 beijing/chengdu/hangzhou),兼容中文(如 北京/成都)beijing
actionstring操作:restriction(默认)/ cities(支持限行的城市列表)restriction

4. 请求头

Header类型必填说明示例
Authorizationstring

5. 请求示例 (cURL)

curl "https://v1.apizero.cn/api/traffic-weather-alert?city=beijing&action=restriction&key=YOUR_API_KEY"

6. 响应字段

字段类型说明示例
citystring城市拼音
city_cnstring城市中文名
datestring查询日期(ISO)
weekdaystring今天星期几(中文)
restricted_numbersstring|null限行尾号(如 "4,9"),不限行为 null
restriction_activeboolean今日是否限行
weather.weatherstring天气描述
weather.temperaturestring温度(带 °C)
weather.is_severeboolean是否恶劣天气
weather.severe_typestring|null恶劣天气类型(暴雨/台风等)
work_from_home_advisorystring|null居家办公建议(无恶劣天气为 null)
messagestring综合提示

7. 响应示例

{
    "code": 0,
    "msg": "成功",
    "data": {
        "city": "beijing",
        "city_cn": "北京",
        "date": "2026-05-11",
        "weekday": "周一",
        "restricted_numbers": "5,0",
        "restriction_active": true,
        "weather": {
            "weather": "晴",
            "temperature": "26°C",
            "is_severe": false,
            "severe_type": null
        },
        "work_from_home_advisory": null,
        "message": "今日北京(周一)限行尾号为 5,0"
    },
    "request_id": "abc123"
}

8. 错误码

codestatus说明
4000city 缺失或格式不正确 / action 不合法
4029调用过快(QPS 超限)
4030今日额度用完

9. 变更日志

  • 1.0.0(2026-05-10)
    • 首次上线,6 城限行 + wttr.in 天气 + 恶劣天气联动
限行天气联动 · AI 接入文档 · 极数本源