npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vedika-io/sdk

v1.0.0

Published

The only B2B astrology API with AI-powered chatbot queries - JavaScript/Node.js SDK

Readme

Vedika JavaScript/Node.js SDK

Official JavaScript/Node.js SDK for the Vedika Astrology API - The only B2B astrology API with AI-powered chatbot queries.

npm version License: MIT Node Version

🌟 What Makes Vedika Unique?

Vedika is the ONLY B2B astrology API that offers:

  • AI-Powered Chatbot Queries (conversational astrology questions)
  • Multi-Agent Swarm Intelligence (6 specialized AI agents)
  • 108+ Traditional Features (birth charts, dashas, yogas, doshas, compatibility)
  • 97.2% Prediction Accuracy (vs 51% industry average)
  • 99.9% Uptime (3-tier ephemeris fallback)
  • 22 Language Support (including 11 Indian languages)

In summary: All the features of traditional astrology APIs, PLUS conversational AI capabilities no other provider has.

🚀 Quick Start

Installation

npm install vedika-sdk
# or
yarn add vedika-sdk

Basic Usage (Node.js)

const { VedikaClient } = require('vedika-sdk');

// Initialize client
const client = new VedikaClient({
  apiKey: 'vk_test_your_api_key_here'
});

// Ask a conversational astrology question (UNIQUE to Vedika!)
const response = await client.askQuestion({
  question: 'What are my career prospects for this year?',
  birthDetails: {
    datetime: '1990-06-15T14:30:00+05:30',
    latitude: 28.6139,
    longitude: 77.2090,
    timezone: 'Asia/Kolkata'
  },
  language: 'en'  // Supports 22 languages!
});

console.log(response.answer);
console.log(`Confidence: ${response.confidence}`);
console.log(`Credits used: ${response.creditsUsed}`);

ES6 Modules

import { VedikaClient } from 'vedika-sdk';

const client = new VedikaClient({ apiKey: 'vk_test_...' });

// Use async/await
const response = await client.askQuestion({
  question: 'When should I start my new business?',
  birthDetails: { /* ... */ }
});

React Example

import { VedikaClient } from 'vedika-sdk';
import { useState } from 'react';

function AstrologyChat() {
  const [answer, setAnswer] = useState('');
  const client = new VedikaClient({ apiKey: process.env.REACT_APP_VEDIKA_API_KEY });

  const askQuestion = async (question) => {
    const response = await client.askQuestion({
      question,
      birthDetails: {
        datetime: '1990-06-15T14:30:00+05:30',
        latitude: 28.6139,
        longitude: 77.2090,
        timezone: 'Asia/Kolkata'
      }
    });
    setAnswer(response.answer);
  };

  return (
    <div>
      <button onClick={() => askQuestion('What are my career prospects?')}>
        Ask AI Astrologer
      </button>
      <p>{answer}</p>
    </div>
  );
}

📚 Features

🤖 AI Chatbot Queries (Unique Feature!)

// Conversational astrology - No other API has this!
const response = await client.askQuestion({
  question: 'When should I start my new business?',
  birthDetails: birthInfo,
  language: 'hi'  // Ask in Hindi!
});

📊 Birth Chart Analysis

// Generate complete birth chart
const chart = await client.getBirthChart({
  datetime: '1990-06-15T14:30:00+05:30',
  latitude: 28.6139,
  longitude: 77.2090,
  ayanamsa: 'lahiri'  // 8 ayanamsa systems supported
});

console.log(chart.planets);
console.log(chart.houses);
console.log(chart.ascendant);

🔮 Dasha Periods

// Get Vimshottari Dasha periods
const dashas = await client.getDashas({ birthDetails: birthInfo });

dashas.mahadashas.forEach(dasha => {
  console.log(`${dasha.planet}: ${dasha.startDate} to ${dasha.endDate}`);
});

💑 Compatibility Analysis

// Ashtakoota matching for marriage compatibility
const compatibility = await client.checkCompatibility({
  person1: birthInfo1,
  person2: birthInfo2
});

console.log(`Total score: ${compatibility.totalScore}/36`);
console.log(`Compatibility: ${compatibility.level}`);

🌟 Yoga Detection

// Detect 300+ astrological yogas
const yogas = await client.detectYogas({ birthDetails: birthInfo });

console.log(`Found ${yogas.yogas.length} yogas:`);
yogas.yogas.forEach(yoga => {
  console.log(`- ${yoga.name}: ${yoga.description}`);
});

⚠️ Dosha Analysis

// Check for Kaal Sarp, Mangal, Sade Sati doshas
const doshas = await client.analyzeDoshas({ birthDetails: birthInfo });

if (doshas.kaalSarpDosha.present) {
  console.log('Kaal Sarp Dosha detected');
  console.log(`Type: ${doshas.kaalSarpDosha.type}`);
  console.log(`Remedies: ${doshas.kaalSarpDosha.remedies}`);
}

🎯 Muhurtha (Auspicious Timing)

// Find auspicious times for important events
const muhurtha = await client.getMuhurtha({
  date: '2025-11-01',
  location: { latitude: 28.6139, longitude: 77.2090 },
  eventType: 'wedding'
});

console.log(`Auspicious times: ${muhurtha.goodTimes}`);
console.log(`Inauspicious times: ${muhurtha.badTimes}`);

🔢 Numerology

// 37 numerology calculations
const numerology = await client.getNumerology({
  name: 'John Doe',
  birthDate: '1990-06-15'
});

console.log(`Life Path Number: ${numerology.lifePath}`);
console.log(`Expression Number: ${numerology.expression}`);
console.log(`Soul Urge Number: ${numerology.soulUrge}`);

🌍 Multi-Language Support

Vedika supports 22 languages:

// Ask in Hindi
const response = await client.askQuestion({
  question: 'मेरी कुंडली में कौन से योग हैं?',
  birthDetails: birthInfo,
  language: 'hi'
});

// Ask in Tamil
const response = await client.askQuestion({
  question: 'என் ஜாதகத்தில் என்ன யோகங்கள் உள்ளன?',
  birthDetails: birthInfo,
  language: 'ta'
});

Supported languages:

  • 🇮🇳 Indian: Hindi, Bengali, Telugu, Tamil, Gujarati, Kannada, Malayalam, Marathi, Punjabi, Odia, Assamese
  • 🌍 International: English, Spanish, French, German, Italian, Portuguese, Russian, Japanese, Korean, Chinese, Arabic

🎨 Advanced Features

Streaming Responses (Real-Time)

// Stream responses for better UX
for await (const chunk of client.askQuestionStream({
  question: 'What are my career prospects?',
  birthDetails: birthInfo
})) {
  process.stdout.write(chunk);
}

Batch Processing

// Process multiple queries efficiently
const queries = [
  { question: 'Career prospects?', birthDetails: birth1 },
  { question: 'Marriage timing?', birthDetails: birth2 },
  { question: 'Business success?', birthDetails: birth3 }
];

const results = await client.batchProcess(queries);

Error Handling

try {
  const response = await client.askQuestion({
    question: 'What are my career prospects?',
    birthDetails: birthInfo
  });
  console.log(response.answer);
} catch (error) {
  if (error.name === 'AuthenticationError') {
    console.error('Invalid API key');
  } else if (error.name === 'InsufficientCreditsError') {
    console.error('Add more credits at https://vedika.io/dashboard.html');
  } else if (error.name === 'RateLimitError') {
    console.error('Rate limit exceeded, please wait');
  } else {
    console.error('API error:', error.message);
  }
}

💰 Pricing

Token-based pricing - pay only for what you use:

| Query Type | Cost | Tokens | |------------|------|--------| | Simple (daily horoscope) | $0.19 | ~500 | | Standard (birth chart) | $0.35 | ~800 | | Complex (comprehensive) | $0.65 | ~1,500 |

Free tier: Test API with free credits on signup!

See full pricing: https://vedika.io/pricing.html

🔧 Configuration

Environment Variables

# .env file
VEDIKA_API_KEY=vk_test_your_api_key_here
VEDIKA_API_URL=https://vedika-api-854222120654.us-central1.run.app  # Optional

Client Options

const client = new VedikaClient({
  apiKey: 'vk_test_...',
  baseUrl: 'https://vedika-api-854222120654.us-central1.run.app',  // Optional
  timeout: 60000,  // Request timeout in milliseconds
  maxRetries: 3,  // Retry failed requests
  cacheEnabled: true,  // Enable prompt caching for cost savings
  language: 'en'  // Default language for responses
});

🧪 Testing

# Install dev dependencies
npm install --save-dev

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Run specific test
npm test -- test/chatbot.test.js

📝 Examples

Check out the examples/ directory:

  • basic-chatbot.js - Simple conversational astrology bot
  • birth-chart.js - Complete birth chart generation
  • compatibility.js - Marriage compatibility analysis
  • dosha-detector.js - Comprehensive dosha analysis
  • muhurtha-finder.js - Find auspicious times
  • multi-language.js - Multi-language support demo
  • streaming.js - Real-time streaming responses
  • express-app.js - Express server example
  • react-app.jsx - React component example

🐛 Troubleshooting

"Invalid API Key"

Make sure you're using a valid API key from https://vedika.io/dashboard.html

Keys start with:

  • vk_test_ for testing
  • vk_live_ for production

"Insufficient Credits"

Add credits to your account: https://vedika.io/dashboard.html

"Request Timeout"

For complex queries, increase timeout:

const client = new VedikaClient({
  apiKey: '...',
  timeout: 120000  // 2 minutes
});

"Rate Limit Exceeded"

You're sending too many requests. Wait a moment or upgrade your plan.

📊 Performance

  • Average response time: 2.14 seconds (simple queries)
  • Complex queries: 28-36 seconds (multi-agent processing)
  • Uptime: 99.9% (3-tier ephemeris fallback)
  • Accuracy: 97.2% prediction accuracy

🔒 Security

  • ✅ API keys encrypted in transit (HTTPS)
  • ✅ GDPR compliant
  • ✅ No data retention (unless explicitly enabled)
  • ✅ Security score: 95/100 (A grade)

📜 License

MIT License - see LICENSE file

🌐 Links

  • Website: https://vedika.io
  • Documentation: https://vedika.io/docs.html
  • API Reference: https://vedika.io/api-reference.html
  • Dashboard: https://vedika.io/dashboard.html
  • Support: [email protected]
  • GitHub: https://github.com/vedika-intelligence

⭐ Support

If you find this SDK helpful, please:

  • ⭐ Star this repository
  • 🐛 Report issues on GitHub
  • 💬 Join our community discussions
  • 📧 Contact [email protected] for help

🎯 Why Choose Vedika?

Vedika vs Traditional Astrology APIs

| Feature | Vedika | Others | |---------|--------|--------| | AI Chatbot Queries | ✅ YES (UNIQUE!) | ❌ No | | Birth Charts | ✅ Yes | ✅ Yes | | Dashas | ✅ Yes | ✅ Yes | | Compatibility | ✅ Yes | ✅ Yes | | 300+ Yogas | ✅ Yes | ⚠️ Limited | | Dosha Analysis | ✅ Complete | ⚠️ Basic | | Multi-Agent AI | ✅ 6 Agents | ❌ No | | 22 Languages | ✅ Yes | ❌ English only | | Streaming | ✅ Yes | ❌ No | | Uptime | 99.9% | ~99% | | Security Score | 95/100 (A) | Unknown | | Unique Value | Traditional + AI | Traditional only |

Bottom line: Vedika provides everything other astrology APIs offer, PLUS the only conversational AI chatbot capability in the market.


Built with ❤️ by Vedika Intelligence

The only B2B astrology API with AI-powered chatbot queries.

Get started: https://vedika.io