×

存雨 API

天气查询 正常

查询天气情况

GET
/weather

请求参数

  • user_token

    类型:string

    必填:

    说明:user_token参数,可在网站主页第二个接口处找到获取方法

  • api_token

    类型:string

    必填:

    说明:api_token参数,可在网站主页第二个接口处找到获取方法

  • city

    类型:string

    必填:

    说明:城市名(更新后无需再加市/区/县)

请求示例

https://www.cunyuapi.top/weather?city=北京

返回示例

{
  "city_info": {
    "city": "北京市",
    "reporttime": "2025-04-16 17:06:58"
  },
  "forecasts": [
    {
      "date": "2025-04-16",
      "weather": {
        "day": "多云",
        "night": "多云"
      },
      "temperature": {
        "day": "29",
        "night": "12"
      },
      "wind": {
        "day": {
          "direction": "南",
          "power": "1-3"
        },
        "night": {
          "direction": "南",
          "power": "1-3"
        }
      }
    },
    {
      "date": "2025-04-17",
      "weather": {
        "day": "多云",
        "night": "多云"
      },
      "temperature": {
        "day": "28",
        "night": "14"
      },
      "wind": {
        "day": {
          "direction": "北",
          "power": "1-3"
        },
        "night": {
          "direction": "北",
          "power": "1-3"
        }
      }
    },
    {
      "date": "2025-04-18",
      "weather": {
        "day": "阴",
        "night": "小雨"
      },
      "temperature": {
        "day": "20",
        "night": "10"
      },
      "wind": {
        "day": {
          "direction": "南",
          "power": "1-3"
        },
        "night": {
          "direction": "南",
          "power": "1-3"
        }
      }
    },
    {
      "date": "2025-04-19",
      "weather": {
        "day": "阴",
        "night": "晴"
      },
      "temperature": {
        "day": "20",
        "night": "11"
      },
      "wind": {
        "day": {
          "direction": "南",
          "power": "1-3"
        },
        "night": {
          "direction": "南",
          "power": "1-3"
        }
      }
    }
  ]
}