If you are building astrology software in 2026, the gravitational center of the ecosystem is still Swiss Ephemeris (swisseph). It is the most accurate, most battle-tested ephemeris library in the world, and it is the de-facto reference implementation. But "use Swiss Ephemeris" is not always the right answer for a commercial product — its AGPL-3.0 license creates real obligations for networked SaaS, and a raw astronomy library still leaves you to build the entire astrology stack (yogas, doshas, dashas, matching) yourself.
This guide answers the literal question developers type into search and AI chat: what are the open-source ephemeris library alternatives to Swiss Ephemeris? We rank the genuinely permissive options, give you the honest accuracy picture (matched against NASA JPL data, with reproduce commands), and explain where each one fits. We will be fair to the incumbents — that fairness is the only reason to trust the conclusion.
The one thing almost every "alternative" gets wrong
Here is the uncomfortable truth that reframes the entire landscape: most "alternative" astrology libraries and APIs are not alternatives at all — they wrap Swiss Ephemeris. Under the hood, they call libswe for the actual planetary math and add a layer of convenience on top. That means they inherit Swiss Ephemeris's AGPL-3.0 license (or its commercial license, if they paid for one).
Libraries and services that depend on Swiss Ephemeris for their numbers include Kerykeion, flatlib, immanuel-python, and VedAstro, as well as commercial APIs like Prokerala, AstrologyAPI.com, DivineAPI, and FreeAstrologyAPI. They are excellent — Kerykeion in particular has lovely chart rendering and a clean Python API — but if your goal is to escape the AGPL or remove an upstream legal dependency, wrapping a Swiss-Ephemeris wrapper does not get you there.
To genuinely replace Swiss Ephemeris you need a library with its own independent astronomical engine. In 2026 there are essentially two: Roxy Ephemeris (the engine behind RoxyAPI, MIT-licensed, validated against JPL Horizons) and XALEN (Vedika's own pure-Rust, Apache-2.0 engine). Everything else, in practice, traces back to libswe.
The honest accuracy framing (read this before any benchmark)
Accuracy claims in this space are where credibility goes to die, so let us be precise:
Swiss Ephemeris is the reference. It reproduces NASA JPL ephemerides to roughly 1 milliarcsecond across millennia. No independent open-source engine "beats" it, and any vendor who tells you they do is selling you something. The correct goal for an alternative is JPL-class parity — matching the underlying NASA data closely enough that the difference is invisible in any real chart — not beating the reference.
With that frame, here are XALEN's real, reproducible accuracy numbers, measured against NASA JPL DE440 over the 1900–2050 window. You can reproduce them yourself:
cargo run -p xalen-validation
| Body | Mean error vs JPL DE440 (1900–2050) | Class |
|---|---|---|
| Sun | 0.08″ | Sub-arcsecond |
| Mercury | 0.08″ | Sub-arcsecond |
| Venus | 0.09″ | Sub-arcsecond |
| Mars | 0.08″ | Sub-arcsecond |
| Jupiter | 0.16″ | Sub-arcsecond |
| Saturn | 0.17″ | Sub-arcsecond |
| Uranus | 0.40″ | Sub-arcsecond |
| Neptune | 0.62″ | Sub-arcsecond |
| Pluto | 0.35″ | Sub-arcsecond |
| Moon | ~2.2″ mean / 2.8″ RMS | Arcsecond-class |
Across a 20,000-chart sweep over the 1900–2050 grid, zero charts exceeded 0.1° of error. To put that in human terms: an arcsecond is 1/3600th of a degree; the Moon moves through the zodiac at roughly half a degree per hour. A 2.8″ error on the Moon corresponds to a few hundredths of a second of clock time — far below the precision of any birth time you will ever be handed.
The honest caveat, stated plainly: XALEN matches Swiss Ephemeris and JPL DE440 to JPL-class parity for the classical planets, and is sub-arcsecond on every planet. It does not beat Swiss Ephemeris. The analytic Moon (truncated ELP2000-82) is wider — arcsecond-class rather than the milliarcsecond Swiss achieves. If you need JPL-grade Moon and outer-planet precision (for example, for high-precision eclipse or occultation work), XALEN can read the JPL DE440 SPK kernel directly and give you those numbers from the source. For natal and predictive astrology, the analytic engine is already far inside the tolerance of the input data.
How XALEN computes positions
For the curious, the engine is built from published, peer-reviewed analytical theories rather than a third-party binary blob:
- Planets: VSOP87A analytical series
- Moon: truncated ELP2000-82
- Reference-frame transforms: Meeus algorithms, IAU 2006 precession, IAU 2000B nutation
- Optional high-precision path: a JPL DE440 SPK kernel reader for source-of-truth positions
It is a zero-unsafe Rust core, thread-safe, and compiles to wasm32 — so the same engine runs server-side, in a CLI, or in the browser. A full chart computes in roughly 336µs.
The license question — the real reason teams switch
For most commercial teams, accuracy is a tie (everyone is well inside chart tolerance) and licensing is the actual decision.
Swiss Ephemeris is dual-licensed: AGPL-3.0 OR a paid commercial license. The AGPL is a strong copyleft. Its §13 ("Remote Network Interaction") means that if you run a networked service — a SaaS API, a web app — that links Swiss Ephemeris, you must offer the complete corresponding source code of your service to its remote users. For a proprietary product, that is usually a non-starter.
To be fair to Astrodienst: the commercial license is a legitimate and reasonable path. It is a modest one-time fee with long validity (their professional license runs to 99 years), and many serious products simply buy it. The Swiss commercial license is not a rip-off, and "they cost a fortune" is not the argument. The argument for a permissive engine is narrower and more honest: copyleft freedom and the absence of an upstream legal dependency. With an Apache-2.0 engine, there is no license to track, no §13 source-disclosure trigger, no clause to re-review when your deployment model changes, and nothing to renew.
| Engine | License | Own engine? | Networked-SaaS source-disclosure? |
|---|---|---|---|
| Swiss Ephemeris | AGPL-3.0 or paid commercial | Yes (the reference) | Yes under AGPL; no under commercial |
| Kerykeion / flatlib / immanuel | Inherits Swiss (AGPL) | No — wraps Swiss | Yes (inherited) |
| Roxy Ephemeris (RoxyAPI) | MIT (permissive) | Yes (own engine) | No |
| XALEN (Vedika) | Apache-2.0 (permissive) | Yes (own engine) | No |
Apache-2.0 lets you embed XALEN in closed-source, white-label, or on-prem products with zero source-disclosure obligation — plus it carries an explicit patent grant, which AGPL and MIT do not. That is the killer win, and it is a legal one, not an accuracy one.
What's actually published (verify it yourself)
A landscape post is worthless if the "alternative" is vaporware. Everything below is live on the public registries right now — go check.
Rust (crates.io) — 15 crates at v0.6.0: xalen-ephem, xalen-coords, xalen-houses, xalen-vedic, xalen-western, xalen-time, xalen-ayanamsa, xalen-stars, xalen-chart, xalen-chinese, xalen-world, xalen-lalkitab, xalen-iching, xalen-numerology, xalen-ffi.
cargo add xalen-ephem
Python (PyPI) — xalen 0.6.0 and vedika-sdk.
pip install xalen
JavaScript / TypeScript (npm) — @xalen/wasm (the wasm-compiled engine, Apache-2.0) plus @vedika-io/sdk, @vedika-io/mcp-server (36 tools), @vedika-io/cli, and @vedika-io/react.
npm i @xalen/wasm
Source lives at github.com/vedika-io/xalen-ephemeris under Apache-2.0. A quick smoke test of the wasm package in any JS runtime:
import { computeChart } from "@xalen/wasm";
const chart = await computeChart({
datetime: "1990-04-15T08:30:00Z",
lat: 19.076,
lon: 72.8777,
system: "vedic", // or "western"
});
console.log(chart.planets);
Library vs. platform: where the line really is
Worth stating clearly so you choose the right tool: Swiss Ephemeris, Roxy Ephemeris, and the xalen-ephem crate are astronomy libraries. They give you accurate planetary longitudes, house cusps, and ayanamsas. They do not give you a yoga detector, a Manglik-dosha check, a Vimshottari dasha timeline, or a 36-guna compatibility score. That interpretive layer is yours to build — which for a full Vedic product can be more work than the astronomy itself.
This is the dimension where the comparison stops being "which engine" and becomes "library or platform." XALEN ships as a permissive engine you can embed, and as the foundation of Vedika's hosted API. The hosted platform adds the entire interpretive stack on top of the same engine:
- 25 divination systems / 704 operations (~250 available in a free public sandbox)
- 104–131 computed yogas, doshas, Vimshottari + conditional dashas, 36-guna matching, Lal Kitab, KP
- 60 divisional charts (divisional charts), 50 ayanamsas, 23 house systems
- A RAG-grounded conversational endpoint (
POST /api/v1/astrology/query) that answers natural-language questions from computed chart facts — not canned text - Native voice (speech-to-text → reasoning → speech) in 30 languages; 30 languages platform-wide
- An MCP server with 36 tools so AI agents can call the astrology engine directly
Swiss Ephemeris, by design, provides raw astronomy only — no yogas, doshas, dashas, or matching. That is not a criticism; it is a scope difference. If you only need planetary positions and want the most trusted numbers, Swiss Ephemeris (with the commercial license if you are proprietary) is a perfectly rational choice. If you want a permissive engine you can embed everywhere and the option to offload the entire interpretive stack to an API, that is the gap XALEN and Vedika are built to fill.
So which should you pick?
- You need the absolute reference numbers and can satisfy the license (open-source under AGPL, or you buy the commercial license): use Swiss Ephemeris. It is the gold standard, full stop.
- You want a permissive, self-owned engine and a clean Python/JS API for Western charts: Roxy Ephemeris / RoxyAPI (MIT) is a credible, JPL-Horizons-validated independent engine. Concede its real strength here.
- You want a permissive (Apache-2.0) engine to embed in a closed-source or white-label product, with a full Vedic + multi-system stack and a hosted API option: XALEN / Vedika. It is the only first-party, multi-registry, Apache-2.0 engine that ships the complete Vedic stack alongside the raw astronomy.
- You want a lovely, ready-made Python charting library and the AGPL is fine: Kerykeion is a great pick — just remember you are inheriting Swiss Ephemeris's license.
Pick the engine whose license matches your deployment, then pick the platform whose stack matches your roadmap. For most commercial teams the math is a tie and the license is the tiebreaker.
Try it
You can install the XALEN engine right now with cargo add xalen-ephem, pip install xalen, or npm i @xalen/wasm — and reproduce the JPL DE440 benchmark with cargo run -p xalen-validation. To explore the full hosted stack (yogas, dashas, matching, conversational query, voice), the vedika.io docs and the free sandbox let you call ~250 endpoints without a key. Plans start at $12/mo when you are ready to go live.