USE CASE
AI Astrology Chatbot: Build Conversational Astrology
Create an AI-powered chatbot that understands natural language astrology queries. The only API with built-in AI.
January 7, 2026
-
16 min read
What Makes Vedika's AI Different
Vedika is the only astrology API with built-in AI that understands natural language. Users can ask questions like:
- "What career suits me based on my birth chart?"
- "Will this year be good for starting a business?"
- "What does my Saturn return mean?"
- "When is the best time to get married?"
- "Explain my Mangal Dosha in simple terms"
Basic Implementation
// Simple chatbot with Vedika AI
const { Vedika } = require('@anthropic/vedika');
const vedika = new Vedika({ apiKey: process.env.VEDIKA_API_KEY });
async function handleUserQuery(question, birthDetails) {
const response = await vedika.chat({
question,
birthDetails: {
datetime: birthDetails.datetime,
latitude: birthDetails.latitude,
longitude: birthDetails.longitude
}
});
return response.answer;
}
// Example usage
const answer = await handleUserQuery(
"What career path suits me best?",
{
datetime: '1990-05-15T14:30:00+05:30',
latitude: 28.6139,
longitude: 77.2090
}
);
console.log(answer);
// "Based on your birth chart, you have a strong 10th house with
// Jupiter aspecting, suggesting success in teaching, counseling,
// or advisory roles. Your Mercury in the 9th house also indicates
// potential in writing, publishing, or international business..."
Streaming for Real-Time UI
// Stream responses for better UX
async function streamingChat(question, birthDetails, onChunk) {
const stream = await vedika.chatStream({
question,
birthDetails
});
let fullResponse = '';
for await (const chunk of stream) {
fullResponse += chunk;
onChunk(chunk); // Update UI in real-time
}
return fullResponse;
}
// React component with streaming
function AstrologyChat({ userBirthDetails }) {
const [messages, setMessages] = useState([]);
const [currentResponse, setCurrentResponse] = useState('');
async function sendMessage(question) {
setMessages(prev => [...prev, { role: 'user', content: question }]);
setCurrentResponse('');
await streamingChat(question, userBirthDetails, (chunk) => {
setCurrentResponse(prev => prev + chunk);
});
setMessages(prev => [...prev, { role: 'assistant', content: currentResponse }]);
}
// ... render chat UI
}
Key Features
Context-Aware
AI has full access to user's birth chart when answering.
Accurate Data
Responses based on Swiss Ephemeris calculations.
Multi-Language
Ask questions and get responses in 22 languages.
Streaming
Real-time responses for better user experience.
Build Your AI Astrology Chatbot
Vedika is the only API with built-in AI for astrology. Natural language queries, accurate calculations, streaming responses.
Get Free API Key