Astro96.Api 0.3.2

dotnet add package Astro96.Api --version 0.3.2
                    
NuGet\Install-Package Astro96.Api -Version 0.3.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Astro96.Api" Version="0.3.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Astro96.Api" Version="0.3.2" />
                    
Directory.Packages.props
<PackageReference Include="Astro96.Api" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Astro96.Api --version 0.3.2
                    
#r "nuget: Astro96.Api, 0.3.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Astro96.Api@0.3.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Astro96.Api&version=0.3.2
                    
Install as a Cake Addin
#tool nuget:?package=Astro96.Api&version=0.3.2
                    
Install as a Cake Tool

96Astro API client for .NET

Compiled and run in our tests on the oldest version named below: tools/sdk/thin_conformance/run.py checks its requests, retries and errors, and makes one real call to the API.

Full guide (install, first call, errors, retries, PDF and audio jobs, webhook verification): https://96astroapi.com/docs/sdk-dotnet

Install

Add Astro96.cs to your project, or build the package from Astro96.csproj. It needs .NET 8 and has no dependencies.

Use

var astro = new Astro96Client(Environment.GetEnvironmentVariable("ASTRO_API_KEY")!);
var json = await astro.PlanetPositionsAsync("{\"datetime\":\"1990-10-18T14:30:00\",\"timezone\":\"Asia/Kolkata\",\"latitude\":28.6139,\"longitude\":77.209}");

There is one method for each capability in the API reference. Each takes the request as a JSON string and returns the response as a JSON string, so you can parse it with whatever your app already uses.

Name your app (optional)

Optional: tell the API which app is calling, so you can see where your keys are used (the dashboard's Where your keys are used) and spot a leaked key.

var astro = new Astro96Client(key, appName: "Acme Shop", appVersion: "2.1.0", appUrl: "https://shop.acme.com");

The name is required (printable ASCII, at most 60 characters, no / or parentheses); the version (at most 40) and the url (http(s), at most 120) are optional. It is sent as the X-Astro-App header, never with your key; the API keeps the name, the version and only the host of the url. The User-Agent also carries the platform (plt/node, plt/linux...). An invalid value is refused when the client is created.

Keep your secret key on your server, and never ship it in an app. The API's error code is on the error this client raises. Calls that fail with a retryable error are retried with the same idempotency key, so they are never charged twice.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

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
0.3.2 43 11/21/2026
0.3.1 46 11/21/2026
0.3.0 45 11/21/2026
0.2.0 50 11/18/2026
0.1.0 50 11/18/2026