天气信息获取

1.功能介绍

天气信息获取api根据访客位置或IP地址的获取天气信息。

2.请求地址

https://api.szfx.top/tianqi

3.请求参数

参数 类型 参数值 描述
ip 选填 ip 需要获取天气信息的ip地址

4.请求示例

https://api.szfx.top/tianqi
https://api.szfx.top/tianqi/?ip=121.14.77.201

5.返回数据

{
    cityid: "101280601",
    date: "2021-02-22",
    week: "星期一",
    update_time: "2021-02-22 00:10:34",
    city: "深圳",
    cityEn: "shenzhen",
    country: "中国",
    countryEn: "China",
    wea: "晴",
    wea_img: "qing",
    tem: "18",
    tem1: "25",
    tem2: "16",
    win: "东南风 ",
    win_speed: "1级",
    win_meter: "小于12km/h",
    humidity: "81%",
    visibility: "18.1km",
    pressure: "1010",
    air: "37",
    air_pm25: "37",
    air_level: "优",
    air_tips: "空气很好,可以外出活动,呼吸新鲜空气,拥抱大自然!",
    alarm: {
        alarm_type: "",
        alarm_level: "",
        alarm_content: ""
    }
}

6.调用效果

暂无

Copyright © szfx.top 2021            updated: 2021-02-22 00:51:26

results matching ""

    No results matching ""