接口地址:https://api.icofun.cn/api/weather.php
返回格式:text/json
请求方式:GET
请求示例:https://api.icofun.cn/api/weather.php?city=长春
请求参数说明:
名称 | 必填 | 说明 | |
---|---|---|---|
city | 是 | 需要查询的地区名 | |
type | 否 | 返回格式,默认json可选text | |
token | 否 | 用户密钥账号(后期收费用)(目前免费) | |
password | 否 | 用户密钥密码(后期收费用)(目前免费) |
返回示例:
{ "code": 1, "text": "获取成功", "data": { "city": "长春", "cityEnglish": "changchun", "temp": "23", "tempn": "24", "weather": "阴转多云", "wind": "西南风转东南风", "windSpeed": "<3级", "time": "2025-07-31 08:00", "warning": {}, "current": { "city": "长春", "cityEnglish": "changchun", "humidity": "41%", "wind": "西南风", "windSpeed": "2级", "visibility": "29km", "weather": "多云", "weatherEnglish": "Cloudy", "temp": "29.2", "fahrenheit": "84.6", "air": "30", "air_pm25": "30", "date": "07月31日(星期四)", "time": "17:15", "image": "http://api.icofun.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": "建议佩戴透射比2级且UV400的浅色太阳镜" }, { "name": "紫外线强度指数", "index": "最弱", "tips": "辐射弱,涂擦SPF8-12防晒护肤品。" }, { "name": "风寒指数", "index": "无", "tips": "温度未达到风寒所需的低温,稍作防寒准备即可。" }, { "name": "穿衣指数", "index": "热", "tips": "适合穿T恤、短薄外套等夏季服装。" }, { "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": "涂抹8-12SPF防晒护肤品。" }, { "name": "化妆指数", "index": "去油", "tips": "请选用露质面霜打底,水质无油粉底霜。" }, { "name": "中暑指数", "index": "无中暑风险", "tips": "天气舒适,令人神清气爽的一天,不用担心中暑的困扰。" }, { "name": "交通指数", "index": "良好", "tips": "气象条件良好,车辆可以正常行驶。" }, { "name": "干燥指数", "index": "适宜", "tips": "温湿条件适宜,风速不大,皮肤无需特殊保养,只做日常护理即可。" } ] } }