天气查询

GETPOST

提供城市的实时天气、精准预报、空气质量监测及个性化生活指数提醒服务。

https://api.auth.top/api/weather
https://api.auth.top/api/weather

请求参数

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

接口指标

QPS 上限
30次/秒
平均响应时间
0ms

请求示例

Shell
JavaScript
Python
PHP
Java
Go
C#
Ruby
curl -X POST 'https://api.auth.top/api/weather' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d 'city=城市名称' \
  -d 'format=json'

返回示例

{
  "code": 0,
  "msg": "查询成功",
  "data": {
    "province": "海南",
    "city": "三亚市",
    "weather": "晴",
    "temperature": "22",
    "humidity": "43",
    "winddirection": "北",
    "windpower": "4",
    "reporttime": "2026-01-09 11:34:33"
  }
}