Loading
Loading
Get weather forecasts up to 16 days ahead for any location worldwide. Supports lookup by city name or address, GPS coordinates, or IP address. Returns daily, hourly, or minutely forecast data along with astronomical information.
Specify a date range using startDate/endDate or use forecastDays for a rolling window. Set precision to daily (default), hourly, or minutely to control data granularity. Each response includes astronomical data (sunrise, sunset, moon phase) for every date in the range.
Pass your API key as the apiKey parameter in every request.
This is version v1.0 of the API.
Provide a location using location, lat/long, or ip. If none are provided the API auto-detects the requesting IP. Specify a date range or use forecastDays. Forecast dates must be within the current date to 16 days ahead.
locationoptionalstringLocation to get weather for. Accepts a city name, place, or full address.
latoptionalfloatLatitude coordinate of the location.
longoptionalfloatLongitude coordinate of the location.
ipoptionalstringIPv4 or IPv6 address to infer the user's location automatically.
forecastDaysoptionalstringdefault: 7Number of days for which the forecast is required, ranging from 1 to 16. Default value: 7. Max value: 16.
startDateoptionalstringSpecific date for which to fetch weather data. Must follow YYYY-MM-DD format (e.g., "2025-08-25"). Forecast dates must be current or future dates only. Past dates are not allowed for forecast data.
endDateoptionalstringSpecific date for which to fetch weather data. Must follow YYYY-MM-DD format (e.g., "2025-08-25"). Forecast dates must be current or future dates only. Past dates are not allowed for forecast data.
precisionoptionalstringdefault: dailyForecast granularity. Options: daily (default), hourly, minutely.
timezoneoptionalstringThe timezone in which results are returned. Defaults to the location's timezone. Any time zone name from the time zone database is supported.
A successful request returns a 200 OK with a JSON object. The top-level contains location and forecast. The forecast object is keyed by date (YYYY-MM-DD), each containing daily, hourly, or minutely sub-objects based on the precision setting, plus an astronomy object. See the response preview for the full structure.
locationProvides detailed information about the location.
forecastForecast data object for the requested date range.
forecast[date].dailyDaily forecast data for the given date.
forecast[date].hourly[]Hourly forecast array for the given date.
forecast[date].minutely[]Minutely forecast array for the given date.
forecast[date].astronomyAstronomy data for the given date.
The location object contains the following fields:
location_stringOriginal location query string as submitted, including full address or place name.
country_nameResolved country name derived from the geocoded location query.
state_provState, province, or primary administrative division identified from the location.
cityCity or municipal area name extracted from the geocoded location.
localitySpecific locality, neighborhood, suburb, or village within the geocoded area.
latitudeGeocoded latitude coordinate in decimal degrees, ranging from -90 to +90.
longitudeGeocoded longitude coordinate in decimal degrees, ranging from -180 to +180.
elevationElevation above mean sea level in meters at the geocoded coordinates.
timezoneIANA timezone database identifier for the geocoded location (e.g., America/Los_Angeles).
timezone_abbreviationCurrent timezone abbreviation for the location based on local offset (e.g., PDT, CET).
When precision is "daily" (default), each date contains a daily object with the following fields:
timestampISO 8601 formatted timestamp of the weather observation.
weather_codeWMO weather condition code.
temperature_2m_maxMaximum daily air temperature (°C) measured at 2 meters above ground.
temperature_2m_minMinimum daily air temperature (°C) measured at 2 meters above ground.
temperature_2m_meanAverage daily air temperature (°C) measured at 2 meters above ground.
apparent_temperature_maxMaximum daily apparent temperature (°C) accounting for wind chill and humidity.
apparent_temperature_minMinimum daily apparent temperature (°C) accounting for wind chill and humidity.
apparent_temperature_meanAverage daily apparent temperature (°C) accounting for wind chill and humidity.
uv_index_maxMaximum daily UV Index value, indicating the strength of sunburn-producing ultraviolet radiation at the Earth's surface for the day.
uv_index_clear_sky_maxMaximum UV Index expected for the day assuming clear sky conditions, representing the highest potential intensity of ultraviolet radiation.
rain_sumDaily cumulative rainfall in millimeters.
showers_sumDaily cumulative showers in millimeters.
snowfall_sumDaily cumulative snowfall in centimeters.
precipitation_sumDaily cumulative precipitation in millimeters including rain, showers, and snowfall.
precipitation_probability_meanAverage probability of precipitation occurrence throughout the day.
wind_speed_10m_maxMaximum wind speed (km/h) recorded at 10 meters above ground during the day.
wind_speed_10m_minMinimum wind speed (km/h) recorded at 10 meters above ground during the day.
wind_speed_10m_meanAverage wind speed (km/h) at 10 meters above ground throughout the day.
wind_gusts_10m_maxMaximum wind gust speed (km/h) at 10 meters above ground during the day.
wind_gusts_10m_minMinimum wind gust speed (km/h) at 10 meters above ground during the day.
wind_gusts_10m_meanAverage wind gust speed (km/h) at 10 meters above ground throughout the day.
wind_direction_10m_dominantPredominant wind direction in degrees at 10 meters above ground during the day.
shortwave_radiation_sumDaily cumulative solar radiation in Megajoules per square meter.
surface_pressure_meanAverage atmospheric pressure (hPa) at surface level throughout the day.
pressure_msl_meanAverage atmospheric pressure (hPa) adjusted to mean sea level throughout the day.
visibility_meanAverage horizontal visibility distance in meters throughout the day.
cloud_cover_meanAverage percentage of sky covered by clouds throughout the day.
dew_point_2m_maxMaximum dew point temperature (°C) at 2 meters above ground during the day.
dew_point_2m_minMinimum dew point temperature (°C) at 2 meters above ground during the day.
dew_point_2m_meanAverage dew point temperature (°C) at 2 meters above ground throughout the day.
relative_humidity_2m_maxMaximum relative humidity percentage at 2 meters above ground during the day.
relative_humidity_2m_minMinimum relative humidity percentage at 2 meters above ground during the day.
relative_humidity_2m_meanAverage relative humidity percentage at 2 meters above ground throughout the day.
et0_fao_evapotranspiration_sumDaily reference evapotranspiration (mm) for well-watered grass following FAO-56 standards.
When precision is "hourly", each date contains an hourly array. Each element has the following fields:
timestampISO 8601 formatted timestamp of the hourly weather observation.
temperature_2mAir temperature (°C) measured at 2 meters above ground.
relative_humidity_2mRelative humidity percentage at 2 meters above ground.
dew_point_2mDew point temperature (°C) at 2 meters above ground.
apparent_temperatureApparent temperature (°C) accounting for wind chill and humidity.
precipitationCumulative precipitation (mm) over the preceding hour including rain, showers, and snowfall.
precipitation_probabilityLikelihood of precipitation occurrence during this hour.
rainCumulative rainfall (mm) over the preceding hour.
showersCumulative showers (mm) over the preceding hour.
snowfallCumulative snowfall (cm) over the preceding hour.
weather_codeWMO weather condition code representing current conditions.
pressure_mslAtmospheric pressure (hPa) adjusted to mean sea level.
surface_pressureAtmospheric pressure (hPa) at surface level.
cloud_coverPercentage of sky covered by clouds.
visibilityHorizontal visibility distance in meters.
wind_speed_10mWind speed (km/h) at 10 meters above ground.
wind_direction_10mWind direction in degrees at 10 meters above ground.
wind_gusts_10mMaximum wind gust speed (km/h) over the preceding hour at 10 meters above ground.
uv_indexUV radiation intensity index.
uv_index_clear_skyUV index assuming cloud-free conditions.
shortwave_radiationIncoming solar radiation (W/m²) averaged over the preceding hour.
et0_fao_evapotranspirationHourly reference evapotranspiration (mm) for well-watered grass following FAO-56 standards.
When precision is "minutely", each date contains a minutely array. Each element has the following fields:
timestampISO 8601 formatted timestamp of the minute-level weather observation.
temperature_2mInstantaneous air temperature (°C) measured at 2 meters above ground.
relative_humidity_2mInstantaneous relative humidity percentage at 2 meters above ground.
apparent_temperatureInstantaneous apparent temperature (°C) accounting for wind chill and humidity.
precipitationCumulative precipitation (mm) over the preceding 15 minutes.
rainCumulative rainfall (mm) over the preceding 15 minutes.
snowfallCumulative snowfall (cm) over the preceding 15 minutes.
weather_codeWMO weather condition code.
wind_speed_10mInstantaneous wind speed (km/h) at 10 meters above ground.
wind_direction_10mInstantaneous wind direction in degrees at 10 meters above ground.
wind_gusts_10mMaximum wind gust speed (km/h) over preceding 15 minutes at 10 meters above ground.
visibilityInstantaneous horizontal visibility distance in meters.
shortwave_radiationIncoming solar radiation (W/m²) averaged over the preceding 15 minutes.
Astronomical data for each date in the range:
dateCalendar date in YYYY-MM-DD format for the astronomical data.
mid_nightTime of true solar midnight in HH:MM format.
night_endTime when astronomical twilight ends and dawn begins in HH:MM format.
sunriseTime when the Sun becomes visible above the horizon in HH:MM format.
solar_noonTime when the Sun reaches its highest point in the sky in HH:MM format.
sunsetTime when the Sun disappears below the horizon in HH:MM format.
night_beginTime when astronomical twilight begins and night starts in HH:MM format.
day_lengthTotal duration of daylight in HH:MM format.
sun_statusCurrent position of the Sun relative to the horizon (above_horizon, below_horizon, or -).
moon_phaseCurrent lunar phase (NEW_MOON, WAXING_CRESCENT, FULL_MOON, WANING_GIBBOUS, etc.).
moonriseTime when the Moon becomes visible above the horizon in HH:MM format.
moonsetTime when the Moon disappears below the horizon in HH:MM format.
moon_statusCurrent visibility status of the Moon (visible, not_visible, or -).
The API uses standard HTTP status codes to indicate the success or failure of requests. For common status codes like 429 (Too Many Requests), refer to the general API documentation.
Invalid latitude or longitude values. Latitude must be between -90 and 90, and longitude must be between -180 and 180
Forecast date range must be within 2026-06-04 to 2026-06-19
We couldn't find the location (asdfghjklqwerty). Try a city or state level location address only.
Reference for the weather_code field values returned in the daily, hourly, minutely, and astronomy objects. Codes follow the WMO standard for weather interpretation.
0Clear sky — completely clear with no cloud coverage.
1, 2, 3Mainly clear, partly cloudy, and overcast — varying cloud coverage levels.
45, 48Fog — standard fog (45) and depositing rime fog (48).
51, 53, 55Drizzle — light (51), moderate (53), and dense intensity (55).
56, 57Freezing drizzle — light (56) and dense/heavy intensity (57).
61, 63, 65Rain — slight (61), moderate (63), and heavy intensity (65).
66, 67Freezing rain — light (66) and heavy intensity (67).
71, 73, 75Snowfall — slight (71), moderate (73), and heavy intensity (75).
77Snow grains — small, white, opaque ice particles.
80, 81, 82Rain showers — slight (80), moderate (81), and violent intensity (82).
85, 86Snow showers — slight (85) and heavy intensity (86).
95Thunderstorm — slight or moderate intensity.
96, 99Thunderstorm with hail — slight hail (96) and heavy hail (99).