| current_date_and_timeA | Get the current weekday and Swiss local time.
Call this first when the question is relative, such as "tomorrow" or "tonight", because
the forecast tools take a real date rather than an offset. The time is written the way
the tools read it, ISO 8601 without an offset, so it can be sent back to them as it is.
Returns:
str: For example "Today is Wednesday, 2026-09-23T13:02 (Swiss time)".
|
| daily_forecastA | Get the whole-day forecast for a location, for one day or several days in a row: the
cheapest way to answer "how is the weather" for a day, the weekend or the week.
Each day covers a Swiss calendar day, 00:00 to 24:00 local time. The minimum and maximum
are the lowest and highest hourly mean temperature of that day, and the weather words
describe the daytime. Always use this for the rain of a whole day.
Args:
location (str): Location name (e.g., "Zurich") or Swiss postal code (e.g., "8001").
start_date (str): The first Swiss calendar day in ISO 8601, e.g. "2026-09-23". Today or up to 8 days ahead.
days (int): How many days in a row, from 1 to 9. Default 1.
Returns:
dict: The resolved location with its altitude, one row per day, and the model run.
Each row has the date and weekday, the minimum and maximum temperature in
Celsius, the day's rainfall in millimetres as its median and its 10th and 90th
percentile (in 8 of 10 possible outcomes, the rain lies between the two
percentiles), and the weather in words with a matching emoji. A value is None
when MeteoSwiss does not publish it for that location.
Examples:
daily_forecast("Zurich", "2026-09-23")
daily_forecast("Lugano", "2026-09-26", 2) # a weekend
|
| hourly_forecastA | Get the weather hour by hour for a location: temperature with its likely range, chance
of rain and the weather in words.
Use this for one hour, such as "how warm is it at 15:00", or part of a day, such as "how
is the afternoon" or "when is the best time for a walk". Without end it returns the one
hour starting at start. Each row covers the hour from its "from" to its "to": the
temperature is the mean of that hour, while the rain chance and the weather cover the 3
hours up to "to", as MeteoSwiss publishes them only per 3 hours. For whole days use
daily_forecast, for rain amounts rain_outlook.
Args:
location (str): Location name (e.g., "Zurich") or Swiss postal code (e.g., "8001").
start (str): Swiss local time in ISO 8601 without offset, e.g. "2026-09-23T15:00". Today or up to 8 days ahead.
end (str): Optional. Swiss local time in ISO 8601 without offset, at most 24 hours after start.
Returns:
dict: The resolved location with its altitude, one row per hour (from, to,
temperature in Celsius as its median and its 10th and 90th percentile, rain
chance in percent, weather in words with a matching emoji), and the model run.
In 8 of 10 possible outcomes, the temperature lies between the two percentiles.
Examples:
hourly_forecast("Zurich", "2026-09-23T15:00") # one hour
hourly_forecast("Zurich", "2026-09-23T12:00", "2026-09-23T18:00") # the afternoon
|
| rain_outlookA | Get when and how much it may rain at a location, in 3-hour blocks over a period.
Use this for "will it rain this afternoon", "do I need an umbrella" or "when does the
rain stop". Each block gives the chance of rain, the median rainfall of the 3 hours, and
how much the wettest hour of the block may bring (its 90th percentile). The median is
often 0 when showers are possible, so read the chance and the "up to" amount as well.
Args:
location (str): Location name (e.g., "Zurich") or Swiss postal code (e.g., "8001").
start (str): Swiss local time the period starts, ISO 8601 without offset, e.g. "2026-09-23T12:00". Today or up to 8 days ahead.
end (str): Swiss local time the period ends, ISO 8601 without offset, at most 48 hours after start.
Returns:
dict: The resolved location with its altitude, one row per 3-hour block (from, to,
rain chance in percent, median rainfall and wettest hour's "up to" amount in
millimetres), and the model run.
Examples:
rain_outlook("Zurich", "2026-09-23T12:00", "2026-09-24T00:00")
rain_outlook("Lugano", "2026-09-24T06:00", "2026-09-24T18:00")
|
| sunshine_hoursA | Get the sunshine hours for a location over a period.
MeteoSwiss publishes sunshine as minutes per hour, which are added up over the period
and reported as hours.
Args:
location (str): Location name (e.g., "Zurich") or Swiss postal code (e.g., "8001").
start (str): Swiss local time the period starts, ISO 8601 without offset, e.g. "2026-09-23T06:00". Today or up to 8 days ahead.
end (str): Swiss local time the period ends, ISO 8601 without offset, e.g. "2026-09-23T18:00".
Returns:
dict: Sunshine in hours, the resolved location with its altitude, the period, and
the model run.
Examples:
sunshine_hours("Zurich", "2026-09-23T00:00", "2026-09-24T00:00") # the whole day
sunshine_hours("Zurich", "2026-09-23T12:00", "2026-09-23T18:00") # the afternoon
|
| windA | Get the wind at a location at a specific time: mean speed, strongest gust and direction.
The speed is the mean over the hour up to that time, and the gust the strongest
one-second gust in that hour, which is what makes wind hazardous. The gust's 90th
percentile is a cautious high estimate of that strongest gust: in 9 of 10 possible
outcomes the gust stays below it, and in 1 of 10 it is stronger, so it is not the
highest gust possible. The direction is where the wind blows from, in degrees clockwise
from north (0 is a north wind, 180 a south wind) and as a compass point.
Args:
location (str): Location name (e.g., "Zurich") or Swiss postal code (e.g., "8001").
when (str): Swiss local time in ISO 8601 without offset, e.g. "2026-09-23T14:00". Today or up to 8 days ahead.
Returns:
dict: Wind speed, gust and the gust's 90th percentile in kilometres per hour, the
direction in degrees and as a compass point such as "SW", the resolved location
with its altitude, the time it is valid for, and the model run.
Examples:
wind("Zurich", "2026-09-23T14:00")
wind("Säntis", "2026-09-24T12:00")
|
| total_cloud_coverA | Get how cloudy it is at a location at a specific time.
MeteoSwiss publishes low, medium and high cloud separately, and they overlap, so the
total is an estimate that assumes the layers are independent. All three layers are
returned as well, which tells low fog apart from thin high cloud.
When a number is not needed, hourly_forecast answers "how cloudy" in plain words.
Args:
location (str): Location name (e.g., "Zurich") or Swiss postal code (e.g., "8001").
when (str): Swiss local time in ISO 8601 without offset, e.g. "2026-09-23T14:00". Today or up to 8 days ahead.
Returns:
dict: Estimated total cloud cover in percent, the low, medium and high layers in
percent, the resolved location with its altitude, the time it is valid for,
and the model run.
Examples:
total_cloud_cover("Zurich", "2026-09-23T14:00")
total_cloud_cover("Locarno", "2026-09-24T09:00")
|
| freezing_levelA | Get the height of the 0 degree line at a location at a specific time.
This is the height where the air is at 0 degrees. Snow usually reaches somewhat below it,
so it answers questions about snow in the mountains, such as how high a ski area has to be.
Args:
location (str): Location name (e.g., "Zurich") or Swiss postal code (e.g., "8001").
when (str): Swiss local time in ISO 8601 without offset, e.g. "2026-09-23T14:00". Today or up to 8 days ahead.
Returns:
dict: The freezing level in metres above sea level, the resolved location with its
altitude, the time it is valid for, and the model run.
Examples:
freezing_level("Zermatt", "2026-09-23T14:00")
freezing_level("Davos", "2026-09-25T06:00")
|