Guides
Guides & tutorials
These guides cover building real integrations against AstrologyAPI: chart apps, matching, bots, and PDF reports. They also cover how to feed API output into an LLM.
Other guides cover the details that decide whether your charts are right: timezones, unknown birth times, and going to production. These guides are written for developers who are integrating the API, not evaluating it.
Build something
Start with the free astrology API
Get your API key and free credits, then make your first call in a few minutes with curl, Node or Python.
Build a complete kundli, step by step
Go from a place name to charts, the current dasha, and planet strength. Every call in one chain, with the exact fields.
Build a Western birth chart, step by step
Go from a place name to a full natal chart: planets, houses, aspects, a wheel chart image, and text reports.
Build a birth chart app with Next.js
Call the birth details and planetary position endpoints from a Next.js API route and render the chart in the browser.
Birth chart API in Python
Get coordinates and the UTC offset, call the chart endpoint, and print the Sun, Moon and rising sign in Python.
Birth chart API in JavaScript (Node.js)
The same birth chart flow in plain Node.js with fetch, plus a small Express route.
Add Kundli matching to your app
Send two birth records to the ashtakoot endpoint and show a compatibility score to your users.
Build a daily horoscope Telegram bot
Wire a Telegram bot backend to the sun sign prediction endpoint and post a daily message to subscribers.
Add daily horoscopes to your app
Fetch daily, weekly and monthly horoscopes for all 12 signs, cache them once a day, and serve them fast.
Generate your first PDF report
Send birth details to a PDF endpoint and get back a downloadable horoscope report.
Add palm reading to your app
Upload a palm photo, get a palm id back, and read structured analysis from the palmistry endpoints.
Integrate Astro Chat into your app
Send a saved birth profile and question to the Chat API, then continue the conversation with session IDs.
Get the details right
Timezones, DST, and historical birth data
Convert a birth time and place into the decimal UTC offset the API expects, including daylight saving edge cases.
When the birth time is unknown
See which calculations need an exact birth time and which still work with only a date.
Calculate the ascendant (rising sign)
Get the Vedic lagna or the Western rising sign as JSON, with its degree, and turn it into a sign and degree.
Credits, errors, and going to production
Handle credit limits and error responses before you move from testing to production traffic.
Ayanamsha, house systems, and why charts differ
Six ayanamsha systems, two zodiacs, and several house systems: why two apps disagree about the same birth.
Access tokens vs User ID + API key
The two ways to authenticate, how each request looks, and why new projects should start with tokens.
Pay as you go with a wallet
Top up a wallet, create an access token, and call any API without a subscription.
Evaluate and migrate
How to choose an astrology API
The questions to ask before committing to a provider, and how to test each one in an afternoon.
Move from self-hosted Swiss Ephemeris
Map common swisseph workflows to API endpoints, and see what changes about timezones and caching.
AI and automation
Ground an LLM on computed charts
Feed computed chart data into a prompt so an LLM explains a birth chart instead of guessing at planetary positions.
Build an AI astrologer with tool calling
Give Claude a birth chart tool so it reads real planet positions instead of guessing, with Python and Node code.
Astrology terms and API fields
Look up what each astrology term means and which endpoint and response field returns it.