天气预报

GET

免费API提供准确的天气预报服务,支持获取全球各地的实时天气数据,帮助用户了解天气趋势,适用于应用开发、网站集成和个人使用。

https://v1.nsuuu.com/api/weather
https://v2.xxapi.cn/api/weather?city=枣庄滕州&key=你的key

请求参数

将 Key 放到 Header 中使用 Authorization 请求头,按 Bearer Token 方式传递
Authorization:Bearer YOUR_API_KEY

相关套餐

接口指标

QPS 上限
30次/秒
平均响应时间
42.33ms
今日调用量
0
累计调用量
256

请求示例

Shell
JavaScript
Python
PHP
Java
Go
C#
Ruby
curl -X GET 'https://v1.nsuuu.com/api/weather?city=${城市名称}' \
  -H 'Authorization: Bearer YOUR_API_KEY'

返回示例

{
  "code": 200,
  "msg": "数据请求成功",
  "data": {
    "city": "滕州市",
    "data": [
      {
        "date": "周六",
        "temperature": "4-24℃",
        "weather": "多云",
        "wind": "北风4-5级",
        "air_quality": "轻度"
      },
      {
        "date": "周日",
        "temperature": "2-11℃",
        "weather": "晴",
        "wind": "北风4-5级",
        "air_quality": "良"
      },
      {
        "date": "周一",
        "temperature": "5-18℃",
        "weather": "晴",
        "wind": "西南风4-5级",
        "air_quality": "良"
      },
      {
        "date": "周二",
        "temperature": "10-23℃",
        "weather": "多云",
        "wind": "南风3-4级",
        "air_quality": "良"
      },
      {
        "date": "周三",
        "temperature": "5-17℃",
        "weather": "多云",
        "wind": "东北风3-4级",
        "air_quality": "良"
      },
      {
        "date": "周四",
        "temperature": "5-12℃",
        "weather": "小雨",
        "wind": "东风3-4级",
        "air_quality": "良"
      }
    ]
  }
}