Forecast Weather


Forecast weather API method returns upto next 10 day weather forecast as json. The data is returned as a Forecast Object.


Forecast object contains astronomy data, day weather forecast and hourly interval weather information for a given city.


forecastday: Parent element


forecastday -> day: 'day' element inside forecastday contains max/min temperature, average temperature


forecastday -> astro
forecastday -> hour:


Forecastday Parent element
forecastday -> day day element contains:
  • Max, min and average temperature
  • Max wind speed
  • Total precipitation
  • Day weather condition
forecastday -> astro astro element contains sunrise, sunset, moonrise and moonset data
forecastday -> hour hour element contains hour by hour weather forecast information

forecastday

Field Data Type Description
date string Forecast date
date_epoch int Forecast date as unix time.
day element See day element
astro element See astro element
hour element See hour element

day Element

Field Data Type Description
maxtemp_c decimal Maximum temperature in celsius for the day.
maxtemp_f decimal Maximum temperature in fahrenheit for the day
mintemp_c decimal Minimum temperature in celsius for the day
mintemp_f decimal Minimum temperature in fahrenheit for the day
avgtemp_c decimal Average temperature in celsius for the day
avgtemp_f decimal Average temperature in fahrenheit for the day
maxwind_mph decimal Maximum wind speed in miles per hour
maxwind_kph decimal Maximum wind speed in kilometer per hour
totalprecip_mm decimal Total precipitation in milimeter
totalprecip_in decimal Total precipitation in inches
condition:text string Weather condition text
condition:icon string Weather condition icon
condition:code int Temperature in code

astro Element

Field Data Type Description
sunrise string Sunrise time
sunset string Sunset time
moonrise string Moonrise time
moonset string Moonset time

hour Element

Field Data Type Description
time_epoch int Time as epoch
time string Date and time
temp_c decimal Temperature in celsius
temp_f decimal Temperature in fahrenheit
condition:text string Weather condition text
condition:icon string Weather condition icon
condition:code int Temperature in code
wind_mph decimal Maximum wind speed in miles per hour
wind_kph decimal Maximum wind speed in kilometer per hour
wind_degree int Wind direction in degrees
wind_dir string Wind direction as 16 point compass. e.g.: NSW
pressure_mb decimal Pressure in millibars
pressure_in decimal Pressure in inches
precip_mm decimal Precipitation amount in millimeters
precip_in decimal Precipitation amount in inches
humidity int Humidity as percentage
cloud int Cloud cover as percentage
feelslike_c decimal Feels like temperature as celcius
feelslike_f decimal Feels like temperature as fahrenheit
windchill_c decimal Windchill temperature in celcius
windchill_f decimal Windchill temperature in fahrenheit
heatindex_c decimal Heat index in celcius
heatindex_f decimal Heat index in fahrenheit
dewpoint_c decimal Dew point in celcius
dewpoint_f decimal Dew point in fahrenheit
will_it_rain int 1 = Yes 0 = No
Will it will rain or not
will_it_snow int 1 = Yes 0 = No
Will it snow or not
is_day int 1 = Yes 0 = No
Whether to show day condition icon or night icon