← Self-hosting vs an API

Swiss Ephemeris (C library) vs a hosted API

Swiss Ephemeris is the engine under most astrology software, AstroNode included. Linking it directly gives you the same positions we start from, at in-process speed. What it does not give you is astrology: no dashas, no vargas, no panchang - those are rules you implement on top.

Every Swiss Ephemeris fact below links the page it was read from on .

Honestly

Where Swiss Ephemeris is the better choice

  • You need raw speed. Their own benchmark puts a complete set of planetary positions at about 0.3 ms; a network round trip to any API is two to three orders of magnitude slower. For ephemeris tables, search loops ("when does Mars next cross 0° Aries?") or millions of charts in a batch job, in-process is the right answer.
  • You work outside the range an API exposes: ancient or far-future dates, numbered asteroids, fixed stars, heliocentric or topocentric frames. The library covers 13201 BC to AD 17191 with the full files.
  • Your product is offline - a desktop app, an embedded device, a phone app that must work on a plane. Nothing about a hosted API helps there.
  • You want to own every convention: which ayanamsa, true or mean node, refraction on or off at sunrise, which house system at polar latitudes. The C API exposes each switch directly.
  • You already have astrologers on the team who can specify the dasha, varga and yoga rules precisely and will review the output. Then the astronomy is the only hard dependency, and this is the best one there is.

Side by side

What you get vs what you build

Swiss Ephemeris self-hosted compared with the AstroNode API, checked 1 December 2026
 Swiss Ephemeris (self-hosted)AstroNode API
Language / runtimeANSI C source; bindings exist for other languages sourceAny language: HTTPS + JSON, OpenAPI 3.1 spec details
Install and native buildCompile a static or shared library and link it sourceNothing to compile; an API key and an HTTP client details
Planet positionsYes - planets, Moon, asteroids, 13201 BC to AD 17191 sourceSidereal and tropical, from Swiss Ephemeris data files details
House systemsYes - one-letter codes for each house method sourceWhole-sign (Vedic), Placidus (KP), five Western systems details
Sidereal / ayanamsaYes - named sidereal modes (Lahiri, Krishnamurti, Raman, ...) and user-defined sourceFixed per tradition: Lahiri, KP-Newcomb, tropical details
DashasNot provided - it is an astronomy toolkit sourceVimshottari, Yogini, Char details
Divisional charts (vargas)Not provided - derive from sidereal longitudes source16 vargas in one call, plus D150 details
KP sub-lordsKrishnamurti ayanamsa only; the sub-lord chain is yours sourceCuspal sub-lord chain, significators, horary 1-249 details
PanchangBuilding blocks: rise/set times; Hindu sunrise needs two flags sourceTithi, nakshatra, yoga, karana, sunrise, muhurta windows details
YogasNot provided source55 classical yogas with reasons details
Kundli matchingNot provided sourceAshtakoot, Dashakoot, Porutham, batch scoring details
Ephemeris data you ship.se1 files: 27 MB planets + 70 MB Moon; runs without them at lower precision sourceNone on your side
Time zones and historical offsetsNot handled - you convert local time to UTC sourceYou send the offset in force at birth; no zone-name lookup details
Maintenance signalActive: moved to JPL DE441 in May 2026; leap-second updates sourceHosted; changes published in the changelog details
Stated accuracyCompressed files reproduce JPL to 0.001″ (their figure) sourceMeasured in CI vs NASA JPL Horizons: Moon 3.1″, planets ≤ 0.5″ (1900-2050) details

“Not documented” means the project's own README and docs do not describe it - not that it is impossible to build on top.

On top

What you would still write with Swiss Ephemeris

  • Local-time-to-UT conversion with historical offsets - the manual is explicit that the library does not do it.
  • Nakshatra, pada and the Vimshottari balance at birth, then mahadasha to pratyantar periods with the 365.25-day year convention you choose.
  • Sixteen divisional-chart formulas (and the odd/even-sign exceptions for D3, D9, D30 and others).
  • Panchang: tithi, yoga and karana from Sun-Moon longitudes, and their end times by root-finding, anchored to Hindu sunrise.
  • KP: the 249-entry sub-lord table built on Krishnamurti ayanamsa and Placidus cusps.
  • Yoga detection and kundli matching - pure rule tables, but long ones, and each tradition disagrees in the edge cases.
  • Bindings for your language if you are not in C, plus the build for every platform you deploy to.

Operations

Running it in production

  • Native build per target. The distribution is C source you compile into a static or shared library; every OS and CPU you ship to needs its own build, and your CI needs a C toolchain.
  • Data files. Full precision needs the .se1 files - 27 MB for the planets and 70 MB for the Moon across the whole range. You decide which files to ship, where they live, and how the path is set in each environment. A missing file does not fail loudly: the library falls back to the Moshier model.
  • Updates. Upstream moved to JPL DE441 in May 2026, and leap seconds arrive whenever the IERS announces one. Picking those up is a dependency bump and a redeploy on your side.
  • Sunrise for Vedic work. The manual calls out that correct Hindu rising and setting times need SE_BIT_NO_REFRACTION and SE_BIT_DISC_CENTER; forget them and every panchang element anchored to sunrise drifts by minutes.
  • Whatever the library, the birth input is a local clock time, and turning it into UT needs the offset that was in force on that date - our UTC offset finder and the time-zone guide cover the traps.

Accuracy

What the numbers say

Their documentation states that the compressed files reproduce JPL's data with 0.001 arc-second precision, and that the built-in Moshier fallback stays better than 0.1″ for the planets (3″ for the Moon) between 3000 BC and 3000 AD. Those are the library's own figures, quoted below. AstroNode uses Swiss Ephemeris with its data files; our CI compares the Sun, Moon and five planets against NASA JPL Horizons at eight dates and measured the Moon within 3.1″ and every planet within 0.5″ from 1900 to 2050. The difference between the two numbers is mostly ΔT and frame conventions, not the ephemeris.

And

Where an API saves work

  • The Vedic layer is the expensive part, not the astronomy. Three dasha systems, sixteen vargas, 55 yogas, KP sub-lords, panchang and matching are endpoints rather than months of rule-writing and astrologer review.
  • No C toolchain, no per-platform builds, no data-file path to get wrong in production.
  • Upstream changes (a new JPL ephemeris, a leap second) are rolled out once on our side.
  • Your app can be written in anything that speaks HTTP - including a mobile or edge runtime where shipping a native library is awkward.

Swiss Ephemeris or an API: quick answers

What do I need to install to use Swiss Ephemeris?
Swiss Ephemeris: Compile a static or shared library and link it. AstroNode API: Nothing to compile; an API key and an HTTP client. Checked 2026-12-01.
Does Swiss Ephemeris calculate dashas?
Swiss Ephemeris: Not provided - it is an astronomy toolkit. AstroNode API: Vimshottari, Yogini, Char. Checked 2026-12-01.
Does Swiss Ephemeris support KP sub-lords?
Swiss Ephemeris: Krishnamurti ayanamsa only; the sub-lord chain is yours. AstroNode API: Cuspal sub-lord chain, significators, horary 1-249. Checked 2026-12-01.
Does Swiss Ephemeris do kundli matching?
Swiss Ephemeris: Not provided. AstroNode API: Ashtakoot, Dashakoot, Porutham, batch scoring. Checked 2026-12-01.
Does Swiss Ephemeris handle time zones and historical offsets?
Swiss Ephemeris: Not handled - you convert local time to UTC. AstroNode API: You send the offset in force at birth; no zone-name lookup. Checked 2026-12-01.

Sources

Quoted from Swiss Ephemeris's own pages

Swiss Ephemeris is named only to identify the project. Values were read from public pages on 1 December 2026; projects change, so check their pages before you decide, and tell us if anything here is out of date.

Other options: pyswisseph · Kerykeion · Flatlib · PyJHora