AstroWay/api v2.295.7 · hi
सभी सिस्टम सामान्य हैं

ज्योतिष एपीआई की त्वरित शुरुआत: 5 मिनट में टाइपस्क्रिप्ट और पायथन

एसडीके स्थापित करें, एपीआई कुंजी प्राप्त करें, पहला जन्म चार्ट अनुरोध करें। 5 मिनट - और काम करने वाला जेसन हाथ में (टाइपस्क्रिप्ट और पायथन)।

🕓 रिकॉर्ड 2026-04-14 को, अपडेट 2026-05-09 को। TS / Python / PHP SDK अब public registries पर हैं - @astroway/sdk (npm), astroway (PyPI), astroway/sdk (Packagist). विवरण changelog में।

तू कोड से नताल चार्ट बनाना चाहता है। यहाँ सबसे छोटा रास्ता है - 5 मिनट में शून्य से काम करने वाला JSON तक।

चरण 1: API‑की प्राप्त करो (30 सेकंड)

Section titled “चरण 1: API‑की प्राप्त करो (30 सेकंड)”

रजिस्टर हो api.astroway.info/dashboard/sign-up पर। मुफ्त प्लान: 10 000 क्रेडिट / महीना। बिना कार्ड के।

dashboard में “Create key” → “Production” पर क्लिक करो → कॉपी करो। कीज़ का फॉर्मेट aw_live_aB3xY7pQ9rN2mK4jH8vC5tL6wZ1fD0eR है।

संकेत: aw_test_ प्रीफ़िक्स वाले sandbox‑कीज़ भी हैं - वे क्रेडिट नहीं घटाते। विकास के दौरान उनका उपयोग करो।

चरण 2: SDK स्थापित करो

Section titled “चरण 2: SDK स्थापित करो”
Terminal window
npm install @astroway/sdk
Terminal window
pip install astroway

दोनों SDK सभी 777 एंडपॉइंट को टाइप्ड अनुरोधों और प्रतिक्रियाओं के साथ कवर करते हैं।

चरण 3: पहली नताल चार्ट

Section titled “चरण 3: पहली नताल चार्ट”
import { Astroway } from '@astroway/sdk';
const aw = new Astroway({
apiKey: process.env.ASTROWAY_API_KEY!,
});
const chart = await aw.chart.compute({
date: '1990-07-14',
time: '14:30:00',
timezoneOffset: 3, // UTC+3 for Kyiv summer
latitude: 50.4501,
longitude: 30.5234,
houseSystem: 'P', // Placidus
});
const SIGNS = ['Aries', 'Taurus', 'Gemini', 'Cancer', 'Leo', 'Virgo',
'Libra', 'Scorpio', 'Sagittarius', 'Capricorn', 'Aquarius', 'Pisces'];
const sun = chart.planets.find((p) => p.name === 'Sun')!;
console.log(`Sun: ${SIGNS[Math.floor(sun.longitude / 30)]} at ${sun.longitude.toFixed(2)}°`);
console.log(`ASC: ${chart.houses.ascendant.toFixed(2)}°`);
console.log(`Aspects: ${chart.aspects.length}`);

चलाओ:

Terminal window
ASTROWAY_API_KEY=aw_live_... npx tsx chart.ts

फ़ाइल top-level await का उपयोग करती है, इसलिए package.json में "type": "module" होना चाहिए। नहीं तो tsx फेल हो जाएगा Top-level await is currently not supported with the "cjs" output format के साथ।

from astroway import Astroway, BirthData
aw = Astroway(api_key="aw_live_your_key_here")
chart = aw.chart.compute(BirthData(
date="1990-07-14",
time="14:30:00",
timezone_offset=3,
latitude=50.4501,
longitude=30.5234,
house_system="P",
))
SIGNS = ["Aries", "Taurus", "Gemini", "Cancer", "Leo", "Virgo",
"Libra", "Scorpio", "Sagittarius", "Capricorn", "Aquarius", "Pisces"]
sun = next(p for p in chart["planets"] if p["name"] == "Sun")
print(f"Sun: {SIGNS[int(sun['longitude'] // 30)]} at {sun['longitude']:.2f}°")
print(f"ASC: {chart['houses']['ascendant']:.2f}°")
print(f"Aspects: {len(chart['aspects'])}")

चलाओ:

Terminal window
ASTROWAY_API_KEY=aw_live_... python3 chart.py

API क्या लौटाता है

Section titled “API क्या लौटाता है”

वापस एक JSON‑ऑब्जेक्ट आता है जिसमें चार मुख्य भाग होते हैं:

13 ऑब्जेक्ट्स की एक एरे। name में Swiss Ephemeris से निकाला गया शरीर का नाम होता है: Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, true Node (उत्तरी नोड), mean Apogee (लीलिथ), Chiron।

{
"id": 0,
"name": "Sun",
"longitude": 354.702, // ecliptic longitude in degrees
"latitude": -0.00016,
"distance": 0.9945, // in astronomical units
"speedLong": 0.9971, // degrees per day (negative = retrograde)
"speedLat": 0.00003,
"speedDist": 0.00019,
"isRetrograde": false,
"declination": -1.4159,
"rightAscension": 355.437
}

साइन और घर यहाँ नहीं आते: साइन को Math.floor(longitude / 30) से गणना करो, और घर को houses के कुस्पिड्स से।

घर के कुस्पिड्स (12) और साथ में asc और MC:

{
"system": "P",
"cusps": [118.18, 138.27, ...], // 12 values
"ascendant": 118.18,
"mc": 12.708,
"armc": 11.69,
"vertex": 253.97,
"equatorialAsc": 100.75,
"coAscWK": 81.13,
"coAscMunkasey": 123.7,
"polarAsc": 261.13
}

प्लैनेट्स के बीच के एस्पेक्ट्स की एरे:

{
"planet1": "Sun",
"planet2": "Mercury",
"planet1Id": 0,
"planet2Id": 2,
"type": { // an object, not a string
"name": "Conjunction",
"i18nKey": "aspect_conjunction",
"angle": 0,
"orb": 12,
"symbol": "☌",
"isMajor": true,
"color": "#660480"
},
"exactAngle": 3.365,
"orb": 3.365, // deviation from exact in degrees
"isApplying": true
}

"diurnal" (जन्म के समय सूर्य क्षितिज के ऊपर) या "nocturnal" (क्षितिज के नीचे)। क्लासिक ज्योतिष में उपयोग होता है।

और क्या आज़माएँ:

सिनास्ट्रि: दो लोगों की संगतता:

const synastry = await client.synastry({
chart1: { date: '1990-07-14', time: '14:30:00', timezoneOffset: 3, latitude: 50.45, longitude: 30.52 },
chart2: { date: '1992-03-22', time: '09:15:00', timezoneOffset: 2, latitude: 48.85, longitude: 2.35 },
});
console.log(`Compatibility score: ${synastry.compatibility.score}/100`);

वर्तमान ट्रांज़िट्स नताल चार्ट पर:

const transits = await client.transits({
// birth data
date: '1990-07-14', time: '14:30:00', timezoneOffset: 3,
latitude: 50.4501, longitude: 30.5234,
// transit date
transitDate: '2026-04-14',
});

वास्तविक ट्रांज़िट्स से दैनिक राशिफल:

const horoscope = await client.horoscopeDaily({
date: '1990-07-14', time: '14:30:00', timezoneOffset: 3,
latitude: 50.4501, longitude: 30.5234,
});
console.log(horoscope.text);

पूरा Human Design चार्ट:

const hd = await client.humanDesign({
date: '1990-07-14', time: '14:30:00', timezoneOffset: 3,
latitude: 50.4501, longitude: 30.5234,
});
console.log(`${hd.type} - ${hd.strategy} - Profile ${hd.profile}`);

क्रेडिट में लागत

Section titled “क्रेडिट में लागत”
  • नताल चार्ट (/chart): 20 क्रेडिट
  • सिनास्ट्रि: 50 क्रेडिट
  • ट्रांज़िट्स: 50 क्रेडिट
  • दैनिक राशिफल: 20 क्रेडिट
  • Human Design: 50 क्रेडिट

मुफ़्त प्लान: 10 000 क्रेडिट / महीना = 500 नताल चार्ट, या 200 सिनास्ट्रि, या मिश्रित लोड।

हर प्रतिक्रिया में क्रेडिट वाले हेडर होते हैं:

X-Credits-Used: 20
X-Credits-Remaining: 4980
X-Credits-Reset: 2026-05-01T00:00:00Z

जब क्रेडिट खत्म हो जाएँ - तुम्हें 402 Payment Required मिलेगा। जब rate‑limit (Free: 10 अनुरोध / मिनट) को हिट करो - 429 Too Many Requests हेडर Retry-After के साथ।

SDK टाइप्ड एरर फेंकता है, जिन्हें पकड़ सकते हो:

import { QuotaExceededError, RateLimitError } from '@astroway/sdk';
try {
const chart = await aw.chart.compute(birth);
} catch (err) {
if (err instanceof QuotaExceededError) {
console.log('Upgrade plan or wait for reset');
} else if (err instanceof RateLimitError) {
console.log(`Retry in ${err.retryAfterSeconds ?? 60} seconds`);
} else {
throw err;
}
}

पकड़ना चाहिए सबसे विशिष्ट से लेकर सामान्य तक: सभी ApiError को इनहेरिट करते हैं, इसलिए पहले उस पर चेक करने से बाकी सब पकड़े जाएंगे।

अब तुम्हारे पास है:

  • काम करने वाला API‑की
  • स्थापित SDK
  • पहली नताल चार्ट
  • पर्याप्त उदाहरण, ताकि सिनास्ट्रि, ट्रांज़िट्स, राशिफल जोड़ सको

आगे पढ़ें:

MakSeong · AstroWay

मैं AstroWay API को बनाता हूँ: मैं Swiss Ephemeris को साफ़ REST में लोड करता हूँ और उसके बारे में जानकारी को लिखता हूँ जो वास्तव में महत्वपूर्ण है।

// इस पर बनाएं

वही Swiss Ephemeris जो Solar Fire में है - बस 4 लाइनों के कोड में।

कार्ड के बिना मुफ्त कुंजी। पहले भुगतान तक 5,000 कॉल प्रति माह।

ब्लॉग से और सभी पोस्ट →

Ephemeris 2026-07-19

हम सटीकता को नियंत्रण में कैसे रखते हैं: swetest और NASA के विरुद्ध CI

किसी एस्ट्रो API की सटीकता एफ़ेमेरिस कोड के एक ही रिफ़ैक्टरिंग से आसानी से बिगड़ सकती है। हम सुरक्षा के तरीके को समझाते हैं: ऐप और API के लिए एक ही Swiss Ephemeris कोर, संदर्भ कुंडलियों पर सैकड़ों फ़्रीज़ किए गए स्नैपशॉट, और हर PR का swetest CGI, Kerykeion, Prokerala तथा NASA ग्रहण कैटलॉग के विरुद्ध ट्रायंगुलेशन।

Engineering 2026-07-15

तीन आधिकारिक SDK: TypeScript, Python, PHP कच्चे curl के बजाय

कच्चा HTTP काम करता है, लेकिन टाइप किया गया क्लाइंट घंटों की बचत करता है: पथ स्वत: पूर्णता, अनुरोध और प्रतिक्रिया प्रकार, 408/409/429/5xx के लिए बनाए गए रीट्री और स्टेनलेस-स्टाइल त्रुटि श्रेणी। हम तीन आधिकारिक SDK - @astroway/sdk (npm), astroway (PyPI), astroway/sdk (Packagist) - की जांच करते हैं और यह कैसे एक ओपनएपीआई अनुबंध से उत्पन्न होते हैं।

Industry 2026-06-05

Free Astrology API: Which One Has the Best Free Tier in 2026?

A side-by-side of free tiers across the major astrology APIs - credits, request caps, card requirements - and how much you can actually build for free.