开发指南

发布api对接文章到CSDN可联系客服领取10万次请求次数, 感谢您的支持

四季天气


返回当前城市的四季气象数据, 具体返回内容参考返回字段和相应JSON

请求方式及url:

  • 请求方式:GET

  • 接口地址:(请将线路地址设置在服务端, 为动态可修改的)

  • 线路1(推荐)http://v1.yiketianqi.com/api

请求示例

http://v1.yiketianqi.com/life/yearavg?appid=&appsecret=&cityid=101120101

请求参数说明:

参数名 必选 类型 说明 备注(示例)
appid string 用户appid 注册开发账号
appsecret string 用户appsecret
cityid string 城市ID 请参考 城市ID列表
callback string jsonp参数 如: jQuery.Callbacks
vue string 跨域参数 如果您使用的是react、vue、angular请填写值: 1

备注

该接口只能根据cityid查询。

响应字段说明

参数名 类型 说明 备注
yearAvgTemp String 平均气温
yearMaxTemp String 月最高温度
yearMinTemp String 月最低温度
yearAvgHumidity String 月平均湿度
yearAvgRain String 月平均降水量mm
yearAvgRainDay String 月平均降水天数
yearAvgAqi String 月平均空气质量
SeasonAvgTmax String 四季平均高温
SeasonAvgTmin String 四季平均低温
SeasonAvgRain String 四季降水mm

响应JSON

{
    "yearAvgTemp":[
        "0",
        "3",
        "10",
        "16",
        "22",
        "26",
        "28",
        "26",
        "22",
        "16",
        "8",
        "2"
    ],
    "yearMaxTemp":[
        "4",
        "8",
        "15",
        "22",
        "28",
        "32",
        "32",
        "31",
        "27",
        "22",
        "13",
        "6"
    ],
    "yearMinTemp":[
        "-4",
        "-1",
        "5",
        "11",
        "18",
        "22",
        "24",
        "22",
        "18",
        "12",
        "5",
        "-2"
    ],
    "yearAvgHumidity":[
        "50",
        "49",
        "42",
        "47",
        "48",
        "53",
        "69",
        "75",
        "67",
        "55",
        "57",
        "50"
    ],
    "yearAvgRain":[
        "5",
        "14",
        "12",
        "38",
        "62",
        "86",
        "181",
        "219",
        "46",
        "22",
        "30",
        "8"
    ],
    "yearAvgRainDay":[
        "2",
        "4",
        "3",
        "6",
        "7",
        "8",
        "13",
        "14",
        "7",
        "5",
        "5",
        "3"
    ],
    "yearAvgAqi":[
        "123",
        "103",
        "98",
        "102",
        "94",
        "104",
        "81",
        "78",
        "70",
        "80",
        "122",
        "117"
    ],
    "yearAqi":[
        {
            "aqiLv0":[
                "43",
                "5.85"
            ],
            "aqiLv1":[
                "366",
                "49.8"
            ],
            "aqiLv2":[
                "110",
                "14.97"
            ],
            "aqiLv3":[
                "78",
                "10.61"
            ],
            "aqiLv4":[
                "120",
                "16.33"
            ],
            "aqiLv5":[
                "18",
                "2.45"
            ]
        },
        {
            "aqiLv0":[
                "34",
                "5.18"
            ],
            "aqiLv1":[
                "365",
                "55.64"
            ],
            "aqiLv2":[
                "150",
                "22.87"
            ],
            "aqiLv3":[
                "82",
                "12.5"
            ],
            "aqiLv4":[
                "25",
                "3.81"
            ],
            "aqiLv5":[
                "0",
                "0.0"
            ]
        },
        {
            "aqiLv0":[
                "52",
                "7.06"
            ],
            "aqiLv1":[
                "457",
                "62.01"
            ],
            "aqiLv2":[
                "163",
                "22.12"
            ],
            "aqiLv3":[
                "39",
                "5.29"
            ],
            "aqiLv4":[
                "26",
                "3.53"
            ],
            "aqiLv5":[
                "0",
                "0.0"
            ]
        },
        {
            "aqiLv0":[
                "64",
                "10.13"
            ],
            "aqiLv1":[
                "341",
                "53.96"
            ],
            "aqiLv2":[
                "197",
                "31.17"
            ],
            "aqiLv3":[
                "15",
                "2.37"
            ],
            "aqiLv4":[
                "8",
                "1.27"
            ],
            "aqiLv5":[
                "7",
                "1.11"
            ]
        },
        {
            "aqiLv0":[
                "117",
                "17.49"
            ],
            "aqiLv1":[
                "373",
                "55.75"
            ],
            "aqiLv2":[
                "173",
                "25.86"
            ],
            "aqiLv3":[
                "5",
                "0.75"
            ],
            "aqiLv4":[
                "1",
                "0.15"
            ],
            "aqiLv5":[
                "0",
                "0.0"
            ]
        },
        {
            "aqiLv0":[
                "77",
                "12.34"
            ],
            "aqiLv1":[
                "350",
                "56.09"
            ],
            "aqiLv2":[
                "194",
                "31.09"
            ],
            "aqiLv3":[
                "3",
                "0.48"
            ],
            "aqiLv4":[
                "0",
                "0.0"
            ],
            "aqiLv5":[
                "0",
                "0.0"
            ]
        },
        {
            "aqiLv0":[
                "166",
                "23.09"
            ],
            "aqiLv1":[
                "468",
                "65.09"
            ],
            "aqiLv2":[
                "83",
                "11.54"
            ],
            "aqiLv3":[
                "2",
                "0.28"
            ],
            "aqiLv4":[
                "0",
                "0.0"
            ],
            "aqiLv5":[
                "0",
                "0.0"
            ]
        },
        {
            "aqiLv0":[
                "191",
                "25.81"
            ],
            "aqiLv1":[
                "465",
                "62.84"
            ],
            "aqiLv2":[
                "70",
                "9.46"
            ],
            "aqiLv3":[
                "12",
                "1.62"
            ],
            "aqiLv4":[
                "2",
                "0.27"
            ],
            "aqiLv5":[
                "0",
                "0.0"
            ]
        },
        {
            "aqiLv0":[
                "156",
                "22.64"
            ],
            "aqiLv1":[
                "500",
                "72.57"
            ],
            "aqiLv2":[
                "33",
                "4.79"
            ],
            "aqiLv3":[
                "0",
                "0.0"
            ],
            "aqiLv4":[
                "0",
                "0.0"
            ],
            "aqiLv5":[
                "0",
                "0.0"
            ]
        },
        {
            "aqiLv0":[
                "73",
                "10.18"
            ],
            "aqiLv1":[
                "549",
                "76.57"
            ],
            "aqiLv2":[
                "85",
                "11.85"
            ],
            "aqiLv3":[
                "7",
                "0.98"
            ],
            "aqiLv4":[
                "3",
                "0.42"
            ],
            "aqiLv5":[
                "0",
                "0.0"
            ]
        },
        {
            "aqiLv0":[
                "50",
                "7.39"
            ],
            "aqiLv1":[
                "292",
                "43.13"
            ],
            "aqiLv2":[
                "168",
                "24.82"
            ],
            "aqiLv3":[
                "91",
                "13.44"
            ],
            "aqiLv4":[
                "46",
                "6.79"
            ],
            "aqiLv5":[
                "30",
                "4.43"
            ]
        },
        {
            "aqiLv0":[
                "50",
                "7.12"
            ],
            "aqiLv1":[
                "336",
                "47.86"
            ],
            "aqiLv2":[
                "184",
                "26.21"
            ],
            "aqiLv3":[
                "63",
                "8.97"
            ],
            "aqiLv4":[
                "57",
                "8.12"
            ],
            "aqiLv5":[
                "12",
                "1.71"
            ]
        }
    ],
    "SeasonAvgTmax":[
        21,
        31,
        20,
        6
    ],
    "SeasonAvgTmin":[
        11,
        22,
        11,
        -2
    ],
    "SeasonAvgRain":[
        112,
        486,
        98,
        27
    ],
    "AqiFlag":"true"
}