Get your first Vedika API call working in under 5 minutes.
No credit card required. No signup needed for sandbox.
The sandbox environment returns realistic mock data - perfect for development. No API key required!
https://api.vedika.io/sandbox
Tip: When you're ready for production with real astronomical data, get your API key from the Console.
Let's get a daily horoscope. Choose your preferred language:
import requests
# Sandbox URL - no API key needed!
url = "https://api.vedika.io/sandbox/horoscope/daily"
params = {
"sign": "aries",
"language": "en"
}
response = requests.get(url, params=params)
data = response.json()
print(f"Today's Horoscope for Aries:")
print(data["horoscope"])
print(f"\nLucky Number: {data['lucky_number']}")
print(f"Lucky Color: {data['lucky_color']}")
Here's what the JSON response looks like:
{
"success": true,
"sign": "aries",
"date": "2025-12-26",
"horoscope": "Today brings exciting opportunities for career growth. Your natural leadership abilities will shine in team settings. Financial matters look favorable - consider reviewing investments.",
"lucky_number": 7,
"lucky_color": "Red",
"lucky_time": "2:00 PM - 4:00 PM",
"mood": "Energetic",
"compatibility": "Leo",
"element": "Fire",
"ruling_planet": "Mars"
}
horoscope - Daily prediction textlucky_number - Today's lucky numberlucky_color - Auspicious colorcompatibility - Best match signaries, taurus, gemini, cancer, leo, virgo, libra, scorpio, sagittarius, capricorn, aquarius, pisces
You're ready to build! Here's a complete example:
import requests
class VedikaClient:
"""Simple Vedika API client"""
def __init__(self, api_key=None):
# Use sandbox for development, production for live data
self.base_url = "https://api.vedika.io/sandbox" if not api_key else "https://api.vedika.io/v1"
self.api_key = api_key
def _headers(self):
if self.api_key:
return {"Authorization": f"Bearer {self.api_key}"}
return {}
def get_horoscope(self, sign, language="en"):
"""Get daily horoscope for a zodiac sign"""
response = requests.get(
f"{self.base_url}/horoscope/daily",
params={"sign": sign, "language": language},
headers=self._headers()
)
return response.json()
def get_birth_chart(self, date, time, latitude, longitude):
"""Generate a birth chart (Kundali)"""
response = requests.post(
f"{self.base_url}/birth-chart",
json={
"date": date,
"time": time,
"latitude": latitude,
"longitude": longitude
},
headers=self._headers()
)
return response.json()
def ask_ai(self, question, birth_data=None):
"""Ask the AI astrologer a question"""
payload = {"question": question}
if birth_data:
payload["birth_data"] = birth_data
response = requests.post(
f"{self.base_url}/ai/chat",
json=payload,
headers=self._headers()
)
return response.json()
# Usage
client = VedikaClient() # Sandbox mode
# Get horoscope
horoscope = client.get_horoscope("leo")
print(horoscope["horoscope"])
# Ask AI
answer = client.ask_ai("What does Mercury retrograde mean for my career?")
print(answer["response"])
Get notified about new features, API updates, and developer tips.
No spam. Unsubscribe anytime.