PyJHora Vedic Astrology API Complete Reference — v4.8.7

Server: http://192.168.88.10:9191  ·  All POST endpoints accept Content-Type: application/json  ·  Built on FastAPI + PyJHora

Contents

1. Overview & Common Schemas

All POST endpoints accept JSON bodies. The following shared types are used throughout the API.

DateTuple

FieldTypeRequiredDescription
yearintrequiredYear (negative for BC, e.g. -3114)
monthintrequiredMonth 1–12
dayintrequiredDay 1–31

TimeTuple

FieldTypeRequiredDescription
hourintrequiredHour 0–23
minuteintrequiredMinute 0–59
secondfloatrequiredSecond 0–59

PlaceRequest

FieldTypeRequiredDescription
namestrrequiredCity name (e.g. "Bathinda, India", "New Delhi")
latitudefloat | nulloptionalOverrides geocoding if provided
longitudefloat | nulloptionalOverrides geocoding if provided
timezonefloat | nulloptionalUTC offset (hours); overrides geocoding

HoroscopeInput (common base)

FieldTypeRequiredDefaultDescription
dateDateTuplerequired—Date of birth
timeTimeTuplerequired—Time of birth
placePlaceRequestrequired—Place of birth
ayanamsa_modestroptional"Lahiri"Ayanamsa mode: Lahiri, KP, Raman, etc.
divisional_chart_factorintoptional11=Rasi, 9=Navamsa, 60=Shastyamsa, etc.
yearsintoptional1Years offset for dasha/transit
monthsintoptional1Months offset
sixty_hoursintoptional1Sixty-hour offset
Example request body (used by most horoscope endpoints):
{
  "date":     { "year": 1993, "month": 9, "day": 4 },
  "time":     { "hour": 16, "minute": 48, "second": 0 },
  "place":    { "name": "Bathinda, India" },
  "ayanamsa_mode": "Lahiri"
}

2. Health & Root

GET /

Root welcome message.

curl -s http://192.168.88.10:9191/
Response
{"message":"PyJHora Vedic Astrology API v4.8.7","docs":"/docs","endpoints":{...}}

GET /health

Health check — returns status and library version.

curl -s http://192.168.88.10:9191/health
Response
{"status":"ok","jhora_version":"4.8.7"}

3. Utility Endpoints

All under /api/utils.

POST /api/utils/julian-day

Compute Julian Day Number from a calendar date/time.

curl -s -X POST http://192.168.88.10:9191/api/utils/julian-day \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0}}'
Response
{"julian_day":2449235.2,"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0}}

POST /api/utils/place

Resolve a place name to lat/long/timezone/elevation. Uses a local SQLite geonames database.

curl -s -X POST http://192.168.88.10:9191/api/utils/place \
  -H "Content-Type: application/json" \
  -d '{"name":"Bathinda, India"}'
Response
{"name":"Bathinda, India","latitude":30.2379114,"longitude":74.95402625,
 "timezone":5.5,"elevation":null}

POST /api/utils/to-dms

Convert a decimal degree value to Degrees–Minutes–Seconds notation.

curl -s -X POST http://192.168.88.10:9191/api/utils/to-dms \
  -H "Content-Type: application/json" \
  -d '{"decimal_degrees":23.456}'

POST /api/utils/planet-house-list

Get the 12-element house-to-planet string list for a given chart.

curl -s -X POST http://192.168.88.10:9191/api/utils/planet-house-list \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"}}'

POST /api/utils/planet-house-dict

Get the planet-to-house mapping dictionary (planet index → raasi index).

curl -s -X POST http://192.168.88.10:9191/api/utils/planet-house-dict \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"}}'

POST /api/utils/house-to-planet-dict

Get the house-to-planet mapping (same as planet-house-dict, alias).

GET /api/utils/now

Get Julian Day Number for the current system time (no request body needed).

curl -s http://192.168.88.10:9191/api/utils/now

4. Panchanga

All under /api/panchanga. Computes the five limbs of the Vedic calendar (tithi, nakshatra, vaara, yogam, karana) plus planetary positions, sunrise/sunset, ayanamsa, and muhurthas.

Common request body (PanchangaInput):

{
  "date": { "year": 1993, "month": 9, "day": 4 },
  "time": { "hour": 16, "minute": 48, "second": 0 },
  "place": { "name": "Bathinda, India" },
  "ayanamsa_mode": "Lahiri"
}

POST /api/panchanga/planetary-positions

Full list of all planet positions (9 bodies including Lagna) with raasi index and longitude.

curl -s -X POST http://192.168.88.10:9191/api/panchanga/planetary-positions \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"},"ayanamsa_mode":"Lahiri"}'
Response (abbreviated)
{
  "julian_day": 2449235.2,
  "place": { "name": "Bathinda, India", "latitude": 30.2379, "longitude": 74.9540, "timezone": 5.5, "elevation": null },
  "positions": [
    {"planet":"L","raasi_index":4,"longitude_in_raasi":18.168085},
    {"planet":1,"raasi_index":11,"longitude_in_raasi":24.96067},
    ...
  ],
  "ayanamsa_value": 23.456
}

POST /api/panchanga/full

Complete panchanga: all five limbs + sunrise/sunset + ayanamsa.

curl -s -X POST http://192.168.88.10:9191/api/panchanga/full \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"},"ayanamsa_mode":"Lahiri"}'
Response shape
{
  "julian_day": 2449235.2,
  "place": { ... },
  "sunrise":   {"hour":6.20,"minute":12,"second":19,"decimal":6.205388},
  "sunset":    {"hour":18.74,...},
  "tithi":     {"index":19,"name":"Krishna Panchami","remaining":41.586964},
  "nakshatra": {"index":27,"name":"Revati","remaining":-23.973498},
  "raasi":     {"index":12,"name":"Pisces","remaining":0.077651},
  "vaara":     {"index":6,"name":"Shani"},
  "yogam":     {"index":10,"name":"Vriddhi","remaining":17.183777},
  "karana":    {"index":37,"name":"Kaulava","remaining":28.317019},
  "ayanamsa_value": 23.456
}

POST /api/panchanga/tithi

Get only tithi (lunar day): {"index":19,"name":"Krishna Panchami","remaining":41.586964}

curl -s -X POST http://192.168.88.10:9191/api/panchanga/tithi \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"},"ayanamsa_mode":"Lahiri"}'

POST /api/panchanga/nakshatra

Get only nakshatra (lunar mansion).

POST /api/panchanga/raasi

Get only raasi (zodiac sign of the Moon).

POST /api/panchanga/vaara

Get only vaara (weekday).

POST /api/panchanga/yogam

Get only yogam (the 27 yoga combination).

POST /api/panchanga/karana

Get only karana (half of a lunar day).

POST /api/panchanga/sunrise

Get sunrise time at the given place.

POST /api/panchanga/sunset

Get sunset time at the given place.

POST /api/panchanga/ayanamsa

Get ayanamsa value (precessional offset) for the given date.

POST /api/panchanga/muhurthas

Get muhurtha timings (Rahu Kalam, Yamaganda, Gulika, etc.) for the given day and place.

curl -s -X POST http://192.168.88.10:9191/api/panchanga/muhurthas \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"}}'

5. Chart (Horoscope)

All under /api/chart. Computes rasi chart, divisional charts, bhava chart, planet positions, retrograde/combustion status, dosha analysis, aspects, and yoga checks.

Common request body (ChartInput):

{
  "date":    { "year": 1993, "month": 9, "day": 4 },
  "time":    { "hour": 16, "minute": 48, "second": 0 },
  "place":   { "name": "Bathinda, India" },
  "ayanamsa_mode": "Lahiri",
  "divisional_chart_factor": 1,
  "chart_method": 1,
  "pravesha_type": 0
}

POST /api/chart/rasi

Compute the main Rasi (D1) chart — planet positions, house assignments, retrograde/combust planets.

curl -s -X POST http://192.168.88.10:9191/api/chart/rasi \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"},"ayanamsa_mode":"Lahiri"}'
Response
{
  "julian_day": 2449235.2,
  "place": { ... },
  "divisional_chart_factor": 1,
  "planet_positions": [
    {"planet":"L","raasi_index":4,"longitude_in_raasi":18.168085},
    {"planet":1,"raasi_index":11,"longitude_in_raasi":24.96067},
    ...
  ],
  "house_to_planet_list": ["2/5", "", "0", ...],
  "planet_to_house_dict": {"L":4, "0":2, "1":11, ...},
  "retrograde_planets": [4, 6, 7],
  "combust_planets": [2, 5, 8]
}

POST /api/chart/divisional

Compute a divisional chart (varga) specified by divisional_chart_factor. Supported factors: 1 (Rasi), 2 (Hora), 3 (Drekkana), 4 (Chaturthamsa), 5 (Panchamsa), 6 (Shashtamsa), 7 (Saptamsa), 8 (Ashtamsa), 9 (Navamsa), 10 (Dasamsa), 12 (Dwadasamsa), 16 (Shodasamsa), 20 (Vimsamsa), 24 (Chaturvimsamsa), 27 (Saptavimsamsa), 30 (Trimsamsa), 40 (Khavedamsa), 45 (Akshavedamsa), 60 (Shastyamsa), 81 (Ekadashasthalamsa), 108 (Ashtottaramsa), 144 (Dvisahasramsa/Dvadasamsa).

curl -s -X POST http://192.168.88.10:9191/api/chart/divisional \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"},"ayanamsa_mode":"Lahiri","divisional_chart_factor":9}'

POST /api/chart/navamsa

Shortcut for /api/chart/divisional with factor 9.

POST /api/chart/bhava

Compute the Bhava chart (house-based chart system).

POST /api/chart/planet-positions

Alias for /api/panchanga/planetary-positions. Returns all planet positions.

POST /api/chart/retrograde

List retrograde planets.

curl -s -X POST http://192.168.88.10:9191/api/chart/retrograde \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"}}'

POST /api/chart/combustion

List combust planets.

POST /api/chart/dosha

Compute all dosha analysis results (Kala Sarpa, Manglik, Pitru, Guru Chandala, Ganda Moola, Kalathra, Ghata, Shrapit, etc.). Returns a dictionary of dosha names with boolean or descriptive values.

curl -s -X POST http://192.168.88.10:9191/api/chart/dosha \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"}}'
Response (partial)
{
  "Kala Sarpa Dosha": "present",
  "Manglik Dosha": "present",
  "Pitru Dosha": "absent",
  ...
}

POST /api/chart/aspects

Get planetary aspects (which planets aspect which houses).

POST /api/chart/yoga-check

Run a single yoga check by name. Pass query parameter yoga_name e.g. ?yoga_name=vesi_yoga. Returns the description of whether that yoga is present.

curl -s -X POST "http://192.168.88.10:9191/api/chart/yoga-check?yoga_name=vesi_yoga" \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"}}'

6. Dasha Systems

All under /api/dhasa. Computes period-based dasha systems. Most use DashaInput which extends HoroscopeInput with antardhasa_option (1–6, depth level) and dhasa_level_index (1–6).

POST /api/dhasa/vimsottari

Vimsottari Dasha (120-year cycle). Returns the balance at birth and full list of periods.

curl -s -X POST http://192.168.88.10:9191/api/dhasa/vimsottari \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"},"ayanamsa_mode":"Lahiri","antardhasa_option":2,"dhasa_level_index":2}'
Response (abbreviated)
{
  "balance_dhasa_at_birth": {"years":6,"months":5,"days":3},
  "periods": [
    {"lord":8,"bhukthi_lord":null,"start_year":1993,"start_month":9,"start_day":4,"duration_years":6,...},
    {"lord":8,"bhukthi_lord":0,"start_year":1993,...},
    ...
  ]
}

POST /api/dhasa/ashtottari

Ashtottari Dasha (108-year cycle).

POST /api/dhasa/narayana

Narayana Dasha (rasi-based dasha system).

POST /api/dhasa/yogini

Yogini Dasha (36-year cycle based on nakshatra).

POST /api/dhasa/sudasa

Sudasa / Shoola Dasha (sign-based).

POST /api/dhasa/moola

Moola Dasha based on nakshatra pada of the Moon.

POST /api/dhasa/current

Get the currently running dasha for a given date/dob. Pass target_date and optional target_time fields to specify "now".

curl -s -X POST http://192.168.88.10:9191/api/dhasa/current \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"},"target_date":"2026-07-15","target_time":"22:50"}'

GET /api/dhasa/available-systems

List all available dasha system names.

curl -s http://192.168.88.10:9191/api/dhasa/available-systems

7. Transit & Sahams

All under /api/transit. Annual chart, lords, sahams, Tajaka aspects, current transit analysis, and Ithasala yoga.

POST /api/transit/annual-chart

Compute the annual Tajaka chart (solar return) for a given birth date.

curl -s -X POST http://192.168.88.10:9191/api/transit/annual-chart \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"},"ayanamsa_mode":"Lahiri"}'

POST /api/transit/lord-of-year

Get the lord of the year (Tajaka year ruler) based on the annual chart.

POST /api/transit/lord-of-month

Get the lord of the month in the annual chart.

POST /api/transit/saham

Compute a single saham point. Pass saham_name query parameter. Available names: punya, vidya, yasas, mitra, mahatmaya, asha, samartha, bhratri, gaurava, pithri, rajya, maathri, puthra, jeeva, karma, roga, kali, sastra, bandhu, mrithyu, paradesa, artha, paradara, vanika, karyasiddhi, vivaha, santapa, sraddha, preethi, jadya, vyaapaara, sathru, jalapatna, bandhana, apamrithyu, laabha.

curl -s -X POST "http://192.168.88.10:9191/api/transit/saham?saham_name=artha" \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"}}'

POST /api/transit/sahams/all

Compute all 36 sahams at once.

curl -s -X POST http://192.168.88.10:9191/api/transit/sahams/all \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"}}'
Response shape
{
  "count": 33,
  "items": [
    {"saham":"punya","longitude_degrees":136.989},
    {"saham":"vidya","longitude_degrees":93.404},
    ...
  ]
}

POST /api/transit/tajaka-aspects

Compute Tajaka aspects between planets for the annual chart.

POST /api/transit/current-transit

Compute current planetary transit positions relative to birth chart. Use years_from_dob to specify a specific year offset from birth.

curl -s -X POST http://192.168.88.10:9191/api/transit/current-transit \
  -H "Content-Type: application/json" \
  -d '{"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"},"ayanamsa_mode":"Lahiri","years_from_dob":33}'

POST /api/transit/ithasala-yoga

Check Ithasala yoga in the transit chart (a yoga formed when two planets exchange or aspect each other's signs).

8. Marriage Matching

All under /api/match. Computes horoscope matching (porutham) for marriage compatibility.

POST /api/match/ashtakoota

Ashtakoota (8-fold) matching based on nakshatra and padam of the boy and girl. Uses North Indian system (default).

curl -s -X POST http://192.168.88.10:9191/api/match/ashtakoota \
  -H "Content-Type: application/json" \
  -d '{"boy_nakshatra":21,"boy_paadam":1,"girl_nakshatra":5,"girl_paadam":3,"method":"North","minimum_score":18.0,"check_mahendra":true,"check_vedha":true,"check_rajju":true,"check_sthree_dheerga":true}'
Response
{
  "varna_porutham": 1.0,
  "vasiya_porutham": 0.0,
  "gana_porutham": 1.0,
  ...
  "compatibility_score": 22.0,
  "mahendra_porutham": true,
  "vedha_porutham": true,
  "rajju_porutham": true,
  "sthree_dheerga_porutham": true,
  "is_compatible": true
}

POST /api/match/ashtakoota/south

Ashtakoota matching using South Indian method.

POST /api/match/by-birth-details

Compute matching from full horoscope birth details (date/time/place) for both parties. Pass two sets of date, time, place fields: one for the boy, one for the girl.

curl -s -X POST http://192.168.88.10:9191/api/match/by-birth-details \
  -H "Content-Type: application/json" \
  -d '{
    "boy": {"date":{"year":1993,"month":9,"day":4},"time":{"hour":16,"minute":48,"second":0},"place":{"name":"Bathinda, India"}},
    "girl": {"date":{"year":1995,"month":3,"day":15},"time":{"hour":8,"minute":30,"second":0},"place":{"name":"Chandigarh, India"}},
    "ayanamsa_mode":"Lahiri"
  }'

9. Everything (Aggregate)

POST /api/everything — Runs all computations (chart, dasha, panchanga, transit, sahams, yogas, and optionally matching) in a single request. Accepts EverythingInput which extends HoroscopeInput with all optional parameters.

POST /api/everything

Aggregate endpoint — returns ALL calculations in one response. Each section is wrapped in its own try/except block, so partial results are returned even if one section fails.

Additional / optional fields in EverythingInput

FieldTypeDefaultDescription
chart_methodint1Chart method for divisional charts
antardhasa_optionint1Dasha depth level (1=Mahadasa..6=Prana)
dhasa_level_indexint2Dasha sub-period level
years_from_dobint0Years from birth for transit
target_datestr | nullnullTarget date (YYYY-MM-DD) for transit
target_timestr | nullnullTarget time (HH:MM) for transit
include_all_divisional_chartsboolfalseCompute D2–D60 charts (slower)
boy_nakshatraint | nullnullIf provided, also computes matching
boy_paadamint | nullnullBoy's padam (1–4)
girl_nakshatraint | nullnullGirl's nakshatra
girl_paadamint | nullnullGirl's padam
curl -s -X POST http://192.168.88.10:9191/api/everything \
  -H "Content-Type: application/json" \
  -d '{
    "date":    { "year": 1993, "month": 9, "day": 4 },
    "time":    { "hour": 16, "minute": 48, "second": 0 },
    "place":   { "name": "Bathinda, India" },
    "ayanamsa_mode": "Lahiri",
    "include_all_divisional_charts": true
  }'
Response structure
{
  "input":            { ... },           ← Echo of the request
  "julian_day":       2449235.2,
  "panchanga":        {                   ← Full panchanga + limbs
    "planetary_positions": [...],
    "ayanamsa":          23.456,
    "sunrise":           {...},
    "sunset":            {...},
    "tithi":             {"index":19,"name":"Krishna Panchami",...},
    "nakshatra":         {"index":27,"name":"Revati",...},
    "raasi":             {"index":12,"name":"Pisces",...},
    "vaara":             {"index":6,"name":"Shani"},
    "yogam":             {"index":10,"name":"Vriddhi",...},
    "karana":            {"index":37,"name":"Kaulava",...},
    "muhurthas":         {...}
  },
  "chart":            {                   ← Rasi chart + dosha
    "planet_positions":     [...],
    "house_to_planet_list": [...],
    "planet_to_house_dict": {...},
    "D1":                   {...},
    "dosha":                {...}
  },
  "dhasa":            {                   ← All dasha systems
    "vimsottari":  {...},   ← 81 periods
    "ashtottari":  {...},
    "yogini":      {...},
    "narayana":    {...},
    "sudasa":      {...},
    "moola":       {...},
    "running":     {...}
  },
  "transit":          {                   ← Annual + current transit
    "annual_chart":     {...},
    "lord_of_the_year": {...},
    "current_transit":  {...},
    "tajaka_aspects":   {...}
  },
  "sahams":           {                   ← 33 computed sahams
    "count": 33,
    "items": [...]
  },
  "yogas":            {                   ← Comprehensive yoga report
    "comprehensive": [ ... ]              ← ~30+ detailed yoga checks
  },
  "divisional_charts": {  ...  },         ← Only if include_all_divisional_charts=true
  "matching":         {  ...  }           ← Only if boy_nakshatra + girl_nakshatra provided
}

With matching

curl -s -X POST http://192.168.88.10:9191/api/everything \
  -H "Content-Type: application/json" \
  -d '{
    "date":    { "year": 1993, "month": 9, "day": 4 },
    "time":    { "hour": 16, "minute": 48, "second": 0 },
    "place":   { "name": "Bathinda, India" },
    "ayanamsa_mode": "Lahiri",
    "boy_nakshatra": 21,
    "boy_paadam": 1,
    "girl_nakshatra": 5,
    "girl_paadam": 3
  }'

10. HTTP Response Codes

StatusMeaningTypical Cause
200 OKRequest succeededNormal operation
400 Bad RequestInvalid input or computation errorInvalid date, place not found, or internal library error
404 Not FoundEndpoint does not existWrong URL path
422 Unprocessable EntityRequest body failed Pydantic validationMissing required fields, wrong types, out-of-range values
500 Internal Server ErrorUnhandled server-side exceptionShould not occur; report as a bug
Error response shape (400/422):
{
  "detail": "Error message describing the problem"
}
Validation error shape (422):
{
  "detail": [
    {
      "loc": ["body", "date", "month"],
      "msg": "ensure this value is greater than or equal to 1",
      "type": "value_error.number.not_ge"
    }
  ]
}