OpenMeteo.dotnet.client.sdk
5.2.0
dotnet add package OpenMeteo.dotnet.client.sdk --version 5.2.0
NuGet\Install-Package OpenMeteo.dotnet.client.sdk -Version 5.2.0
<PackageReference Include="OpenMeteo.dotnet.client.sdk" Version="5.2.0" />
<PackageVersion Include="OpenMeteo.dotnet.client.sdk" Version="5.2.0" />
<PackageReference Include="OpenMeteo.dotnet.client.sdk" />
paket add OpenMeteo.dotnet.client.sdk --version 5.2.0
#r "nuget: OpenMeteo.dotnet.client.sdk, 5.2.0"
#:package OpenMeteo.dotnet.client.sdk@5.2.0
#addin nuget:?package=OpenMeteo.dotnet.client.sdk&version=5.2.0
#tool nuget:?package=OpenMeteo.dotnet.client.sdk&version=5.2.0
🌡️🌤️ Open-Meteo Dotnet Client SDK Library
A dotnet 8 library for the Open-Meteo API. Forked from https://github.com/AlienDwarf/open-meteo-dotnet
❕ Information
Support for:
- Most of the OpenMeteo weather models (as of October 2025)
- Using OpenMeteo with an API key
- Using custom URLs for self-hosted OpenMeteo instances
- dotnet 8 (and above)
- OpenMeteo Flatbuffers support - makes for much faster parsing of large datasets
- Specific client library Exceptions optionally thrown for detailed error handling
Pretty much all the library's classes are public, so you can extend the library as needed in your own code.
🔨 Installation/Build
NuGet
Use NuGet Package Manager GUI. Or use NuGet CLI:
dotnet add package OpenMeteo.dotnet.client.sdk
💻 Usage
Minimal:
using OpenMeteo;
static void Main()
{
RunAsync().GetAwaiter().GetResult();
}
static async Task RunAsync()
{
// Before using the library you have to create a new client.
// Once created you can reuse it for every other api call you are going to make.
// There is no need to create multiple clients.
var client = new OpenMeteo.OpenMeteoClient();
// Make a new api call to get the current weather in tokyo
var weatherData = await client.QueryWeatherApiAsync("Tokyo");
// Output the current weather to console
Console.WriteLine("Weather in Tokyo: " + weatherData.Current.Temperature + weatherData.CurrentUnits.Temperature);
// Output: "Weather in Tokyo: 28.1°C
}
To use an OpenMeteo API key, you can use the constructor with the API key as a parameter:
var client = OpenMeteoClient("YourSecretApiKeyHere");
The best place to look for more usage examples is the tests.
License
This project is open-source under the MIT license.
Appendix
This library uses the public and free available Open-Meteo API servers. See also:
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- openmeteo_sdk (>= 1.22.0)
- System.Text.Json (>= 9.0.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.