{"id":51198221,"url":"https://github.com/astroway/examples","last_synced_at":"2026-06-27T22:31:28.732Z","repository":{"id":361706451,"uuid":"1254192405","full_name":"astroway/examples","owner":"astroway","description":"Copy-paste integration recipes for the AstroWay astrology API — chat bots, LLM tools, edge caching, data export and drop-in services.","archived":false,"fork":false,"pushed_at":"2026-05-31T21:58:39.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-31T23:22:46.373Z","etag":null,"topics":["api-examples","astrology","astrology-api","astroway","chatbot","code-examples","edge-caching","horoscope","llm","mcp","natal-chart","recipes"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astroway.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-30T08:55:00.000Z","updated_at":"2026-05-31T21:58:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/astroway/examples","commit_stats":null,"previous_names":["astroway/examples"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/astroway/examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astroway%2Fexamples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astroway%2Fexamples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astroway%2Fexamples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astroway%2Fexamples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astroway","download_url":"https://codeload.github.com/astroway/examples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astroway%2Fexamples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34870654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-27T02:00:06.362Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-examples","astrology","astrology-api","astroway","chatbot","code-examples","edge-caching","horoscope","llm","mcp","natal-chart","recipes"],"created_at":"2026-06-27T22:31:27.976Z","updated_at":"2026-06-27T22:31:28.721Z","avatar_url":"https://github.com/astroway.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AstroWay astrology API — examples gallery\n\nTen copy-paste integration recipes for the [AstroWay astrology API](https://api.astroway.info) — chat bots, LLM tools, edge caching, data export and drop-in services. Each file is self-contained: install one or two deps, set `ASTROWAY_API_KEY`, run.\n\nGet a key at [api.astroway.info/dashboard/sign-up](https://api.astroway.info/dashboard/sign-up) — **10,000 credits/month free**, no card.\n\n| # | Recipe | Stack | File |\n|---|---|---|---|\n| 1 | Daily horoscope SMS via Twilio | Node + `@astroway/sdk` + twilio | [`ts/01-daily-horoscope-twilio.ts`](ts/01-daily-horoscope-twilio.ts) |\n| 2 | Discord bot — `/chart` slash command | Node + discord.js | [`ts/02-discord-bot.ts`](ts/02-discord-bot.ts) |\n| 3 | OpenAI function-calling: GPT reads charts | Node + openai | [`ts/03-openai-function-calling.ts`](ts/03-openai-function-calling.ts) |\n| 4 | Slack bot — `/synastry` compatibility | Node + @slack/bolt | [`ts/04-slack-bot-synastry.ts`](ts/04-slack-bot-synastry.ts) |\n| 5 | Notion: birthday → natal data on the page | Node + @notionhq/client | [`ts/05-notion-natal-cards.ts`](ts/05-notion-natal-cards.ts) |\n| 6 | Cloudflare Worker: edge chart cache | Cloudflare Workers | [`ts/06-cloudflare-worker.ts`](ts/06-cloudflare-worker.ts) |\n| 7 | Claude MCP tool wrapper | `@astroway/mcp` | [`ts/07-claude-mcp-tools.ts`](ts/07-claude-mcp-tools.ts) |\n| 8 | Daily forecast CSV export | Python + pandas | [`py/08-forecast-csv-export.py`](py/08-forecast-csv-export.py) |\n| 9 | Streamlit: birth-time rectification UI | Python + Streamlit | [`py/09-streamlit-rectification.py`](py/09-streamlit-rectification.py) |\n| 10 | FastAPI compatibility-scoring service | Python + FastAPI | [`py/10-fastapi-compatibility.py`](py/10-fastapi-compatibility.py) |\n\n## Setup\n\nTypeScript examples use the official SDK [`@astroway/sdk`](https://www.npmjs.com/package/@astroway/sdk):\n\n```bash\nnpm install @astroway/sdk\nexport ASTROWAY_API_KEY=aw_live_yourkey   # or an aw_test_ sandbox key\nnpx tsx ts/01-daily-horoscope-twilio.ts\n```\n\nPython examples use [`astroway`](https://pypi.org/project/astroway/):\n\n```bash\npip install astroway\nexport ASTROWAY_API_KEY=aw_live_yourkey\npython py/08-forecast-csv-export.py 1990-05-15 14:30 Kyiv 2026\n```\n\nPer-example dependencies (twilio, discord.js, pandas, …) are listed at the top of each file.\n\n## A note on cities and timezones\n\nAstroWay computes from **coordinates and a UTC offset**, not city names — it does not geocode. The recipes that take a city resolve it themselves with [Open-Meteo's geocoder](https://open-meteo.com/en/docs/geocoding-api) (free, no key) and derive the historically-correct offset from the IANA timezone, so a 1990 Kyiv birth gets UTC+4, a 2000 New York birth gets UTC−5, and so on. Copy that `geocode()` helper into your own code, or pass `latitude` / `longitude` / `timezoneOffset` directly if you already have them.\n\n## Conventions\n\n- Every example is one file, no build step (run TypeScript with `tsx`).\n- Inputs come from env vars or CLI args — the only hardcoded data is the demo birth (1990-05-15, Kyiv).\n- Planet positions come back as absolute ecliptic longitude (0–360°); convert to sign + degree with `floor(lon / 30)` → sign index, `lon % 30` → degree-in-sign.\n- The Ascendant is the first house cusp: `chart.houses.cusps[0]`.\n\n## Contributing\n\nPRs welcome. Keep new examples self-contained, numbered (`11-…`), commented on *why* not *what*, and verified against a free-tier key before submitting.\n\n## Links\n\n- 📘 API docs: \u003chttps://api.astroway.info/docs/\u003e\n- 📦 TypeScript SDK: [`@astroway/sdk`](https://www.npmjs.com/package/@astroway/sdk)\n- 🐍 Python SDK: [`astroway`](https://pypi.org/project/astroway/)\n- 🤖 MCP server: [`@astroway/mcp`](https://www.npmjs.com/package/@astroway/mcp)\n- 💰 Pricing: \u003chttps://api.astroway.info/pricing/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastroway%2Fexamples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastroway%2Fexamples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastroway%2Fexamples/lists"}