Learn by building
Developer projects
Six practical ways to build with Cosmic Ephemeris. Start with a real result, download the code, and run it on your server.
Every project uses existing APIs and is available on the Free plan. You need an API key to run every project. Preview charts, download the sample calendar, or inspect the saved MCP response without a key. To generate your own results, create a verified account, make a scoped API key, and save it in a private .env file as shown in each tutorial.
One key can run all six tutorials. When creating it in API Keys, select astro:natal-svg, astro:moon-phases, astro:synastry-svg, astro:transit-svg, astro:varga-svg and astro:birth-chart. Each guide also lists its individual scope. Keep the same key private in each project’s .env file.
- 01
Birth-chart SVG
Generate a natal chart in one request and display the SVG in your app.
Build this project → - 02
Moon-phase calendar
Make a monthly calendar of the four primary Moon phases, then export the events as an iCalendar file. One request returns both the event data and the download.
Build this project → - 03
Two-person chart comparison
Place two synthetic birth charts on one wheel and show the major aspects between them. Use the result as a visual feature in your relationship or astrology app.
Build this project → - 04
Birth chart with transits
Combine a natal chart with planetary positions for another date. The script uses today’s UTC date by default, or accepts a date you choose.
Build this project → - 05
Vedic D1 and D9 charts
Render the same synthetic birth details as a D1 Rashi chart and a D9 Navamsha chart. Keep Lahiri ayanamsa explicit and choose a North or South Indian layout.
Build this project → - 06
MCP calculation walkthrough
Send one authenticated tools/call request to the Cosmic Ephemeris MCP server and save the structured result. This example uses Node’s built-in fetch and needs no extra package.
Build this project →
From sample to your application
The downloadable examples run on Node.js 22+. Keep your API key and personal input data on your server, then display the returned images or data in your own interface. Each guide explains the request count, output files and settings.