Solcast 3.0.1
dotnet add package Solcast --version 3.0.1
NuGet\Install-Package Solcast -Version 3.0.1
<PackageReference Include="Solcast" Version="3.0.1" />
<PackageVersion Include="Solcast" Version="3.0.1" />
<PackageReference Include="Solcast" />
paket add Solcast --version 3.0.1
#r "nuget: Solcast, 3.0.1"
#:package Solcast@3.0.1
#addin nuget:?package=Solcast&version=3.0.1
#tool nuget:?package=Solcast&version=3.0.1
Solcast API C# SDK 
The Solcast API provides forecast, live and historical solar irradiance, PV power and weather data.
Features
- Retrieve live and forecast solar radiation and weather data
- Get live and forecast grid aggregation data
- Support for all Solcast Commercial products
- Manage PV Power Sites for advanced solar power modeling
- Simple, easy-to-use client classes for API interaction
Installation
dotnet add package Solcast
Configuration
Get an API key from the Solcast API Toolkit, then set it:
export SOLCAST_API_KEY=your-api-key
Getting started
This example calls the Sydney Opera House, one of Solcast's unmetered locations, so you can run all examples without using your request quota.
using Solcast;
var client = SolcastClientFactory.Create();
var response = await client.Data.Live.RadiationAndWeather.GetAsync(request =>
{
request.QueryParameters.OutputParameters = ["air_temp", "dni", "ghi"];
request.QueryParameters.Latitude = -33.856784;
request.QueryParameters.Longitude = 151.215297;
});
foreach (var record in response!.EstimatedActuals!)
{
Console.WriteLine($"{record.PeriodEnd}: {record.Ghi}");
}
Every field is typed and documents its own meaning and units, so record.Ghi explains
itself in IntelliSense. Fields you did not request are null.
Errors
Every failure throws a ResponseStatus carrying the error code and the fields at fault.
using Solcast.Models;
try
{
var response = await client.Data.Live.RadiationAndWeather.GetAsync(request =>
{
request.QueryParameters.OutputParameters = ["air_temp", "dni", "ghi"];
request.QueryParameters.Latitude = -33.856784;
request.QueryParameters.Longitude = 151.215297;
});
}
catch (ResponseStatus error)
{
Console.Error.WriteLine($"{error.ResponseStatusCode} {error.ErrorCode}: {error.Message}");
foreach (var field in error.Errors ?? [])
{
Console.Error.WriteLine($" {field.FieldName}: {field.Message}");
}
}
CSV
CsvWriter turns records into CSV. It is a plain utility over the data and knows nothing about the
client, so it works with any response.
using Solcast.Utilities;
File.WriteAllText("live.csv", CsvWriter.ToCsv(response!.EstimatedActuals!));
Endpoint reference
Full documentation for every endpoint: https://solcast.github.io/solcast-api-csharp-sdk/
- Forecast
- Geographic
- Grid Aggregations
- Historic
- Live
- Resources
- Schedule
- TMY
The client is generated with Kiota
License
Apache 2.0. See the LICENSE file.
| 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
- Microsoft.Kiota.Bundle (>= 2.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.1 | 74 | 9/8/2026 |
| 3.0.0 | 92 | 9/7/2026 |
| 2.0.0 | 861 | 7/22/2025 |
| 1.0.2 | 295 | 11/22/2024 |
| 1.0.1 | 157 | 11/14/2024 |
| 1.0.0 | 185 | 11/14/2024 |
| 1.0.0-beta3 | 137 | 11/14/2024 |
| 1.0.0-beta2 | 149 | 11/14/2024 |
| 1.0.0-alpha1 | 149 | 11/13/2024 |
| 0.1.3 | 171 | 10/24/2024 |
| 0.1.2 | 170 | 10/24/2024 |
| 0.1.2-alpha1 | 143 | 10/24/2024 |