AstroWay/api v2.204.0 · el
όλες οι υπηρεσίες λειτουργούν κανονικά

Horoscope API Tutorial: Build a Daily Horoscope Feature

Add daily, weekly and monthly horoscopes to your app via API - sign-based text vs transit-based personalization - with TypeScript and Python code.

There are two kinds of “horoscope API”. One returns a block of text per zodiac sign. The other computes the actual sky for a person and tells you what’s really transiting their chart. This tutorial builds both with AstroWay, so you can pick the right one for your app.

The /horoscope/daily endpoint takes a sign and returns ready-to-render text. Weekly, monthly and yearly work the same way:

// TypeScript - npm install @astroway/sdk
import { Astroway } from '@astroway/sdk';
const aw = new Astroway({ apiKey: process.env.ASTROWAY_API_KEY! });
const daily = await aw.horoscope.daily({ sign: 'leo', language: 'en' });
console.log(daily.text);
# Python - pip install astroway
from astroway import Astroway
aw = Astroway(api_key="aw_live_...")
daily = aw.horoscope.daily({"sign": "leo", "language": "en"})
print(daily.text)

Twelve calls (one per sign) gives you a full daily set to cache and serve to every user. Cheap, simple, and good enough for a widget or a newsletter.

Transit-based horoscopes (the personalized one)

Section titled “Transit-based horoscopes (the personalized one)”

Sign-based text is the same for a twelfth of the planet. If you want “your horoscope” - driven by the user’s own birth chart - compute their transits for the day. This is where a real ephemeris matters: the API returns the actual aspects forming, not a paragraph an LLM guessed.

const transits = await aw.transits.compute({
date: '1990-07-14', time: '14:30:00', timezoneOffset: 3,
latitude: 50.45, longitude: 30.52,
targetDate: '2027-01-01',
});
for (const hit of transits.aspects) {
console.log(`${hit.transiting} ${hit.aspect} natal ${hit.natal}`);
}

Feed those aspects into your own copy templates, or into the AI interpretation endpoints for natural-language output with safety guardrails. Either way the underlying event (“Saturn square natal Sun, exact today”) is a calculation, not a hallucination - AI-only horoscope APIs routinely drift dates by days.

The cadence endpoints share the same shape - swap the method:

await aw.horoscope.daily({ sign: 'leo' });
await aw.horoscope.weekly({ sign: 'leo' });
await aw.horoscope.monthly({ sign: 'leo' });
await aw.horoscope.yearly({ sign: 'leo' });

For a “love horoscope” feature, /horoscope/compatibility takes two signs.

If you’re rendering into a chat or a typewriter UI, stream the AI horoscope instead of waiting for the full response:

for await (const chunk of aw.streamSSE('/horoscope/daily', { sign: 'leo' })) {
process.stdout.write(chunk);
}

A sign-based horoscope is a few credits; transits cost more because they compute the sky. On the free tier (10,000 credits/month) you can generate and cache all twelve daily signs every day with plenty to spare. Cache sign-based text per (sign, date); only the transit-based, per-user path needs a live call.

MakSeong · AstroWay

Δημιουργώ το AstroWay API: τυλίγω το Swiss Ephemeris σε καθαρό REST και γράφω για τις βαρετές λεπτομέρειες που είναι πραγματικά σημαντικές.

// δημιούργησε πάνω σε αυτό

Αυτή η ίδια Swiss Ephemeris που υπάρχει στο Solar Fire - σε 4 γραμμές κώδικα.

Δωρεάν κλειδί χωρίς κάρτα. 5.000 αιτήματα ανά μήνα μέχρι την πρώτη πληρωμή.

Περισσότερα από το blog όλες οι δημοσιεύσεις →

Ephemeris 2026-07-19

Πώς διατηρούμε την ακρίβεια υπό έλεγχο: CI εναντίον swetest και NASA

Η ακρίβεια στο astro-API υποβαθμίζεται εύκολα από μια μόνο ανασυγκρότηση των εφεμερίδων. Αναλύουμε την προστασία: ένας πυρήνας Swiss Ephemeris για την εφαρμογή και το API, εκατοντάδες παγωμένα snapshots σε πρότυπους χάρτες και τριγωνοποίηση κάθε PR εναντίον swetest CGI, Kerykeion, Prokerala και του καταλόγου σκιών της NASA.

Engineering 2026-07-15

Τρία επίσημα SDK: TypeScript, Python, PHP αντί για ακατέργαστο curl

Ακατέργαστο HTTP λειτουργεί, αλλά ο τυποποιημένος πελάτης εξοικονομεί ώρες: αυτόματη συμπλήρωση διαδρομών, τύποι αιτήματος και απάντησης, ενσωματωμένο retry σε 408/409/429/5xx και ιεραρχία σφαλμάτων τύπου Stainless. Αναλύουμε τρία επίσημα SDK - @astroway/sdk (npm), astroway (PyPI), astroway/sdk (Packagist) - και πώς δημιουργήθηκαν από ένα OpenAPI συμβόλαιο.

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.