Unofficial Java client for the IPMA open-data weather API (Portugal) — forecasts, warnings, UV index, fire risk and seismic data.
The Java module of the multi-language ipma-api project. See also
typescript/anddotnet/.
Important
Unofficial — not affiliated with IPMA. Data is free with attribution ("source: IPMA").
<dependency>
<groupId>io.github.marcelogdomingues</groupId>
<artifactId>ipma-api</artifactId>
<version>0.1.0</version>
</dependency>import io.github.marcelogdomingues.ipma.*;
import io.github.marcelogdomingues.ipma.model.*;
IpmaClient ipma = IpmaClient.builder().build();
Envelope<DailyForecast> forecast = ipma.cityForecast(1110600); // Lisboa
System.out.println(forecast.data.get(0).tMin + " / " + forecast.data.get(0).tMax);
List<Warning> warnings = ipma.warnings();
FireRiskResponse risk = ipma.fireRisk(0);
Envelope<WeatherType> types = ipma.weatherTypes();- One dependency — Jackson; HTTP via the built-in
java.net.http.HttpClient. Java 17+. - Auto-retries on 5xx with exponential backoff.
- Errors throw
IpmaException(getStatus()).
MIT © Marcelo Domingues · Data © IPMA (attribution required)