Free real time weather forecast API interface

Mondo Social Updated on 2024-03-07

It is updated every 5 minutes, including basic weather information, 24-hour hourly weather, real-time weather warning list, humidity, visibility, air pressure, sunrise and sunset, 9 major life indexes, PM25. PM10, O3, NO2, SO2, whether you need to wear a mask, it is appropriate to go out, it is appropriate to open the window, whether you need to open the purifier, etc., you can query by place name, city number, and IP.

New: Optimize the alert field, return the real-time alert array, update the data source every 5 minutes, multiple alerts can appear at the same time, please refer to the json at the bottom of the document.

The request limit is limited to the number of requests per day for a single APPID, and does not limit the number of items, apps, devices, and IP addresses used.

Request method and URL:

Request method: get

Interface address:(Please set the line address on the server, which can be dynamically modified, and the line needs to be changed in case of DDoS attacks).

Route 1 (recommended):

Route 2:Sample request

unescape=1&version=v63&appid=83815731&appsecret=x8jakkps

Request Parameter Description:

Remarks

If you do not submit one of the 3 parameters of cityid, city, and IP, the weather of the current IP city will be returned by default, and the cityid has the highest priority.

Respond to json

, "wea_day":"Light rain", "wea_day_img":"yu", "wea_night":"Light rain", "wea_night_img":"yu", "sunrise":"05:17", "sunset":"18:42", "hours":[ "aqi":}
Description of the response parameters

Related Pages