{"id":25619164,"url":"https://github.com/teal33t/jyotish-api","last_synced_at":"2025-04-14T00:40:38.676Z","repository":{"id":276528701,"uuid":"929542154","full_name":"teal33t/jyotish-api","owner":"teal33t","description":"Jyotish API, Self-Hosted Vedic Astrology Calculations REST API","archived":false,"fork":false,"pushed_at":"2025-04-02T14:14:41.000Z","size":22920,"stargazers_count":19,"open_issues_count":0,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T15:26:02.714Z","etag":null,"topics":["api","astrologer","astrological","astrologie","astrology","astrology-ai","astrology-api","astrology-calculator","astrology-content","horoscope","horoscope-api","horoscope-app","horoscopes","horoscopes-api","jyotish","symfony","vedic-astrology"],"latest_commit_sha":null,"homepage":"https://kebrya.com/chart/calculator","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teal33t.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-08T19:36:16.000Z","updated_at":"2025-04-02T14:14:44.000Z","dependencies_parsed_at":"2025-03-26T13:26:33.503Z","dependency_job_id":"0db03a06-c91b-483f-b6fe-42de85dd016c","html_url":"https://github.com/teal33t/jyotish-api","commit_stats":null,"previous_names":["teal33t/jyotish-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teal33t%2Fjyotish-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teal33t%2Fjyotish-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teal33t%2Fjyotish-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teal33t%2Fjyotish-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teal33t","download_url":"https://codeload.github.com/teal33t/jyotish-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804286,"owners_count":21164124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","astrologer","astrological","astrologie","astrology","astrology-ai","astrology-api","astrology-calculator","astrology-content","horoscope","horoscope-api","horoscope-app","horoscopes","horoscopes-api","jyotish","symfony","vedic-astrology"],"created_at":"2025-02-22T06:16:15.717Z","updated_at":"2025-04-14T00:40:38.665Z","avatar_url":"https://github.com/teal33t.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jyotish API\n\nA REST API for Jyotish (Vedic Astrology) calculations, built on top of the [kunjara/jyotish](https://github.com/kunjara/jyotish) library. Jyotish API  containerized and provides a wide range of Vedic astrology calculations, including planetary positions, Dashas, Yogas, and more.\n\n## Features\n\n### Chart Calculations\n\n- **Varga (Divisional) Charts**: D1, D2, D3, D4, D7, D9, D10, D12, D16, D20, D24, D27, D30, D40, D45, D60\n- **Planetary Positions**: Detailed positions of planets, Surya (Sun), Chandra (Moon), Mangal (Mars), Buddha (Mercury), Guru (Jupiter), Shukra (Venus), Shani (Staurn), Rahu and Ketu.\n- **Lagna (Ascendant) Calculations**.\n- **Nakshatra Positions**: Lunar mansions.\n\n### Advanced Calculations\n\n#### Basic Information\n\n- **Astangata (Combustion)**: Analysis of planets combust due to proximity to the Sun.\n- **Rashi Avastha (Planetary Dignity)**: Calculation of planetary dignity in different signs.\n- **Vargottama**: Identification of planets occupying the same sign in both Rashi and Navamsa charts.\n- **Planetary War (Yuddha)**: Detection of planetary wars when planets are within 1 degree of each other.\n\n#### Panchanga Elements\n\n- **Tithi**: Lunar day calculation.\n- **Nakshatra**: Determination of the current lunar mansion.\n- **Yoga**: Calculation of the Yoga formed by the positions of the Sun and Moon.\n- **Karana**: Half of a Tithi, used in muhurta (electional astrology).\n- **Vara**: Day of the week.\n\n#### Strength Calculations\n\n- **Ashtakavarga**: Point-based system to analyze planetary strengths.\n- **Graha Bala (Planetary Strength)**: Comprehensive strength analysis of planets.\n- **Rashi Bala (Sign Strength)**: Strength of the zodiac signs.\n\n#### Yoga Calculations\n\n- **Dhana Yoga**: Wealth-producing combinations.\n- **Mahapurusha Yoga**: Great person yogas formed by certain planetary positions.\n- **Nabhasha Yoga**: Yogas based on planetary patterns.\n- **Parivarthana Yoga**: Mutual exchange of signs between planets.\n- **Raja Yoga**: Combinations indicating power and authority.\n- **Sannyasa Yoga**: Combinations indicating renunciation.\n\n### Additional Features\n\n- **Automatic Timezone Detection**: Adjusts calculations based on the provided location.\n- **DST Handling**: Accounts for Daylight Saving Time shifts.\n- **Ayanamsha Calculations**: Adjustments for the precession of the equinoxes.\n- **Dasha Calculations (Vimshottari)**: Planetary periods analysis.\n- **Supported Ayanamshas**: Deluce ,Djwhalkhul ,Fagan ,Jnbhasin ,Krishnamurti ,Lahiri ,Raman ,Sassanian ,Ushashashi ,Yukteshwar\n\n## Literature\n\nMost of the calculations are based on the following classical texts:\n\n- [Maharishi Parashara. Brihat Parashara Hora Shastra.](https://archive.org/details/BrihatParasharaHoraShastra)\n- [Maharishi Jaimini. Jaimini Upadesha Sutras.](https://archive.org/details/JaiminiUpadeshaSutrasWithTranslation)\n- [Varahamihira. Brihat Jataka.](https://archive.org/details/BrihatJatakaBN.Rao)\n- [Varahamihira. Brihat Samhita.](https://archive.org/details/BrihatSamhitaOfVarahamihira)\n- [Kalyana Varma. Saravali.](https://archive.org/details/SaravaliKalyanaVarma)\n- [Satyacharya. Satya Jatakam.](https://archive.org/search?query=Satya%20Jatakam)\n- [Kalidas. Uttara Kalamritam.](https://archive.org/details/UttaraKalamritaKalidasaEnglish)\n- [Venkatesh Sharma. Sarvarth Chintamani.](https://archive.org/search?query=Sarvarth%20Chintamani)\n- [Mantreswara. Phaladeepika.](https://archive.org/details/PhalaDeepikaMantrashwara)\n- [Vaidyanatha Dikshita. Jataka Parijata.](https://archive.org/details/JatakaParijataVaidyanathaDikshita)\n- [Srimad-Bhagavatam.](https://vedabase.io/en/library/sb/)\n- [Bhavishya Purana.](https://archive.org/search?query=Bhavishya%20Purana)\n- [Surya Siddhanta.](https://archive.org/details/TheSuryaSiddhantaWithTranslation)\n- [Manu-Samhita.](https://archive.org/details/ManuSmriti_201601)\n\n\n## Installation\n\nTo install and run the Vedic Astrology API locally, follow these steps:\n\n1. **Clone the repository**:\n\n   ```bash\n   git clone https://github.com/teal33t/jyotish-api.git\n   cd jyotish-api\n   ```\n\n2. **Build and start the Docker container**:\n\n   ```bash\n   docker-compose up --build -d\n   ```\n\n3. **Compile the Swiss Ephemeris library inside the container**:\n\n   ```bash\n   docker-compose exec jyotish_api bash -c \"cd swetest/src \u0026\u0026 make clean \u0026\u0026 make \u0026\u0026 chmod 777 swetest/src \u0026\u0026 chmod +x swetest/src/swetest\"\n   ```\n\n4. **Verify the API is running**:\n\n   Visit [http://localhost:9393/api/ping](http://localhost:9393/api/ping) to check if the API is up and running.\n\n## API Documentation\n\nThe API documentation is available via Swagger UI:\n\n- **Swagger UI**: [http://localhost:9393/api/doc](http://localhost:9393/api/doc)\n\n![Swagger](swagger_api_doc.png)\n\n\n## API Endpoints\n\n### Health Check\n\n```http\nGET /api/ping\n```\n\nVerifies if the API is running.\n\n**Response**:\n```json\n{\n    \"pong\": \"success\"\n}\n```\n\n### Calculate Chart\n\n```http\nGET /api/calculate\n```\n\nCalculates chart based on provided parameters.\n\n\n**Request**\n\n```bash\nhttp://localhost:9393/api/calculate?latitude=37.28077\u0026longitude=49.583057\u0026year=2023\u0026month=12\u0026day=25\u0026hour=12\u0026min=0\u0026sec=0\u0026time_zone=Asia/Tehran\u0026dst_hour=0\u0026dst_min=0\u0026nesting=0\u0026varga=D1,D9\u0026infolevel=basic,panchanga,transit\n```\n\n**Query Parameters**:\n\n| Parameter  | Type    | Required | Description                           | Example    |\n|------------|---------|----------|---------------------------------------|------------|\n| latitude   | float   | Yes      | Location latitude                     | 28.6139    |\n| longitude  | float   | Yes      | Location longitude                    | 77.2090    |\n| year       | integer | Yes      | Year for calculation                  | 2023       |\n| month      | integer | Yes      | Month for calculation (1-12)          | 12         |\n| day        | integer | Yes      | Day for calculation (1-31)            | 25         |\n| hour       | integer | Yes      | Hour for calculation (0-23)           | 12         |\n| min        | integer | Yes      | Minute for calculation (0-59)         | 0          |\n| sec        | integer | Yes      | Second for calculation (0-59)         | 0          |\n| time_zone  | string  | No       | Timezone for calculation             | Asia/Tehran |\n| dst_hour   | integer | No       | DST hours offset                      | 0          |\n| dst_min    | integer | No       | DST minutes offset                    | 0          |\n| nesting    | integer | No       | Nesting level for calculations        | 0          |\n| varga      | string  | No       | Varga divisions (comma-separated)     | D1,D9      |\n| infolevel  | string  | No       | Info levels to include               | basic,ashtakavarga,grahabala,rashibala,yogas,panchanga,transit |\n\n**Response**:\n```json\n\n{\n  \"chart\": {\n    \"user\": {\n      \"datetime\": \"2023-12-25 12:00:00\",\n      \"timezone\": \"+03:30\",\n      \"longitude\": 49.583057,\n      \"latitude\": 37.28077,\n      \"altitude\": 0\n    },\n    \"graha\": {\n      \"Su\": {\n        \"longitude\": 248.983163,\n        \"latitude\": 0.0001772,\n        \"speed\": 1.0183709,\n        \"ascension\": 273.4600331,\n        \"declination\": -23.3978588,\n        \"rashi\": 9,\n        \"degree\": 8.98316299999999,\n        \"nakshatra\": {\n          \"anga\": \"nakshatra\",\n          \"key\": 19,\n          \"ratio\": 1,\n          \"abhijit\": false,\n          \"left\": 32.62627750000016,\n          \"name\": \"Moola\",\n          \"pada\": 3\n        },\n        \"astangata\": null,\n        \"rashiAvastha\": \"friend\",\n        \"vargottama\": false,\n        \"yuddha\": null,\n        \"gocharastha\": 0,\n        \"bhavaCharacter\": \"mishra\",\n        \"tempRelation\": {\n          \"Mo\": -1,\n          \"Ma\": 1,\n          \"Me\": -1,\n          \"Ju\": -1,\n          \"Ve\": 1,\n          \"Sa\": 1,\n          \"Ra\": 1,\n          \"Ke\": 1\n        },\n        \"relation\": {\n          \"Mo\": 0,\n          \"Ma\": 2,\n          \"Me\": -1,\n          \"Ju\": 0,\n          \"Ve\": 0,\n          \"Sa\": 0,\n          \"Ra\": 0,\n          \"Ke\": 0,\n          \"Su\": null\n        },\n        \"yogakaraka\": false,\n        \"mrityu\": false,\n        \"pushkaraNavamsha\": 0,\n        \"pushkaraBhaga\": false,\n        \"avastha\": {\n          \"baladi\": \"kumara\",\n          \"jagradi\": \"swapna\",\n          \"deeptadi\": [\n            \"shanta\"\n          ]\n        },\n        \"dispositor\": \"Ju\"\n      },\n      \"Mo\": {},\n      \"Ma\": {},\n      \"Me\": {},\n      \"Ju\": {},\n      \"Ve\": {},\n      \"Sa\": {},\n      \"Ra\": {},\n      \"Ke\": {},\n    },\n    \"bhava\": {\n      \"1\": {\n        \"longitude\": 327.9252867,\n        \"ascension\": 330.1017467,\n        \"declination\": -12.1928517,\n        \"rashi\": 11,\n        \"degree\": 27.925286700000015\n      },\n      \"2\": {},\n      \"3\": {},\n      \"4\": {},\n      \"5\": {},\n      \"6\": {},\n      \"7\": {},\n      \"8\": {},\n      \"9\": {},\n      \"10\": {},\n      \"11\": {},\n      \"12\": {},\n    },\n    \"lagna\": {\n      \"Lg\": {\n        \"longitude\": 327.9252867,\n        \"ascension\": 330.1017467,\n        \"declination\": -12.1928517,\n        \"rashi\": 11,\n        \"degree\": 27.925286700000015,\n        \"nakshatra\": {\n          \"anga\": \"nakshatra\",\n          \"key\": 25,\n          \"ratio\": 1,\n          \"abhijit\": false,\n          \"left\": 40.56034975,\n          \"name\": \"Purva Bhadrapada\",\n          \"pada\": 3\n        }\n      },\n      \"MLg\": {\n        \"longitude\": 240.7308939,\n        \"ascension\": 238.5809717,\n        \"declination\": -20.3009012,\n        \"rashi\": 9,\n        \"degree\": 0.7308939000000123\n      }\n    },\n    \"varga\": {\n      \"D9\": {\n        \"bhava\": {\n          \"1\": {\n            \"rashi\": 3,\n            \"degree\": 11.327580300000125,\n            \"longitude\": 71.32758030000012\n          },\n          \"2\": {},\n          \"3\": {},\n          \"4\": {},\n          \"5\": {},\n          \"6\": {},\n          \"7\": {},\n          \"8\": {},\n          \"9\": {},\n          \"10\": {},\n          \"11\": {},\n          \"12\": {},\n        },\n        \"graha\": {\n          \"Su\": {\n            \"rashi\": 3,\n            \"degree\": 20.84846699999991,\n            \"speed\": 1.0183709,\n            \"longitude\": 80.84846699999991\n          },\n          \"Mo\": {},\n          \"Ma\": {},\n          \"Me\": {},\n          \"Ju\": {},\n          \"Ve\": {},\n          \"Sa\": {},\n          \"Ra\": {},\n          \"Ke\": {},\n        },\n        \"lagna\": {\n          \"Lg\": {\n            \"rashi\": 3,\n            \"degree\": 11.327580300000125,\n            \"longitude\": 71.32758030000012\n          },\n          \"MLg\": {\n            \"rashi\": 1,\n            \"degree\": 6.578045100000111,\n            \"longitude\": 6.578045100000111\n          }\n        }\n      }\n    },\n    \"panchanga\": {\n      \"tithi\": {\n        \"anga\": \"tithi\",\n        \"key\": 14,\n        \"name\": \"Chaturdashi\",\n        \"paksha\": \"shukla\",\n        \"left\": 75.43356083333303\n      },\n      \"nakshatra\": {\n        \"anga\": \"nakshatra\",\n        \"key\": 4,\n        \"ratio\": 1,\n        \"abhijit\": false,\n        \"left\": 40.51648225000003,\n        \"name\": \"Rohini\",\n        \"pada\": 3\n      },\n      \"yoga\": {\n        \"anga\": \"yoga\",\n        \"key\": 23,\n        \"name\": \"Shubha\",\n        \"left\": 73.14275974999997\n      },\n      \"vara\": {\n        \"anga\": \"vara\",\n        \"left\": 81.29129302863754,\n        \"key\": \"Mo\",\n        \"week\": \"1\",\n        \"name\": \"Somavar\"\n      },\n      \"karana\": {\n        \"anga\": \"karana\",\n        \"key\": 5,\n        \"name\": \"Gara\",\n        \"left\": 50.867121666666065\n      }\n    },\n    \"rising\": {\n      \"Su\": [\n        {\n          \"rising\": \"2023-12-24 07:30:04\",\n          \"setting\": \"2023-12-24 17:40:54\"\n        },\n        {\n          \"rising\": \"2023-12-25 07:30:31\",\n          \"setting\": \"2023-12-25 17:41:27\"\n        },\n        {\n          \"rising\": \"2023-12-26 07:30:56\",\n          \"setting\": \"2023-12-26 17:42:02\"\n        }\n      ]\n    },\n    \"kala\": {\n      \"hora\": {\n        \"number\": 7,\n        \"key\": \"Me\",\n        \"interval\": 3054.6666666666665,\n        \"left\": 47.173723264949835,\n        \"type\": \"yama\",\n        \"end\": \"2023-12-25 13:26:54\"\n      }\n    },\n    \"dasha\": {\n      \"nesting\": 0,\n      \"type\": \"vimshottari\",\n      \"key\": \"\",\n      \"duration\": 3786834240,\n      \"start\": \"2018-01-12 22:49:09\",\n      \"end\": \"2138-01-13 01:13:09\",\n      \"periods\": {\n        \"Mo\": {\n          \"nesting\": 1,\n          \"type\": \"mahadasha\",\n          \"key\": \"Mo\",\n          \"duration\": 315569520,\n          \"start\": \"2018-01-12 22:49:09\",\n          \"end\": \"2028-01-13 09:01:09\"\n        },\n        \"Ma\": {},\n        \"Ra\": {},\n        \"Ju\": {},\n        \"Sa\": {},\n        \"Me\": {},\n        \"Ke\": {},,\n        \"Ve\": {},,\n        \"Su\": {},\n      }\n    }\n  },\n  \"duration_of_response\": 0.12,\n  \"created_at\": \"2025-02-08 23:55:46\"\n}\n\n```\n\n### Current Time Chart\n\n```http\nGET /api/now\n```\n\nCalculates chart for the current moment.\n\n**Query Parameters**:\n\n| Parameter  | Type    | Required | Description        | Default    |\n|------------|---------|----------|--------------------|------------|\n| latitude   | float   | No       | Location latitude  | 35.7219    |\n| longitude  | float   | No       | Location longitude | 51.3347    |\n\n**Response**:\n```json\n{\n    \"chart\": { /* Chart data */ },\n    \"duration_of_response\": 0.123,\n    \"created_at\": \"2023-12-25 12:00:00\"\n}\n```\n\n## Error Handling\n\nIn case of errors, the API returns a JSON response with an error message and appropriate HTTP status code:\n\n```json\n{\n    \"status\": 400,\n    \"message\":\"No route found for GET http://localhost:9393/api/not_registered_route/\"\n}\n```\n\n\n## Support\n\nFor issues, feature requests, or questions, please open an issue in the GitHub repository.\n\n## License\n\nThis project is licensed under the GNU License V3 - see the LICENSE file for details.\n\nThe Jyotish library used in this project is licensed under the GNU General Public License version 2 or later. See the [Jyotish LICENSE](https://github.com/kunjara/jyotish/blob/master/LICENSE) for more details.\n\n## Contact\n\nFor any inquiries, questions, or support, please contact [on Telegram](http://t.me/samanesmaeil).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteal33t%2Fjyotish-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteal33t%2Fjyotish-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteal33t%2Fjyotish-api/lists"}