RepositoryJavaScriptCLChile
ryuphi

ryuphi/astrology-api

Astrology API Rest

184stars
55forks
2issues
1views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: astrology-api

#1 Repository of the week

1
TINIX TRENDING·Topic: swiss-ephemeris

#1 Repository of the week

1
TINIX TRENDING·Topic: swisseph

#1 Repository of the week

astrology-api

Node.js CI Coverage Status GitHub tag (latest SemVer)

Getting started

Prerequisites

  • Nodejs >= 14 (also you can use docker)
  • python (python is used for node-gyp to compile c++ swiss ephemeris library)

Setup

  1. You need to install dependencies of node-gyp depending on your OS. Follow the instructions to install it depending on your OS https://github.com/nodejs/node-gyp#installation

  2. Clone the repo

    git clone git@github.com:ryuphi/astrology-api.git
    
  3. Install dependencies

    without Docker
    npm install
    
    npm start
    

    Also you can use npm run dev, this option run with nodemon to watch changes.

Usage

Example: Get the horoscope for date 1993-08-06, time 16:50:00 with timezone -04:00 at Santiago, Chile (latitude -33.41167 and longitude -70.66647) using Placidus houses system.

Fist, you need to transform the date & time to ISO8601, for this example 1993-08-06T16:50:00-04:00.

Second, you must escape the date and time when you make the request. This is because if the time zone is with a positive sign, for example +05:00, when sending it through the request, the url will take the + sign as a space and not as the + sign. For this example it would be 1993-08-06T16%3A50%3A00-04%3A00. See issue #10

If you don't want to escape the date and time, you can always send it to UTC 🙂

In UTC: 1993-08-06T20:50:00Z

Then, you need to select the house system from the houses system table.. in this case for the placidus system you need to send the P value in the houseSystem query param.

Now you can send this...

Using cURL
# escaped
curl --request GET \
  --url 'http://localhost:3000/horoscope?time=1993-08-06T16%3A50%3A00-04%3A00&latitude=-33.41167&longitude=-70.66647&houseSystem=P'
# in utc
curl --request GET \
  --url 'http://localhost:3000/horoscope?time=1993-08-06T20:50:00Z&latitude=-33.41167&longitude=-70.66647&houseSystem=P'

House system table

The values from each house system is extracted from sweph source code

Code valueHouse system
Aequal
BAlcabitius
CCampanus
Dequal (MC)
Eequal
FCarter poli-equ.
GGauquelin sectors
Hhorizon/azimut
ISunshine
iSunshine/alt.
KKoch
LPullen SD
MMorinus
Nequal/1=Aries
OPorphyry
QPullen SR
RRegiomontanus
SSripati
TPolich/Page
UKrusinski-Pisa-Goelzer
Vequal/Vehlow
Wequal/ whole sign
Xaxial rotation system/Meridian houses
YAPC houses

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
theriftlab/immanuel-python

Quickly produce both human-readable and JSON-formatted astrology chart data based on the Swiss Ephemeris and astro.com.

119
Nov 30, 2026
RepositoryTypeScript
strapi/strapi

🚀 Strapi is the leading open-source headless CMS. It’s 100% JavaScript/TypeScript, fully customizable, and developer-first.

73.6k
Nov 28, 2026
RepositoryPHP
coollabsio/coolify

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

67.4k
Dec 1, 2026
RepositoryTypeScript
outline/outline

The fastest knowledge base for growing teams. Beautiful, realtime collaborative, feature packed, and markdown compatible.

41.5k
Dec 2, 2026
RepositoryGo
The-Vibe-Company/quivr

An open-source engine that turns continuous content streams into search and monitoring. Durable ingestion, hybrid search, alerts, and plugins for formats, models and business rules.

39.7k
Nov 30, 2026
RepositoryC#
VedAstro/VedAstro

A non-profit, open source project to make Vedic Astrology easily available to all.

687
Oct 4, 2026
RepositoryC
timotejroiko/sweph

The definitive Swiss Ephemeris bindings for Node.js

199
Nov 27, 2026
RepositoryTypeScript
morphatic/astrologyjs

Astrological charting for JavaScript and TypeScript: natal, transit, synastry, composite and Davison charts from the Swiss Ephemeris via the Morphemeris API. ESM-only, runs in Node and the browser, bring your own API key.

159
Nov 1, 2026
RepositoryPython
public-apis/public-apis

A collective list of free APIs

502.6k
Nov 30, 2026