You can get XML weather forecasts for 10 million places i Norway and the rest of the world. If you have technical abilities, you can use the XML data to make your own services and applications.
Important information
Before you start: Read the terms of service for using the free weather data from yr.no. The use of our data in violation of these terms, will result in blocking of your traffic.
"Bombing" of yr.no: Do not download large quantities of XML-files at one time. This causes too much load for yr.no. Download the data as you need it, and add 60 minutes of caching on all data that you get.
There is an XML-forecast for all places on yr.no.
To get a forecast for a 6-hour period, add forecast.xml (varsel.xml for Norwegian) to the end of your URL:
- yr.no/place/Norway/Telemark/Sauherad/Gvarv/forecast.xml (english)
- yr.no/stad/Noreg/Telemark/Sauherad/Gvarv/varsel.xml (nynorsk)
- yr.no/sted/Norge/Telemark/Sauherad/Gvarv/varsel.xml (bokmål)
To get hourly forecasts in your URLs:
- yr.no/place/Norway/Telemark/Sauherad/Gvarv/forecast_hour_by_hour.xml (engelsk)
- yr.no/stad/Noreg/Telemark/Sauherad/Gvarv/varsel_time_for_time.xml (nynorsk)
- yr.no/sted/Norge/Telemark/Sauherad/Gvarv/varsel_time_for_time.xml (bokmål)
Most people use the data from the forecast.xml. You only need the forecast_hour_by_hour.xml if you want to display all the details.
Have you seen the now-forecast on our webpages and in our app? Yr displays the precipitation forecast for the next 90 minutes in a graph. This forecast is based on radar images. This forecast is available in varsel_nu.xml.
- http://www.yr.no/sted/Norge/Telemark/Sauherad/Gvarv/varsel_nu.xml (does not contain text)
- http://www.yr.no/stad/Norge/Telemark/Sauherad/Gvarv/varsel_nu.xml
- http://www.yr.no/place/Norge/Telemark/Sauherad/Gvarv/varsel_nu.xml
Specification for the XML files.
A new Yr API is on the way!
We are working on a new and modern API, that we plan to release some time in the winter 2019. Make sure you visit this site to keep posted!
Links to XML forecasts for significant places in Norway
You can download an overview of over XML files for the most significant places within each municipality from us. This list will give you all major cities and the most important populated places. There is a minimum of five places included from each municipality.
Download 11.000 places with links to forecasts: important places in Norway. (Tab-separated fil - UTF8.)
The file contains a mixture of cities, important populated places and typical travel destinations in the municipality. I addition we have included all populated places, villages, lighthouses and tourist lodges. If you do not need quite so many places, delete places priority 99 from the list. This will leave you with about 2000 places spread across the country.
Links to XML forecasts for all Norwegian post codes
You can download forecasts for each post code. The forecast will be for the "natural" middle of each post code. The list of post codes was made by the volunteer contribution of the Yr users in august 2009. Some of the post codes may be misplaced, hence the forecast may be for the wrong place.
Download links for forecasts for all post codes: Norwegian post codes
Links to XML forecasts for 800.000 places in Norway
If you want the forecast for all the places in Norway, you will have to do a much more extensive job. In addition you will have to buy access to the Central registry from The Norwegian Mapping Authority.
Their URLs for the XML files are structured as follows:
- first part (place) gives the language in which you receive the forecasts.
- second part is country (Norway).
- third part is county.
- fourth part is municipality.
- fifth part is the place.
For Norway, Yr strictly follows the structure given by the he Norwegian Mapping Authority.
Links to XML forecasts for non-Norwegian places
The links to non-Norwegian places are structured in the same way as the links to Norwegian places. Look at the URLs and you will quickly see the structure.
The non-Norwegian places in yr.no are downloaded from Geonames.org. You can download the everything in their database yourself: geonames.org.
You can also download an overview over the XML links to a selection of places in every country. This will give you all the capitols, regional capitols and cities with more than 500.000 inhabitants.
Download 16.000 places with links to their forecasts: important places in the rest of the world (Tab-separated fil - UTF8.)