SDKs & client libraries
Official SDKs for Node.js, React Native, Flutter, Python, PHP, Java, .NET and Go.
Integrate LifeAstroAPI with our open-source SDKs for Node.js / TypeScript, React Native, Flutter / Dart, Python, PHP, Java / Spring Boot, C# / .NET and Go. Each SDK has a lang option for answers in 10 languages, typed errors and configurable retries. Every endpoint is plain REST + JSON, documented in an OpenAPI 3.1 spec.
Open source · on npm
Node.js & TypeScript SDK.
The official lifeastroapi package is on npm and open source on GitHub — a fully-typed client for the LifeAstroAPI endpoints (festivals, panchang calendar sheets, charts, dashas, Western, reports), with optional branded PDF reports. On a server, PDF rendering needs Puppeteer (a headless Chrome), installed separately — the PDF reports guide covers setup, disk and memory, fonts, Docker and serverless. In a React Native app the same package prints the report on the phone (see below).
JavaScript / TypeScript
- Fully-typed — every REST endpoint, with autocomplete
- Zero runtime dependencies — Node 18+, serverless, edge and React Native
- Ships ESM + CommonJS with bundled .d.ts types
- Typed errors, automatic retries & timeouts built in
- Answers in 10 languages with one lang option
- Branded, white-label PDF reports (optional)
import { LifeAstro } from "lifeastroapi";
const client = new LifeAstro({ apiKey: "dv_live_…" });
// A Vedic birth chart
const planets = await client.chart.planets({
date: "1990-01-15", time: "10:30",
tz: "Asia/Kolkata", lat: 19.07, lon: 72.87,
});Open source · mobile, Python and PHP
React Native, Flutter, Python & PHP SDKs.
The same endpoints and method names as the Node SDK, generated from one endpoint list. On React Native and Flutter the branded report PDF is made on the device from the report JSON; with PHP it is made on your server (see the PHP PDF guide). In a mobile app, keep your API key on your own backend and send the JSON to the app.
React Native / Expo
The same lifeastroapi npm package runs in React Native. Report PDFs are made on the phone: lifeastroapi/pdf-html builds the branded HTML and expo-print prints it. Keep the API key on your backend.
npm install [email protected] expo-printimport * as Print from "expo-print";
import {
renderKundliLiteHtml, A4_PRINT_OPTIONS,
} from "lifeastroapi/pdf-html";
// report: the kundliLite JSON from your backend
const html = renderKundliLiteHtml(report, {
companyName: "Acme Astro",
});
const { uri } = await Print.printToFileAsync({
html, ...A4_PRINT_OPTIONS,
});View on GitHub Flutter / Dart
Pure Dart, one dependency (http): Android, iOS, web, desktop and Dart servers. The same report HTML as the Node SDK, printed to PDF on the device with the printing package, or through Chrome or a Gotenberg service.
flutter pub add lifeastroapi:1.3.0import 'package:lifeastroapi/lifeastroapi.dart'; final client = LifeAstro(apiKey: 'dv_live_…'); // Today's panchang for Mumbai, in Gujarati final day = await client.panchang.basic( lat: 19.076, lon: 72.8777, tz: 'Asia/Kolkata', lang: Lang.gu, );View on GitHub
Python
Sync and async clients (LifeAstro, AsyncLifeAstro) on httpx, with full type hints. Python 3.9 and later. Every report endpoint returns structured JSON.
pip install lifeastroapi==1.3.0from lifeastroapi import LifeAstro
client = LifeAstro(api_key="dv_live_…")
# Today's panchang for Mumbai, in Gujarati
day = client.panchang.basic(
lat=19.076, lon=72.8777, tz="Asia/Kolkata",
lang="gu",
)View on GitHub PHP
Composer package for PHP 8.1 and later, with named arguments, a Lang enum and typed exceptions. Runs on ext-curl with no other runtime packages, or on your own PSR-18 client (Guzzle, Symfony). Works in Laravel. Branded report PDFs are made on your server with a headless Chrome or a Gotenberg service.
composer require lifeastroapi/lifeastroapi:1.3.0use LifeAstroApi\LifeAstro;
use LifeAstroApi\Lang;
$client = new LifeAstro(apiKey: 'dv_live_…');
// Today's panchang for Mumbai, in Gujarati
$day = $client->panchang->basic(
lat: 19.076, lon: 72.8777, tz: 'Asia/Kolkata',
lang: Lang::Gu,
);View on GitHub Building a kundli screen? Follow the React Native guide.
Open source · on Maven Central
Java & Spring Boot SDK.
com.lifeastroapi:lifeastroapi-java for any Java 17+ server, and lifeastroapi-spring-boot-starter for a ready LifeAstro bean in Spring Boot 3. Keep your customers' birth details in your own JPA entities, cache shared answers such as today's panchang, and store report JSON for later: the Java & Spring Boot guide shows each step. Report endpoints return JSON; PDF rendering in Java is planned.
Java / Spring Boot
- Java 17+ and Spring Boot 3; every endpoint, the same method names as the other SDKs
- Only Jackson as a dependency; HTTP through the JDK’s own HttpClient
- A builder per method, checked before the call, with java.time overloads
- Spring Boot starter: one shared LifeAstro bean from application.yml
- Blocking or CompletableFuture (client.async()), typed exceptions, retries
- Answers in 10 languages with one lang option
<dependency> <groupId>com.lifeastroapi</groupId> <artifactId>lifeastroapi-java</artifactId> <version>1.3.0</version> </dependency>
implementation("com.lifeastroapi:lifeastroapi-java:1.3.0")LifeAstro client = LifeAstro.create(); // LIFEASTRO_API_KEY
// Today's panchang for Mumbai, in Gujarati
JsonNode day = client.panchang().basic(
PanchangBasicParams.builder()
.lat(19.076).lon(72.8777).tz("Asia/Kolkata")
.lang(Lang.GU)
.build());# application.yml
lifeastroapi:
api-key: ${LIFEASTRO_API_KEY}
// any @Service or @RestController
public PanchangService(LifeAstro astro) { … }Open source · on NuGet
C# / .NET SDK.
LifeAstroApi for .NET 8, 9 and 10 and .NET Framework 4.6.2+, and LifeAstroApi.Extensions.DependencyInjection for one shared LifeAstroClient in ASP.NET Core, configured from appsettings.json. Keep your customers' birth details in your own Entity Framework Core entities, cache shared answers such as today's panchang, and store report JSON for later: the C# / .NET guide shows each step. Report endpoints return the whole report as JSON, in any of the 10 languages.
C# / .NET
- .NET 8, 9 and 10, ASP.NET Core and .NET Framework 4.6.2+; the API endpoints as async methods
- One dependency: System.Text.Json, which .NET 8 already has
- A parameter class per method: required values in the constructor, optional ones as properties
- ASP.NET Core: AddLifeAstro(...) from appsettings.json, requests through IHttpClientFactory
- CancellationToken on every method, typed exceptions, retries that honour Retry-After
- Answers in 10 languages with one Lang option
dotnet add package LifeAstroApi --version 1.3.0
<PackageReference Include="LifeAstroApi" Version="1.3.0" />
using var client = new LifeAstroClient(); // LIFEASTRO_API_KEY
// Today's panchang for Mumbai, in Gujarati
JsonElement day = await client.Panchang.BasicAsync(
new PanchangBasicParams(19.076, 72.8777, "Asia/Kolkata")
{
Lang = Lang.Gu,
});// Program.cs
builder.Services.AddLifeAstro(
builder.Configuration.GetSection("LifeAstroApi"));
// any controller or minimal API handler
public KundliController(LifeAstroClient astro) => _astro = astro;On .NET Framework 4.6.2 and later (ASP.NET MVC 5, Web API 2, WebForms, Windows services) the package's netstandard2.0 build is used; on 4.6.2, turn on TLS 1.2 once at startup. See .NET Framework in the guide.
Go SDK v1.3.0
Go 1.22 and later. Call astrology and Panchang endpoints with typed parameters. Render branded report HTML in Go and generate PDFs with Chrome, Chromium or Gotenberg.
go get github.com/ayanshulife/[email protected]No install needed
Prefer no SDK at all?
Both of these are live right now and work with your existing dv_live_… key.
Start building in minutes.
Grab a free dv_live_… key and call the API over plain REST from any language — or generate a client from the OpenAPI spec. SDK releases are announced to every account by email.