kriya-astrology
v1.0.0
Published
Kriya — TypeScript client for the Insights by Omkar astrology API. 109+ endpoints, zero runtime dependencies.
Downloads
23
Maintainers
Readme
Kriya — TypeScript SDK
Official TypeScript / JavaScript client for Kriya — the Insights by Omkar astrology API. 109+ v1 endpoints across Western, Vedic, Hellenistic, Jaimini, KP, and electional traditions. Computed from first principles on a home-grown VSOP87D + ELP2000 + DOPRI8 engine.
Zero runtime dependencies. Uses the platform fetch API. Works in Node 18+, Bun, Deno, and edge runtimes.
Install
npm install kriya-astrologyQuick start
import { KriyaAstrologyClient } from "kriya-astrology";
const client = new KriyaAstrologyClient({ apiKey: process.env.KRIYA_API_KEY! });
const chart = await client.chartNatal({
datetime: "1990-06-15T12:00:00Z",
latitude: 19.076,
longitude: 72.8777,
});
console.log(chart);Errors
Errors are thrown as KriyaAstrologyError with status, body, and requestId for correlation with server logs.
import { KriyaAstrologyError } from "kriya-astrology";
try {
await client.chartNatal({ /* ... */ });
} catch (err) {
if (err instanceof KriyaAstrologyError) {
console.error(`API ${err.status} (request ${err.requestId}):`, err.body);
}
throw err;
}Edge / Bun / Deno
Pass a custom fetch implementation if needed:
const client = new KriyaAstrologyClient({
apiKey: process.env.KRIYA_API_KEY!,
fetch: customFetch,
});Generated from OpenAPI
This SDK is regenerated from the Kriya OpenAPI 3.1 spec on every API release. Endpoint coverage tracks the server automatically.
Related
- Kriya API docs — interactive Scalar explorer
- Pricing — Developer (free) / Studio ($49/mo) / Scale (custom)
- Python SDK —
pip install kriya-astrology - Go SDK —
go get github.com/omkarjaliparthi/kriya-go
License
MIT — see LICENSE.
