Java library/client for
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Meteo is an Open-Source Java based library/client for handling weather data from

It mainly consists of two parts: A Java client that parses data from the MET api into java objects and helper tools to help you pick the right kind of data for different scenarios.

Please note that Meteo is in no way affiliated with the Norwegian Meteorological Institute except for the fact that it use their API to provide you with weather data.

Meteo is developed and maintained by Amedia Utvikling AS. It is in use within all the Amedia sites (more than 70). It mainly supports the services that Amedia needs at any given time. But we will consider adding other services as well upon request (or send a pull request).

The MET terms of use

Make sure to read the[Conditions for use of the service] from the Norwegian Meteorological Institute.

Also make sure to read this

Reverse proxying

As MET states in their terms of use, you must respect their cache headers. Meaning that you should only fetch one resource one time within the TTL set by MET in each response.

The easiest way to achieve this is by installing a[Reverse Proxy] like[Squid]. An alternative solution is to implement your own[MeteoClient] that respects these requirements.

The[default implementation] of MeteoClient does not have any caching what so ever, but it does support configuring a proxy.

The core library and client

The core library in Meteo is all about offering access to the raw MET data through a Java API. As stated earlier we have only implemented support for the services that Amedia needs or that is requested/implemented by other users (Please send pull requests).


Meteo requires Java 8.x or later.


You will find Meteo in the central maven repository:|ga|1|a%3A%22meteo%22

For Maven you would add this to your pom:


If you want to use the default implementation of a MeteoClient, then you would also have to add this:



In the[meteo-examples] module you will find several useful examples that should get you up and running

Creating a default client

If you feel fine with the default MeteoClient shipped with Meteo, then create a client like this:

MeteoClient meteoClient = new DefaultMeteoClient();

This client allows you to configure a proxy and connection timeout if needed:

meteoClient.setProxy("", 9000);

You can also create you own client easily by implementing the MeteoClient interface in your own class.


The Meteo core library is organized in a set of services where each service represents on of the services in the MET API. Each service will need an Meteo client to be able to fetch data.

Current services:

  • Location forecast
  • Sunrise
  • Text forecast (Experimental)
  • Text locations (Experimental)

Location forecast service

This is the service for fetching raw data from

LocationforecastLTSService service = new LocationforecastLTSService(meteoClient);
try {
    MeteoData<LocationForecast> data = service.fetchContent(longitude, latitude, altitude);
} catch (MeteoException e) {
    // Handle exception.

Sunrise service

This is the service for fetching raw data from

SunriseService service = new SunriseService(meteoClient);
try {
    MeteoData<Sunrise> data = service.fetchContent(longitude, latitude, date);
} catch (MeteoException e) {
    // Handle exception.

General developer notes

Meteo uses checked exceptions at the moment. This will change in the 3.1.x versions.