Open-Meteo Android Library

An Android library for the Open-Meteo APIs written in Kotlin.


The library includes some examples in the implementation tests; Here’s a quick example for the Forecast API:

// import com.github.dadibit.openmeteo.ForecastApi

val forecastApi = ForecastApi()
val forecast = forecastApi.fetch(
	hourly = listOf(
forecast ?: return
val hourly = forecast
val times = hourly
val weatherCodes = hourly
val temperatures = hourly
val temperatures_unit = forecast
// JSON arrays are not iterable
for (i in 0..167) {
	val time = times.getString(i)
	val weatherCode = ForecastApi
	val temperature = temperatures.getDouble(i)
	println("$time: $weatherCode / $temperature $temperatures_unit")

APIs Implementation

Name Version Last Updated
Weather Forecast API v1 05-08-2022
Historical Weather API v1 05-08-2022
Marine Weather API v1 05-08-2022
Geocoding API v1 05-08-2022
Elevation API v1 05-08-2022
ECMWF Weather Forecast API v1 05-08-2022


  • Code documentation
  • Wiki documentation
  • Attributions
  • More complete tests
  • Return a dedicated class instead of JSON
  • Create an Android example app
    • CoroutineWorker
    • Widget
  • Publish on
  • Github actions
    • Test if new APIs need to be implementated


View Github