接口地址:https://api.icofun.cn/api/weather.php

返回格式:text/json

请求方式:GET

请求示例:https://api.icofun.cn/api/weather.php?city=长春

请求参数说明:

名称 必填 说明
city需要查询的地区名
type返回格式,默认json可选text

返回示例:

{
    "code": 1,
    "text": "获取成功",
    "data": {
        "city": "长春",
        "cityEnglish": "changchun",
        "temp": "999",
        "tempn": "4",
        "weather": "晴",
        "wind": "西风转南风",
        "windSpeed": "3-4级转<3级",
        "time": "2025-10-31 08:00",
        "warning": {},
        "current": {
            "city": "长春",
            "cityEnglish": "changchun",
            "humidity": "62%",
            "wind": "南风",
            "windSpeed": "1级",
            "visibility": "16km",
            "weather": "晴",
            "weatherEnglish": "Sunny",
            "temp": "-0.9",
            "fahrenheit": "30.4",
            "air": "46",
            "air_pm25": "46",
            "date": "10月31日(星期五)",
            "time": "04:35",
            "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": "白天天空晴朗,请适时佩戴太阳镜"
            },
            {
                "name": "紫外线强度指数",
                "index": "中等",
                "tips": "涂擦SPF大于15、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大于15,PA+护肤品。"
            },
            {
                "name": "化妆指数",
                "index": "保湿",
                "tips": "请选用滋润保湿型化妆品。"
            },
            {
                "name": "中暑指数",
                "index": "无中暑风险",
                "tips": "天气舒适,令人神清气爽的一天,不用担心中暑的困扰。"
            },
            {
                "name": "交通指数",
                "index": "良好",
                "tips": "气象条件良好,车辆可以正常行驶。"
            },
            {
                "name": "干燥指数",
                "index": "干燥",
                "tips": "气温偏高,空气干燥,皮肤水分流失较多,应预防可能出现的皮肤瘙痒等情况,涂抹高保湿补水的护肤品,不要穿紧身衣服。"
            }
        ]
    }
}