API Comparison

Open-Source Astrology Ephemeris Alternatives to Swiss Ephemeris (2026 Guide)

A developer's landscape of permissively-licensed, open-source ephemeris libraries you can use instead of Swiss Ephemeris in 2026 — with honest accuracy numbers, license trade-offs, and install commands.

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
BodyMean error vs JPL DE440 (1900–2050)Class
Sun0.08″Sub-arcsecond
Mercury0.08″Sub-arcsecond
Venus0.09″Sub-arcsecond
Mars0.08″Sub-arcsecond
Jupiter0.16″Sub-arcsecond
Saturn0.17″Sub-arcsecond
Uranus0.40″Sub-arcsecond
Neptune0.62″Sub-arcsecond
Pluto0.35″Sub-arcsecond
Moon~2.2″ mean / 2.8″ RMSArcsecond-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:

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.

EngineLicenseOwn engine?Networked-SaaS source-disclosure?
Swiss EphemerisAGPL-3.0 or paid commercialYes (the reference)Yes under AGPL; no under commercial
Kerykeion / flatlib / immanuelInherits Swiss (AGPL)No — wraps SwissYes (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:

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?

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.

Build on the Vedika astrology API

700+ operations, Vedic + Western + KP, 30 languages, an open-source XALEN ephemeris, and a built-in LLM. Free sandbox — no signup.

Try the free sandbox