Weather widget

Weather Widget

Display a Weather Forecast on Your Website for Free

How to Add a Weather Widget to a Website

1. Include the following code in your HTML where you want your widget to appear:

<div id="weatherwidget" class="weatherwidget" style="width:45%;float:left;"></div><script src="//<Location>/<lat_lon>/<orientation>/on/<target_id>/<unit>" type="text/javascript"></script>

2. Change the following to your liking:

  • <Location>

The Name of the location that is shown above the forecast.

  • <lat_lon>

The coordinates of the location you want to display the forecast for as latitude_longitude given in decimal degrees. (E.g. 47.424_9.377 for St. Gallen)

  • <orientation>

The orientation of the widget. Either width for horizontal or height for a vertical layout.

  • <target_id>

The id of the container that widget is to be shown in.

  • <unit>

Temperature display in degrees Celsius ?unit=C or in degrees Fahrenheit ?unit=F . If not specified degrees Celsius are displayed.

Horizontal Widget

Vertical Widget

Explore Our Services

We provide the most accurate weather data for any location, at any time, to improve your business.

Icon on Picture api large
With our Weather API you get continuous access to worldwide high-resolution weather, ocean, environment and climate data as well as historical data, real-time data, forecasts and climate scenarios up to 2100.
Explore the Weather API
Icon on picture alerts large 2
Only you know which types of weather pose the greatest risks to your business. That's why we've developed a highly customizable weather warning system, ensuring that every notification you receive is pertinent to your operations.
Learn more
Icon on Picture datashop large v2
If you only need one-time access to certain weather data, you can directly download individual weather data sets from our weather data shop. Here you will find a comprehensive selection of current and historical weather data as well as sector-specific weather parameters.
Explore Data Shop
Icon on Picture EURO1k v5 large
European weather model at 1 km resolution: get accurate weather forecasts across Europe and make better decisions.
More about EURO1k
Rough Mountain 02
Closing the meteorological data gap in the Earth's lower atmosphere with Meteodrones. Designed and assembled in Switzerland.
Explore Meteodrones
Icon on Picture meteobase large
Meteobase - the home of our Meteodrone. The Meteobase is the perfect partner and home for our weather drones to measure weather data at any location.
Explore Meteobase
Icon on Picture metx large v1
Visualize all weather events in a high-resolution map view — with our web-based weather map tool MetX based on the Weather API.
MetX Weather Visualization
Icon on Picture solar forecast large
Energy forecasts for solar, wind and hydropower - based on the world's most accurate weather data.
Explore Energy Forecasts
Icon on Picture rainy cloud large
We combine existing weather data with unique technologies and the skills of our weather and data scientists to bring you the most accurate weather data.
Data Collection
Melanie Luther – Meteorologist and Head of Sales
Melanie Luther
Head of Sales and Meteorologist

Customised industry solutions

Get in touch - we are here for you.

Contact us if you have questions about specific industry applications or would like advice from our experts! We look forward to your enquiry and will get back to you within one working day.