

登录用户中心

天气查询
获取指定地区天气信息
请求方式:get
请求类型:none
秘钥KEY传参
| 参数名 | 参数类型 | 参数示例 | 参数说明 |
|---|---|---|---|
| ckey | string | SJKHJDBBDGGE | 支持通过:headers/query/body(x-www) |
Query参数
| 参数名 | 参数类型 | 参数示例 | 参数说明 |
|---|---|---|---|
| city | string | 上海 |
接口返回示例
{
"code": 200,
"message": "获取成功!",
"date": 20251217,
"time": "2025-12-17 19:11:32",
"cityInfo": {
"city": "上海市",
"citykey": 101020100,
"parent": "上海",
"updateTime": "16:32"
},
"data": {
"shidu": "55%",
"pm25": 121,
"pm10": 138,
"quality": "中度",
"wendu": 9.8,
"ganmao": "儿童、老年人及心脏、呼吸系统疾病患者人群应减少长时间或高强度户外锻炼,一般人群适量减少户外运动",
"forecast": [
{
"date": 17,
"high": "高温 14℃",
"low": "低温 7℃",
"ymd": "2025-12-17",
"week": "星期三",
"sunrise": "06:46",
"sunset": "16:53",
"aqi": 87,
"fx": "北风",
"fl": "2级",
"type": "霾",
"notice": "雾霾来袭,戴好口罩再出门"
},
{
"date": 18,
"high": "高温 14℃",
"low": "低温 5℃",
"ymd": "2025-12-18",
"week": "星期四",
"sunrise": "06:46",
"sunset": "16:54",
"aqi": 52,
"fx": "东南风",
"fl": "1级",
"type": "晴",
"notice": "愿你拥有比阳光明媚的心情"
},
{
"date": 19,
"high": "高温 19℃",
"low": "低温 10℃",
"ymd": "2025-12-19",
"week": "星期五",
"sunrise": "06:47",
"sunset": "16:54",
"aqi": 47,
"fx": "东南风",
"fl": "1级",
"type": "晴",
"notice": "愿你拥有比阳光明媚的心情"
},
{
"date": 20,
"high": "高温 19℃",
"low": "低温 13℃",
"ymd": "2025-12-20",
"week": "星期六",
"sunrise": "06:48",
"sunset": "16:55",
"aqi": 66,
"fx": "东北风",
"fl": "1级",
"type": "多云",
"notice": "阴晴之间,谨防紫外线侵扰"
},
{
"date": 21,
"high": "高温 15℃",
"low": "低温 8℃",
"ymd": "2025-12-21",
"week": "星期日",
"sunrise": "06:48",
"sunset": "16:55",
"aqi": 30,
"fx": "东北风",
"fl": "2级",
"type": "中雨",
"notice": "记得随身携带雨伞哦"
},
{
"date": 22,
"high": "高温 11℃",
"low": "低温 7℃",
"ymd": "2025-12-22",
"week": "星期一",
"sunrise": "06:49",
"sunset": "16:56",
"aqi": 34,
"fx": "北风",
"fl": "2级",
"type": "多云",
"notice": "阴晴之间,谨防紫外线侵扰"
},
{
"date": 23,
"high": "高温 12℃",
"low": "低温 7℃",
"ymd": "2025-12-23",
"week": "星期二",
"sunrise": "06:49",
"sunset": "16:56",
"aqi": 47,
"fx": "东北风",
"fl": "1级",
"type": "阴",
"notice": "不要被阴云遮挡住好心情"
},
{
"date": 24,
"high": "高温 11℃",
"low": "低温 8℃",
"ymd": "2025-12-24",
"week": "星期三",
"sunrise": "06:49",
"sunset": "16:57",
"aqi": 79,
"fx": "北风",
"fl": "2级",
"type": "阴",
"notice": "不要被阴云遮挡住好心情"
},
{
"date": 25,
"high": "高温 9℃",
"low": "低温 8℃",
"ymd": "2025-12-25",
"week": "星期四",
"sunrise": "06:50",
"sunset": "16:57",
"aqi": 61,
"fx": "北风",
"fl": "3级",
"type": "晴",
"notice": "愿你拥有比阳光明媚的心情"
},
{
"date": 26,
"high": "高温 9℃",
"low": "低温 6℃",
"ymd": "2025-12-26",
"week": "星期五",
"sunrise": "06:50",
"sunset": "16:58",
"aqi": 58,
"fx": "西北风",
"fl": "3级",
"type": "阴",
"notice": "不要被阴云遮挡住好心情"
},
{
"date": 27,
"high": "高温 9℃",
"low": "低温 5℃",
"ymd": "2025-12-27",
"week": "星期六",
"sunrise": "06:51",
"sunset": "16:59",
"aqi": 68,
"fx": "西北风",
"fl": "2级",
"type": "小雨",
"notice": "雨虽小,注意保暖别感冒"
},
{
"date": 28,
"high": "高温 7℃",
"low": "低温 4℃",
"ymd": "2025-12-28",
"week": "星期日",
"sunrise": "06:51",
"sunset": "16:59",
"aqi": 85,
"fx": "西北风",
"fl": "3级",
"type": "多云",
"notice": "阴晴之间,谨防紫外线侵扰"
},
{
"date": 29,
"high": "高温 12℃",
"low": "低温 5℃",
"ymd": "2025-12-29",
"week": "星期一",
"sunrise": "06:51",
"sunset": "17:00",
"aqi": 65,
"fx": "北风",
"fl": "2级",
"type": "晴",
"notice": "愿你拥有比阳光明媚的心情"
},
{
"date": 30,
"high": "高温 12℃",
"low": "低温 5℃",
"ymd": "2025-12-30",
"week": "星期二",
"sunrise": "06:52",
"sunset": "17:00",
"aqi": 62,
"fx": "东北风",
"fl": "2级",
"type": "阴",
"notice": "不要被阴云遮挡住好心情"
},
{
"date": 31,
"high": "高温 12℃",
"low": "低温 5℃",
"ymd": "2025-12-31",
"week": "星期三",
"sunrise": "06:52",
"sunset": "17:01",
"aqi": 55,
"fx": "东北风",
"fl": "2级",
"type": "多云",
"notice": "阴晴之间,谨防紫外线侵扰"
}
],
"yesterday": {
"date": 16,
"high": "高温 17℃",
"low": "低温 8℃",
"ymd": "2025-12-16",
"week": "星期二",
"sunrise": "06:45",
"sunset": "16:53",
"aqi": 70,
"fx": "西南风",
"fl": "1级",
"type": "多云",
"notice": "阴晴之间,谨防紫外线侵扰"
}
}
}
Query
1
Body
none:不发送任何Body数据,适用于GET请求或不需要Body的API
from-data:使用multipart/form-data格式发送数据,适用于上传文件或包含多种数据类型的请求
x-www-form-urlencoded:使用application/x-www-form-urlencoded格式发送数据,适用于简单的键值对数据
json:使用application/json格式发送数据,适用于复杂数据结构
xml:使用application/xml格式发送数据,适用于XML格式的API
raw:发送原始文本数据,可自定义Content-Type
请根据API要求选择合适的Body类型,并在下方输入对应格式的数据
接口响应
等待发起...
| 响应码 | 说明 |
|---|---|
| 200 | 请求成功 |
| 203 | 秘钥错误或不存在 |
| 204 | 服务器错误 |
| 211 | 接口不存在 |
| 212 | 当前接口已下架 |
| 213 | 当前接口正处于审核期 |
| 214 | API本地文件不存在,请联系管理员检查 |
| 215 | 管理员设置当前接口必须携带ckey请求! |
| 216 | 付费接口请携带ckey请求! |
| 217 | ckey不存在! |
| 218 | 当前ckey无权限调用此接口,请将此接口添加到ckey调用能力中后重试! |
| 219 | 访问频率超过限制!请稍后重试! |
| 220 | 本地API逻辑错误!请联系管理员检查! |
| 221 | 状态码与管理员配置的状态码不一致,请联系管理员! |
| 222 | 禁止访问!请联系管理员 (已被加入黑名单) |
| 223 | 积分不足!请充值后重试 |
| 224 | 余额不足!请充值后重试 |
| 225 | 您已设置仅白名单ip访问!请将当前ip添加到白名单中 |
选择编程语言

Node.js

cURL

PHP

Java

Go

Python

Fetch

C#
代码示例
异常情况
联系QQ
