# Astronomy Engine vs a hosted astrology API

> Astronomy Engine is an astronomy library, not an astrology one. It computes positions of the Sun, Moon and planets and finds events such as rise and set times, Moon phases and eclipses, with the same API in five languages and no data files. Comparing it with AstroNode is really comparing positions only against a finished chart: the zodiac, ayanamsa, houses and every Vedic rule are code you write on top.

Source: https://astronode.dev/compare/self-hosting/astronomy-engine · Facts checked: 2026-12-05

## When self-hosting Astronomy Engine is the better choice

- The calculation runs in a browser or on a phone. It is plain JavaScript (built from TypeScript) with no dependencies, the minified file is under 120 KB, and there are no data files to fetch. A sky widget, a Moon-phase screen or an offline chart preview can compute on the device.
- Your feature is an astronomy event, not a chart. Rise and set times, twilight, Moon phases, lunar and solar eclipses, Mercury and Venus transits, equinoxes and solstices, conjunctions and oppositions each have a search function. AstroNode exposes a small part of that.
- You need identical answers in several languages. The README says the C, C#, JavaScript and Python versions are verified to give identical results, with Kotlin added in 2022 - useful when a web app and a native app must agree.
- An arcminute is close enough. For sign placement, Moon phase or rise times, the stated ±1′ is well inside what users can notice, and you avoid every native build and data file.

## Side by side

|  | Astronomy Engine | AstroNode API |
| --- | --- | --- |
| Language / runtime | JavaScript/TypeScript, Python, C, C# and Kotlin, same algorithms ([source](https://github.com/cosinekitty/astronomy)) | Any language: HTTPS + JSON, OpenAPI 3.1 spec ([details](https://astronode.dev/guides/openapi-typed-client)) |
| Install and native build | npm, PyPI, NuGet or JitPack package; no dependencies, nothing to compile ([source](https://github.com/cosinekitty/astronomy)) | Nothing to compile; an API key and an HTTP client ([details](https://astronode.dev/quickstart/curl)) |
| Planet positions | Yes - Sun, Moon, planets and Pluto, geocentric or topocentric ([source](https://github.com/cosinekitty/astronomy)) | Sidereal and tropical, from Swiss Ephemeris data files ([details](https://astronode.dev/capabilities/vedic)) |
| House systems | Not documented | Whole-sign (Vedic), Placidus (KP), five Western systems ([details](https://astronode.dev/guides/house-systems)) |
| Sidereal / ayanamsa | Not documented | Fixed per tradition: Lahiri, KP-Newcomb, tropical ([details](https://astronode.dev/guides/ayanamsa)) |
| Dashas | Not documented | Vimshottari, Yogini, Char ([details](https://astronode.dev/guides/vimshottari-dasha-calculation)) |
| Divisional charts (vargas) | Not documented | 16 vargas in one call, plus D150 ([details](https://astronode.dev/guides/divisional-chart-calculation)) |
| KP sub-lords | Not documented | Cuspal sub-lord chain, significators, horary 1-249 ([details](https://astronode.dev/capabilities/kp)) |
| Panchang | Building blocks only: rise/set, twilight, Moon-phase search ([source](https://github.com/cosinekitty/astronomy)) | Tithi, nakshatra, yoga, karana, sunrise, muhurta windows ([details](https://astronode.dev/guides/panchang-sunrise-conventions)) |
| Yogas | Not documented | 55 classical yogas with reasons ([details](https://astronode.dev/capabilities/vedic)) |
| Kundli matching | Not documented | Ashtakoot, Dashakoot, Porutham, batch scoring ([details](https://astronode.dev/capabilities/compatibility)) |
| Ephemeris data you ship | None - truncated VSOP87 series compiled into the code ([source](https://github.com/cosinekitty/astronomy)) | None on your side |
| Time zones and historical offsets | UTC only; time-zone conversion is yours ([source](https://github.com/cosinekitty/astronomy/blob/master/source/js/README.md)) | You send the offset in force at birth; no zone-name lookup ([details](https://astronode.dev/guides/birth-time-and-time-zones)) |
| Maintenance signal | Latest npm release 2.1.19, published 14 December 2023 ([source](https://registry.npmjs.org/astronomy-engine)) | Hosted; changes published in the changelog ([details](https://astronode.dev/changelog)) |
| Stated accuracy | Within ±1′ of NOVAS (their stated design goal) ([source](https://github.com/cosinekitty/astronomy)) | Measured in CI vs NASA JPL Horizons: Moon 3.1″, planets ≤ 0.5″ (1900-2050) ([details](https://astronode.dev/)) |

| More from their docs |  |
| --- | --- |
| Ecliptic longitude | EclipticLongitude() is heliocentric; astrology needs geocentric ([source](https://github.com/cosinekitty/astronomy/blob/master/source/js/README.md)) |
| Lunar nodes | Finds the moment the Moon crosses the ecliptic; no node longitude documented ([source](https://github.com/cosinekitty/astronomy/blob/master/source/js/README.md)) |
| UT1 vs UTC | Treated as the same ([source](https://github.com/cosinekitty/astronomy/blob/master/source/js/README.md)) |
| Code size | Minified JavaScript under 120 KB ([source](https://github.com/cosinekitty/astronomy)) |

## What you still build yourself

- The zodiac itself. EclipticLongitude() is heliocentric; for an astrological longitude you convert a geocentric vector (GeoVector, then Ecliptic) yourself for each body.
- Sidereal positions. No ayanamsa is documented, so you pick a formula (Lahiri, Krishnamurti or another), implement it, and subtract it from every longitude.
- Rahu and Ketu. The library finds the moments the Moon crosses its nodes, not the node's longitude at a given time, so a mean- or true-node model is yours.
- The ascendant and house cusps - no house functions are documented - from sidereal time, obliquity and latitude.
- Everything Vedic after that: nakshatra and pada, Vimshottari balance and periods, vargas, KP sub-lords, tithi and the other panchang limbs, yogas and matching.
- Local time to UTC with the offset in force at the birth date and place.

## Running it in production

- Precision budget. ±1′ suits most display work, but a Moon longitude off by an arcminute moves dasha start dates and can flip a nakshatra pada or a sub-lord near a boundary. Decide before you build on it whether that tolerance is acceptable for your users.
- Release cadence. The newest npm version is 2.1.19 from December 2023. The README states a long-term commitment to the project; in practice, plan on pinning 2.1.19 rather than expecting regular releases.
- Time input. AstroTime carries no time-zone information and the library approximates UT1 as UTC. Your code supplies a correct UTC instant for every birth.
- Nothing to deploy beyond the package itself: no native build, no data directory, no network calls. That is the main operational reason to choose it.
- 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](https://astronode.dev/tools/utc-offset-finder) and the [time-zone guide](https://astronode.dev/guides/birth-time-and-time-zones) cover the traps.

## Accuracy

Astronomy Engine's README states a design goal of accuracy within ±1 arcminute, with unit tests against NOVAS C 3.1 on DE405, JPL Horizons and other sources, and identical results across languages. That figure is theirs, quoted below. AstroNode's CI compares the Sun, Moon and five planets with NASA JPL Horizons and measured the Moon within 3.1″ and every planet within 0.5″ from 1900 to 2050. The gap matters mostly near sign, nakshatra and sub-lord boundaries.

## Where an API saves work

- The whole astrology layer on top of the positions: sidereal longitudes, nodes, ascendant and houses, and then dashas, vargas, KP, panchang, yogas and matching.
- Geocentric, sidereal, per-tradition conventions are fixed and documented on our side, so you do not have to get the frame conversion right yourself.
- Positions measured against JPL Horizons in CI rather than an arcminute design budget.
- Be clear about the trade: for sky events, rise times or Moon phases computed on the device, Astronomy Engine is the better fit. An API helps once you need charts.

## Questions

**What do I need to install to use Astronomy Engine?**

Astronomy Engine: npm, PyPI, NuGet or JitPack package; no dependencies, nothing to compile. AstroNode API: Nothing to compile; an API key and an HTTP client. Checked 2026-12-05.

**Does Astronomy Engine calculate dashas?**

Astronomy Engine: Not documented. AstroNode API: Vimshottari, Yogini, Char. Checked 2026-12-05.

**Does Astronomy Engine support KP sub-lords?**

Astronomy Engine: Not documented. AstroNode API: Cuspal sub-lord chain, significators, horary 1-249. Checked 2026-12-05.

**Does Astronomy Engine do kundli matching?**

Astronomy Engine: Not documented. AstroNode API: Ashtakoot, Dashakoot, Porutham, batch scoring. Checked 2026-12-05.

**Does Astronomy Engine handle time zones and historical offsets?**

Astronomy Engine: UTC only; time-zone conversion is yours. AstroNode API: You send the offset in force at birth; no zone-name lookup. Checked 2026-12-05.
