https://api.apifreaks.com/v1.0/weather/forecast
$ pip install requests
Click Test it to start the request and see the response here!
| Field | Type | Requirement | Description |
|---|---|---|---|
| location | Object | Mandatory | Provides detailed information about the location. |
| forecast | Object | Mandatory | Forecast data object for the requested date range. |
| forecast[date].daily | Object | Optional | Daily forecast data for the given date. |
| forecast[date].hourly[] | Array | Optional | Hourly forecast array for the given date. |
| forecast[date].minutely[] | Array | Optional | Minutely forecast array for the given date. |
| forecast[date].astronomy | Object | Mandatory | Astronomy data for the given date. |
"location" (when coordinates Provided) object contains the following fields.
| Field | Type | Requirement | Description |
|---|---|---|---|
| latitude | float | Mandatory | Geographic latitude of the given Coordinates |
| longitude | float | Mandatory | Geographic longitude of the given Coordinates |
| country_name | string | Mandatory | Country name by Coordinates |
| state_prov | string | Mandatory | State or province of given Coordinates |
| city | string | Mandatory | City of the given Coordinates |
| locality | string | Optional | Local area, neighborhood, or village name |
| elevation | float | Optional | Elevation above sea level (meters) |
| timezone | string | Mandatory | Timezone identifier (e.g., GMT, PST, etc.) |
| timezone_abbreviation | string | Mandatory | Abbreviation of timezone (e.g., GMT, IST, etc.) |
"location" (when IP Provided) object contains the following fields.
| Field | Type | Requirement | Description |
|---|---|---|---|
| continent_code | string | Mandatory | Two-letter code of the continent |
| continent_name | string | Mandatory | Full name of the continent |
| country_code2 | string | Mandatory | Two-letter ISO country code |
| country_code3 | string | Mandatory | Three-letter ISO country code |
| country_name | string | Mandatory | Country name of the location |
| country_name_official | string | Mandatory | Official long-form country name |
| is_eu | boolean | Optional | Indicates if the country is part of the European Union |
| state_prov | string | Mandatory | State or province of the location |
| state_code | string | Optional | ISO code for the state or province |
| district | string | Optional | District or administrative division |
| city | string | Mandatory | City of the location |
| zipcode | string | Optional | Postal or ZIP code |
| latitude | float | Mandatory | Geographic latitude of the location |
| longitude | float | Mandatory | Geographic longitude of the location |
| locality | string | Optional | Local area or neighborhood |
| elevation | float | Optional | Elevation above sea level (meters) |
| timezone | string | Mandatory | Timezone identifier |
| timezone_abbreviation | string | Mandatory | Abbreviation of timezone |
"location" (when location Provided) object contains the following fields.
| Field | Type | Requirement | Description |
|---|---|---|---|
| location_string | string | Mandatory | Full address or free-text location input |
| country_name | string | Mandatory | Country name of the location |
| state_prov | string | Mandatory | State or province of the location |
| city | string | Mandatory | City of the location |
| locality | string | Optional | Local area, neighborhood, or village name |
| latitude | float | Mandatory | Geographic latitude of the location |
| longitude | float | Mandatory | Geographic longitude of the location |
| elevation | float | Optional | Elevation above sea level (meters) |
| timezone | string | Mandatory | Timezone identifier |
| timezone_abbreviation | string | Mandatory | Abbreviation of timezone |
"forecast[date].daily" object contains the following fields.
| Field | Type | Requirement | Description |
|---|---|---|---|
| timestamp | string | Mandatory | ISO 8601 formatted timestamp of the weather observation. |
| weather_code | int | Mandatory | Weather condition code. |
| temperature_2m_max | float | Mandatory | Maximum air temperature at 2 meters. |
| temperature_2m_min | float | Mandatory | Minimum air temperature at 2 meters. |
| temperature_2m_mean | float | Mandatory | Mean air temperature at 2 meters. |
| apparent_temperature_max | float | Mandatory | Maximum feels-like temperature. |
| apparent_temperature_min | float | Mandatory | Minimum feels-like temperature. |
| apparent_temperature_mean | float | Mandatory | Mean feels-like temperature. |
| uv_index_max | float | Mandatory | Maximum daily UV Index value, indicating the strength of sunburn-producing ultraviolet radiation at the Earth’s surface for the day. |
| uv_index_clear_sky_max | float | Mandatory | Maximum UV Index expected for the day assuming clear sky conditions, representing the highest potential intensity of ultraviolet radiation. |
| rain_sum | float | Mandatory | Total rainfall for the day. |
| showers_sum | float | Mandatory | Total showers for the day. |
| snowfall_sum | float | Mandatory | Total snowfall for the day. |
| precipitation_sum | float | Mandatory | Total precipitation for the day. |
| precipitation_probability_mean | int | Mandatory | Mean probability of precipitation (%) for the day. |
| wind_speed_10m_max | float | Mandatory | Maximum wind speed at 10 meters. |
| wind_speed_10m_min | float | Mandatory | Minimum wind speed at 10 meters. |
| wind_speed_10m_mean | float | Mandatory | Mean wind speed at 10 meters. |
| wind_gusts_10m_max | float | Mandatory | Maximum wind gusts at 10 meters. |
| wind_gusts_10m_min | float | Mandatory | Minimum wind gusts at 10 meters. |
| wind_gusts_10m_mean | float | Mandatory | Mean wind gusts at 10 meters. |
| wind_direction_10m_dominant | int | Mandatory | Dominant wind direction at 10 meters (degrees). |
| shortwave_radiation_sum | float | Mandatory | Total shortwave radiation received. |
| surface_pressure_mean | float | Mandatory | Mean surface pressure. |
| pressure_msl_mean | float | Mandatory | Mean sea-level pressure. |
| visibility_mean | float | Mandatory | Mean visibility distance. |
| cloud_cover_mean | int | Mandatory | Mean cloud cover (%). |
| dew_point_2m_max | float | Mandatory | Maximum dew point at 2 meters. |
| dew_point_2m_min | float | Mandatory | Minimum dew point at 2 meters. |
| dew_point_2m_mean | float | Mandatory | Mean dew point at 2 meters. |
| relative_humidity_2m_max | int | Mandatory | Maximum relative humidity (%) at 2 meters. |
| relative_humidity_2m_min | int | Mandatory | Minimum relative humidity (%) at 2 meters. |
| relative_humidity_2m_mean | int | Mandatory | Mean relative humidity (%) at 2 meters. |
| et0_fao_evapotranspiration_sum | float | Mandatory | ET₀ Reference Evapotranspiration of a well-watered grass field. |
"forecast[date].hourly" array objects have the following fields.
| Field | Type | Requirement | Description |
|---|---|---|---|
| timestamp | string | Mandatory | ISO 8601 formatted timestamp of the weather observation. |
| temperature_2m | float | Mandatory | Air temperature at 2 meters. |
| relative_humidity_2m | int | Mandatory | Relative humidity at 2 meters (%). |
| dew_point_2m | float | Mandatory | Dew point at 2 meters. |
| apparent_temperature | float | Mandatory | Feels-like temperature. |
| precipitation | float | Mandatory | Total precipitation at this time. |
| precipitation_probability | int | Mandatory | Probability of precipitation (%). |
| rain | float | Mandatory | Rainfall at this hour. |
| showers | float | Mandatory | Showers at this hour. |
| snowfall | float | Mandatory | Snowfall at this hour. |
| weather_code | int | Mandatory | Weather condition code. |
| pressure_msl | float | Mandatory | Sea-level pressure. |
| surface_pressure | float | Mandatory | Surface pressure. |
| cloud_cover | int | Mandatory | Cloud cover (%). |
| visibility | float | Mandatory | Visibility distance. |
| et0_fao_evapotranspiration | float | Mandatory | Evapotranspiration (ET₀). |
| wind_speed_10m | float | Mandatory | Wind speed at 10 meters. |
| wind_direction_10m | int | Mandatory | Wind direction at 10 meters (degrees). |
| wind_gusts_10m | float | Mandatory | Wind gusts at 10 meters. |
| uv_index | float | Mandatory | UV index. |
| uv_index_clear_sky | float | Mandatory | UV index under clear-sky conditions. |
| shortwave_radiation | float | Mandatory | Shortwave radiation. |
| direct_radiation | float | Mandatory | Direct solar radiation. |
| diffuse_radiation | float | Mandatory | Diffuse solar radiation. |
| direct_normal_irradiance | float | Mandatory | Direct normal irradiance (DNI). |
| global_tilted_irradiance | float | Mandatory | Global tilted irradiance (GTI). |
"forecast[date].minutely" array objects have the following fields.
| Field | Type | Requirement | Description |
|---|---|---|---|
| timestamp | string | Mandatory | ISO 8601 formatted timestamp of the weather observation. |
| temperature_2m | float | Mandatory | Air temperature at 2 meters. |
| relative_humidity_2m | int | Mandatory | Relative humidity at 2 meters (%). |
| dew_point_2m | float | Mandatory | Dew point at 2 meters. |
| apparent_temperature | float | Mandatory | Feels-like temperature. |
| precipitation | float | Mandatory | Precipitation at this minute. |
| rain | float | Mandatory | Rainfall at this minute. |
| snowfall | float | Mandatory | Snowfall at this minute. |
| weather_code | int | Mandatory | Weather condition code. |
| wind_speed_10m | float | Mandatory | Wind speed at 10 meters. |
| wind_direction_10m | int | Mandatory | Wind direction at 10 meters (degrees). |
| wind_gusts_10m | float | Mandatory | Wind gusts at 10 meters. |
| visibility | float | Mandatory | Visibility distance. |
| shortwave_radiation | float | Mandatory | Shortwave radiation. |
| direct_radiation | float | Mandatory | Direct solar radiation. |
| diffuse_radiation | float | Mandatory | Diffuse solar radiation. |
| direct_normal_irradiance | float | Mandatory | Direct normal irradiance (DNI). |
| global_tilted_irradiance | float | Mandatory | Global tilted irradiance (GTI). |
"forecast[date].astronomy" object contains the following fields.
| Field | Type | Requirement | Description |
|---|---|---|---|
| date | string | Mandatory | Calendar date of astronomical data (YYYY-MM-DD). |
| mid_night | string | Mandatory | Time of true midnight (HH:MM). |
| night_end | string | Mandatory | Time when astronomical twilight ends, marking dawn beginning (HH:MM). |
| sunrise | string | Mandatory | Time when Sun becomes visible above horizon (HH:MM). |
| solar_noon | string | Mandatory | Time when Sun reaches highest point in sky (HH:MM). |
| sunset | string | Mandatory | Time when Sun disappears below horizon (HH:MM). |
| night_begin | string | Mandatory | Time when astronomical twilight begins, marking night start (HH:MM). |
| day_length | string | Mandatory | Total daylight duration (HH:MM). |
| sun_status | string | Mandatory | Current Sun position ("above_horizon","below_horizon", or "-"). |
| moon_phase | string | Mandatory | Current Moon phase ("NEW_MOON","WAXING_CRESCENT","FULL_MOON", etc.). |
| moonrise | string | Mandatory | Time when Moon becomes visible above horizon (HH:MM). |
| moonset | string | Mandatory | Time when Moon disappears below horizon (HH:MM). |
| moon_status | string | Mandatory | Current Moon visibility ("visible","not_visible", or "-"). |