API & Developer Guides March 10, 2026 2 min read

Integrating the AstrologyAPI into Your App: A Developer's Quick Start Guide


Astrologyservice
Astrologyservice
Author

 

Why Build with AstrologyAPI?


 

The AstrologyAPI gives developers access to 100+ Vedic and Western astrology endpoints — from birth charts and Kundli generation to daily Panchang, Dasha periods, compatibility matching, and PDF report generation. All responses are in clean JSON, making integration fast and flexible.

 

 

Step 1: Get Your API Credentials


 

After registering and subscribing to a plan, navigate to your dashboard → API Keys. You'll receive a userId and apiKey which are used for HTTP Basic Authentication on every request.

 

 

Step 2: Make Your First API Call


 

Here's a sample request to get the planet positions for a birth chart:

 

 

POST https://json.astrologyapi.com/v1/planets
Authorization: Basic BASE64(userId:apiKey)
Content-Type: application/json

 

{
 "day": 15,
 "month": 8,
 "year": 1990,
 "hour": 10,
 "min": 30,
 "lat": 28.6139,
 "lon": 77.2090,
 "tzone": 5.5
}
 

 

 

Step 3: Key Endpoints to Explore


 

  • /planets — Get all 9 planet positions, degrees, and signs
  • /horo_chart/:chartId — Generate Lagna, Navamsa, and other divisional charts
  • /current_mahadasha — Get the active Maha and Antar Dasha
  • /match_ashtakoot — Full Guna Milan score for two birth charts
  • /panchang — Daily Tithi, Nakshatra, Yoga, Karana and more
  • /daily_sun_horoscope/:sign — Sun-sign daily horoscope text

 

 


 

"Our API is designed for developers who want to ship fast. Most integrations go live within a single day."


 

 

 

Best Practices


 

  1. Always validate birth time accuracy from users — it affects all chart calculations
  2. Cache Panchang and horoscope responses for the same day to reduce API calls
  3. Use timezone offset correctly — pass decimal values (e.g., 5.5 for IST)
  4. Handle API errors gracefully with proper fallback UI messages
  5. Use our PDF generation endpoints for downloadable reports — great for premium features

 

 

Start Building Today


 

Sign up for a free 7-day trial — no credit card required. Access all 100+ endpoints, explore the full documentation, and join thousands of developers already building the next generation of astrology applications.

 

Astrologyservice
About Astrologyservice

Technology expert and thought leader sharing insights on emerging technologies and digital innovation.