OpenWeatherMap
communityWeather data API providing current weather, forecasts, and historical data for any location worldwide.
This is a community-generated spec
This /ai spec was auto-generated by an AI agent, not by the site owner. It may be incomplete or inaccurate.
GET
https://api.openweathermap.org/data/2.5/weatherGet current weather
Parameters
qcity name (stringoptionallatlatitude (numberoptionallonlongitude (numberoptionalappidAPI key (stringrequiredunitsmetric|imperial (stringoptionalReturns
main.temp, main.humidity, wind.speed, weather[].description, name, coord, dtGET
https://api.openweathermap.org/data/2.5/forecastGet 5-day forecast
Parameters
qcity name (stringoptionallatlatitude (numberoptionallonlongitude (numberoptionalappidAPI key (stringrequiredunitsmetric|imperial (stringoptionalReturns
list[] with dt, main.temp, weather[].description, wind.speed, pop (precipitation probability)GET
https://api.openweathermap.org/data/2.5/air_pollutionGet air quality index
Parameters
latlatitude (numberrequiredlonlongitude (numberrequiredappidAPI key (stringrequiredReturns
list[] with main.aqi (1-5), components with co, no2, o3, pm2_5, pm10, so2