本接口总调用:1672次·今日调用:0次
接口地址: https://api.528sq.cn/api/weather.php
返回格式: 请看返回示例
请求方式: GET
请求示例: https://api.528sq.cn/api/weather.php?city=长春
请求参数说明:
名称 | 必填 | 说明 |
---|---|---|
city | 是 | 需要查询的地区名 |
type | 否 | 返回格式,默认json可选text |
系统级错误:
名称 | 说明 |
---|---|
400 | 请求错误! |
403 | 请求被服务器拒绝! |
405 | 客户端请求的方法被禁止! |
408 | 请求时间过长! |
500 | 服务器内部出现错误! |
501 | 服务器不支持请求的功能,无法完成请求! |
503 | 系统维护中! |
返回示例:
{ "code": 1, "text": "获取成功", "data": { "city": "长春", "cityEnglish": "changchun", "temp": "999", "tempn": "14", "weather": "阴转晴", "wind": "西风转西南风", "windSpeed": "3-4级转<3级", "time": "2025-09-18 08:00", "warning": {}, "current": { "city": "长春", "cityEnglish": "changchun", "humidity": "93%", "wind": "西风", "windSpeed": "1级", "visibility": "8km", "weather": "晴", "weatherEnglish": "Sunny", "temp": "7.7", "fahrenheit": "45.9", "air": "45", "air_pm25": "45", "date": "09月18日(星期四)", "time": "01:10", "image": "http://api.528sq.cn/api/data/weather/image/云.png" }, "living": [ { "name": "路况指数", "index": "干燥", "tips": "天气较好,路面较干燥,路况较好。" }, { "name": "晨练指数", "index": "适宜", "tips": "天气不错,空气清新。" }, { "name": "空气污染扩散条件指数", "index": "中", "tips": "易感人群应适当减少室外活动。" }, { "name": "逛街指数", "index": "适宜", "tips": "这种好天气去逛街可使身心畅快放松。" }, { "name": "舒适度指数", "index": "较不舒适", "tips": "白天晴好,偏冷,注意添衣保暖。" }, { "name": "啤酒指数", "index": "较不适宜", "tips": "有些凉意,少量饮用常温啤酒。" }, { "name": "划船指数", "index": "较适宜", "tips": "气温低注意及时添衣,小心着凉。" }, { "name": "太阳镜指数", "index": "必要", "tips": "建议佩戴透射比为1级的遮阳镜" }, { "name": "紫外线强度指数", "index": "很强", "tips": "涂擦SPF20以上,PA++护肤品,避强光。" }, { "name": "风寒指数", "index": "无", "tips": "温度未达到风寒所需的低温,稍作防寒准备即可。" }, { "name": "穿衣指数", "index": "较冷", "tips": "建议着厚外套加毛衣等服装。" }, { "name": "放风筝指数", "index": "适宜", "tips": "好天气,放风筝可以舒展筋骨放松身心。" }, { "name": "空调开启指数", "index": "较少开启", "tips": "体感舒适,不需要开启空调。" }, { "name": "钓鱼指数", "index": "不宜", "tips": "较前一天有较大降温,不适合垂钓。" }, { "name": "晾晒指数", "index": "基本适宜", "tips": "天气不错,抓紧时机让衣物晒太阳吧。" }, { "name": "感冒指数", "index": "易发", "tips": "大幅度降温,适当增加衣服。" }, { "name": "洗车指数", "index": "适宜", "tips": "天气较好,适合擦洗汽车。" }, { "name": "旅游指数", "index": "适宜", "tips": "天气较好,可尽情地享受大自然的风光。" }, { "name": "夜生活指数", "index": "较适宜", "tips": "只要您稍作准备就可以放心外出。" }, { "name": "心情指数", "index": "好", "tips": "好天气会带来一天的好心情。" }, { "name": "约会指数", "index": "较适宜", "tips": "不用担心天气来调皮捣乱而影响了兴致。" }, { "name": "运动指数", "index": "较适宜", "tips": "气温较低,在户外运动请注意增减衣物。" }, { "name": "过敏指数", "index": "较易发", "tips": "需注意远离过敏源,适当采取防护措施。" }, { "name": "美发指数", "index": "一般", "tips": "建议选用防晒保湿型护发品或带遮阳帽。" }, { "name": "雨伞指数", "index": "不带伞", "tips": "天气较好,不用带雨伞。" }, { "name": "防晒指数", "index": "极强", "tips": "需涂擦SPF大于20,PA++,护肤品。" }, { "name": "化妆指数", "index": "保湿防晒", "tips": "请选用保湿型化妆品。" }, { "name": "中暑指数", "index": "无中暑风险", "tips": "天气不热,在炎炎夏日中十分难得,可以告别暑气漫漫啦~" }, { "name": "交通指数", "index": "良好", "tips": "气象条件良好,车辆可以正常行驶。" }, { "name": "干燥指数", "index": "干燥", "tips": "空气湿度低,易引起皮肤干燥,建议及时使用补水型护肤品,多喝水保持身体滋润。" } ] } }
错误码格式说明:
名称 | 类型 | 说明 |
---|---|---|
无 | 无 | 无 |