The project is in a healthy, maintained state
Pure Ruby client library for Astro Insight API providing Vedic Astrology, Western Astrology, Panchang, Tarot, Numerology, and Geolocation services.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

astroinsightapi-sdk (Ruby Gem)

Gem Version Ruby Version License

Official, idiomatic Ruby Gem for the Astro Insight API. Provides zero-dependency, pure Ruby access to Vedic Astrology, Western Astrology, Matchmaking, Panchang, Muhurta, Tarot, Numerology, Chinese Astrology, and Geolocation services.


Features

  • 🪐 Vedic Astrology: Ashtakvarga, Vimshottari / Char / Yogini Dashas, KP System, Jaimini, Lal Kitab, Varshaphal, Ghat Chakra, Horoscope Charts & Doshas.
  • 💍 Matchmaking: Guna Milan, Kundali Compatibility, Manglik Matching.
  • 🗓️ Panchang & Muhurta: Daily Panchang, Choghadiya, Hora, Shubh Muhurta timing.
  • 🔮 Western Astrology & Tarot: Natal Charts, Solar Return, Transits, Synastry, Tarot spreads (One-card, Three-card, Celtic Cross, Love, Career).
  • 🔢 Numerology: Vedic & Western Numerology (Life Path, Destiny, Soul Urge).
  • ☯️ Chinese Astrology & Biorhythm: Zodiac sign compatibility & biorhythm calculations.
  • 🌍 Geo Utilities: Place search, timezone lookup by coordinates or ID.
  • Zero External Dependencies: Pure Ruby Net::HTTP transport.

Installation

Add this line to your application's Gemfile:

gem 'astroinsightapi-sdk'

And then execute:

bundle install

Or install it directly via gem:

gem install astroinsightapi-sdk

Quick Start

require 'astroinsightapi-sdk'

client = AstroInsight::Client.new(
  client_id: 'YOUR_CLIENT_ID',
  client_secret: 'YOUR_CLIENT_SECRET'
)

birth = AstroInsight::Models::BirthDetails.new(
  day: 15, month: 8, year: 1995,
  hour: 10, min: 30, sec: 0,
  tzone: 5.5, lat: 28.6139, lon: 77.2090
)

# Fetch Birth Details
details = client.vedic.astro_details.get_birth_details(birth)
puts details['data']['birth_details']['day'] # Tuesday

# Fetch Sun Bhinnashtakavarga
ashtak = client.vedic.ashtakvarga.get_planet_ashtak('sun', birth)

# One Card Tarot Reading
tarot = client.tarot.get_one_card_reading

Code Examples

🪐 Vedic Astrology & Dashas

# Major Vimshottari Dasha
dasha = client.vedic.vimshottari_dasha.get_major_dasha(birth)

# Gemstone Suggestions
remedies = client.vedic.suggestions.get_gemstone_suggestions(birth)

# Manglik Dosha Check
manglik = client.vedic.horoscope_dosha.get_manglik_dosha(birth)

💍 Matchmaking (Guna Milan)

male = AstroInsight::Models::BirthDetails.new(day: 15, month: 8, year: 1995, hour: 10, min: 30)
female = AstroInsight::Models::BirthDetails.new(day: 20, month: 11, year: 1997, hour: 14, min: 15)

match_input = AstroInsight::Models::MatchInput.new(male: male, female: female)

# Calculate Guna Milan
score = client.vedic.match_making.get_guna_milan(match_input)

🗓️ Daily Panchang & Muhurta

panchang = client.vedic.panchang.get_daily_panchang(birth)
choghadiya = client.vedic.muhurta.get_choghadiya(birth)

🔮 Horoscope & Geo Services

# Daily Horoscope for Leo
leo_daily = client.horoscope.get_daily_horoscope('leo')

# Search Place Coordinates
place_info = client.geo.search_place('Delhi')

Dynamic Configuration & Headers

# Switch language dynamically
client.set_language('hi')

# Switch Ayanamsha system
client.set_ayanamsha('raman')

Error Handling

begin
  response = client.vedic.astro_details.get_birth_details(birth)
rescue AstroInsight::AuthenticationError => e
  puts "Auth failed: #{e.message}"
rescue AstroInsight::ValidationError => e
  puts "Validation failed: #{e.message}, Errors: #{e.errors}"
rescue AstroInsight::RateLimitError => e
  puts "Rate limit exceeded. Retry later."
rescue AstroInsight::Error => e
  puts "API Error [#{e.status_code}]: #{e.message}"
end

License

This Gem is open-sourced software licensed under the MIT License.