The Daily Weather Forecast section provides access to a daily weather forecast. All data undergoes thorough
aggregation and processing using optimal spatiotemporal interpolation methods, which significantly improves the accuracy
and consistency of the forecasts. Reliable meteorological models and formulas, adapted to specific regional conditions,
are used to calculate the values, ensuring high reliability of the forecast data.
Some parameters, such as temperature, are provided as the maximum and minimum for the day because the average value does
not always accurately reflect daily fluctuations. However, for parameters that are less sensitive to extreme values, the
daily average is more appropriate. Examples of such parameters include air humidity, atmospheric pressure, and wind
speed, where daily variations are not as pronounced and average values provide useful information on trends throughout
the day.
slug
| lat
and lon
: Location parameters.days
: The number of days for which the forecast is requested. For instance, the value 4 means that data will be
provided for four days, starting from the current day. The maximum allowable value depends on your tariff plan and the
data provided by the service.key
: Your unique API token required to authorize the request. The API token can be obtained from your personal
account after registration and token creation.
This method uses the slug
parameter to specify a unique location identifier.
Example:
curl --location 'https://api.meteoflow.com/v2/forecast/by-days/?slug=united-kingdom-london&days=4&key=TOKEN'
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.meteoflow.com/v2/forecast/by-days/?slug=united-kingdom-london&days=4&key=TOKEN"
method := "GET"
client := &http.Client{}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.meteoflow.com/v2/forecast/by-days/?slug=united-kingdom-london&days=4&key=TOKEN',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
conn = http.client.HTTPSConnection("https://api.meteoflow.com")
payload = ''
headers = {}
conn.request("GET", "/v2/forecast/by-days/?slug=russia-moscow&days=4&key=TOKEN", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
A unique location identifier encoded as a string. For example, united-kingdom-london indicates London, United
Kingdom. This parameter allows the API to precisely determine for which city or region the forecast is being requested.
A list of all available slug values can be found in the Geography API section, which lists all supported locations.
This method allows you to specify the location using geographic coordinates.
lat
: Latitude in decimal degrees.lon
: Longitude in decimal degrees.
Example:
curl --location 'https://api.meteoflow.com/v2/forecast/by-days/?lat=51.5072&lon=-0.1275&days=4&key=TOKEN'
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.meteoflow.com/v2/forecast/by-days/?lat=51.5072&lon=-0.1275&days=4&key=TOKEN"
method := "GET"
client := &http.Client{}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.meteoflow.com/v2/forecast/by-days/?lat=51.5072&lon=-0.1275&days=4&key=TOKEN',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
conn = http.client.HTTPSConnection("https://api.meteoflow.com")
payload = ''
headers = {}
conn.request("GET", "/v2/forecast/by-days/?lat=51.5072&lon=-0.1275&days=4&key=TOKEN", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
By providing the lat and lon parameters, you directly specify the exact location for which the forecast is required.
All successful API responses return with an HTTP status of 200 OK and contain data in JSON format.
Field | Description | Format |
---|
place | Locality. | Object |
daily | Daily weather forecast. | Object |
astronomy | Astronomy. | ]Object |
Field | Description | Format |
---|
country | Country code. | String |
timezone_offset | Timezone offset from UTC in seconds. | Number |
latitude | Longitude. | Number |
longitude | Latitude. | Number |
city_name | Name of the locality. | String |
country_name | Country name. | String |
region_name | Region name. | String |
The daily object describes the weather forecast for a specific day, including key parameters such as maximum and minimum
temperature, precipitation probability, wind speed, and other indicators characteristic of that day.
Field | Description | Format |
---|
max | Maximum for the day. | Number |
min | Minimum for the day. | Number |
Field | Description | Format |
---|
type | Type of precipitation. Possible values:
none – no precipitation.
rain – rain.
rain-snow – rain with snow.
snow – snow. | String |
mm | Amount of precipitation in millimeters. | Number | Null |
Field | Description | Format |
---|
type | Cloudiness. Possible values:
clear – clear.
partly cloudy – partly cloudy.
cloudy – overcast. | String |
Field | Description | Format |
---|
code | Symbolic code for the weather icon. | String |
url | URL of the weather icon. | String |
Field | Description | Format |
---|
val | Maximum value. | Number |
description | Description. | String |
Field | Description | Format |
---|
max | Maximum for the day. | Number |
min | Minimum for the day. | Number |
Field | Description | Format |
---|
max | Maximum for the day, in percentage. | Number |
min | Minimum for the day, in percentage. | Number |
The forecasted visibility range during the day, measured in meters. This parameter helps assess visibility conditions,
which is particularly important for transportation and outdoor activities. The visibility value takes into account
factors such as fog, precipitation, and other weather conditions affecting visibility at the given location.
Field | Description | Format |
---|
max | Maximum for the day, in meters. | Number | Null |
min | Minimum for the day, in meters. | Number | Null |
Field | Description | Format |
---|
speed | Maximum wind speed. | Number |
degree | Wind direction in meteorological degrees (0° = North, 90° = East, 180° = South, 270° = West). | Number |
gust | Maximum wind gust speed. | Number |
Field | Description | Format |
---|
sunrise | Sunrise time in UTC format (ISO 8601), indicating the exact moment the day begins. | Number |
sunset | Sunset time in UTC format (ISO 8601), indicating the moment when daylight ends. | Number |
day_length | Duration of the daylight in minutes, calculated as the difference between sunset and sunrise. | Number |
moon_angle | The current angle of the Moon in the sky, measured in degrees (0° to 360°). | Number |
moon_illumination | The percentage of the Moon's surface illuminated by the Sun (0% = new moon, 100% = full moon). | Number |
moon_phase_code | Numeric code for the Moon's phase (0–7). | Number |
moon_phase_desc | Textual description of the Moon's phase. | string |