@roxyapi/sdk 1.2.12 → 1.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -23,8 +23,10 @@ const roxy = createRoxy(process.env.ROXY_API_KEY!);
23
23
  Every chart, horoscope, panchang, dasha, dosha, navamsa, KP, synastry, compatibility, and natal endpoint needs `latitude`, `longitude`, and (for Western) `timezone`. **Never ask the user for coordinates.** Always call `roxy.location.searchCities` first.
24
24
 
25
25
  ```typescript
26
- const { data: cities } = await roxy.location.searchCities({ query: { q: 'Mumbai' } });
27
- const { latitude, longitude, timezone } = cities[0];
26
+ const { data } = await roxy.location.searchCities({ query: { q: 'Mumbai' } });
27
+ const { latitude, longitude, utcOffset } = data.cities[0];
28
+ // Use `utcOffset` (decimal: 5.5, -5, 9, ...) as the `timezone` number on chart calls.
29
+ // The city's `timezone` field is the IANA string ("Asia/Kolkata"), not what chart endpoints expect.
28
30
  ```
29
31
 
30
32
  ## Domains
@@ -54,11 +56,11 @@ Type `roxy.` to see all available namespaces. Type `roxy.{domain}.` to see every
54
56
  ### Two-step pattern for coordinate-dependent endpoints
55
57
 
56
58
  ```typescript
57
- const { data: cities } = await roxy.location.searchCities({ query: { q: 'Delhi' } });
58
- const { latitude, longitude, timezone } = cities[0];
59
+ const { data } = await roxy.location.searchCities({ query: { q: 'Delhi' } });
60
+ const { latitude, longitude, utcOffset } = data.cities[0];
59
61
 
60
62
  const { data: chart } = await roxy.astrology.generateNatalChart({
61
- body: { date: '1990-01-15', time: '14:30:00', latitude, longitude, timezone },
63
+ body: { date: '1990-01-15', time: '14:30:00', latitude, longitude, timezone: utcOffset },
62
64
  });
63
65
  ```
64
66
 
@@ -214,6 +216,20 @@ These are the fields AI agents most often get wrong. Copy the format column exac
214
216
 
215
217
  DST matters. If the birth date falls inside a daylight-saving window, use the summer / DST offset. For Vedic endpoints this is rarely an issue (most users are in India, fixed 5.5), but Western natal charts must respect DST at the time of birth.
216
218
 
219
+ ## Astrology domain gotchas for LLMs
220
+
221
+ LLMs hallucinate confidently in this category. These are the specific traps you will hit when writing client code:
222
+
223
+ - **Ayanamsa is server-side in Vedic.** LLMs default to tropical / Western math. Vedic endpoints apply sidereal Lahiri ayanamsa server-side. KP endpoints accept `ayanamsa` of `kp-newcomb` (default), `kp-old`, `lahiri`, or `custom`. Do not try to "correct" server output by subtracting ayanamsa in client code.
224
+ - **Tithi count is 30, not 2.** 15 Shukla (waxing) plus 15 Krishna (waning). Older LLM training data conflates Purnima and Amavasya as single tithis. Our panchang response carries a `paksha` field (`"Shukla"` or `"Krishna"`) plus a tithi number, so there are 30 distinct tithis in a lunar month.
225
+ - **Rahu and Ketu are shadow points, not planets.** They do not appear in a real ephemeris. Endpoints accept `nodeType` of `true-node` or `mean-node` to select which calculation to use.
226
+ - **Nakshatra count is 27.** Abhijit is sometimes treated as a 28th in some schools, but this API uses the standard 27. `roxy.vedicAstrology.listNakshatras()` returns an array of length 27.
227
+ - **Retrograde is per-planet, not global.** Natal chart planets and Vedic `meta` include `isRetrograde: boolean` per planet. KP planet lists use `retrograde`. Never generate "Mercury retrograde globally" UI copy, check the specific planet in the response.
228
+ - **Tarot reversals are a product choice.** `allowReversals: false` on a tarot draw means no reversed cards in that draw, period. It is not cosmically meaningful, it is a config flag.
229
+ - **Angel number lookup works for any positive integer.** Digit-root fallback covers non-canonical numbers. Do not generate validation logic that rejects anything other than `111` / `222` / `333`.
230
+ - **Seed-based daily endpoints are DETERMINISTIC per `(seed, date)` pair.** Same seed plus same date returns the same reading. This is by design for push-notification consistency. Do not describe it as "cached" or retry on stale responses.
231
+ - **Timezone affects Western calculations more than Vedic.** Western natal charts must respect DST at time of birth. Vedic endpoints default to IST (`5.5`) which is DST-free. Use `utcOffset` from the Location API response as your `timezone` value, not the user's current clock.
232
+
217
233
  ## MCP equivalents
218
234
 
219
235
  Every method has a matching MCP tool. The remote MCP server per domain is at `https://roxyapi.com/mcp/{domain}` (Streamable HTTP, no stdio / no self-hosting). Tool names follow `{method}_{path_snake_case}`, for example:
package/README.md CHANGED
@@ -5,9 +5,9 @@
5
5
  [![API Reference](https://img.shields.io/badge/api%20reference-roxyapi.com-blue)](https://roxyapi.com/api-reference)
6
6
  [![Pricing](https://img.shields.io/badge/pricing-roxyapi.com-blue)](https://roxyapi.com/pricing)
7
7
 
8
- TypeScript SDK for [RoxyAPI](https://roxyapi.com). Natal charts, Vedic kundli, numerology, tarot, biorhythm, I Ching, crystals, dreams, and angel numbers. Eleven domains, one API key, fully typed.
8
+ The TypeScript SDK for [Roxy](https://roxyapi.com), the multi-domain spiritual intelligence API. One key, ten domains, fully typed. Western astrology API, Vedic astrology API, numerology API, tarot API, biorhythm API, I Ching API, crystals API, dream interpretation API, and angel numbers API behind a single subscription.
9
9
 
10
- Build astrology apps, kundli matching, tarot platforms, compatibility tools, and daily-horoscope features without writing a single calculation.
10
+ Build a natal chart app, a kundli matching product, a daily horoscope feature, a tarot reading app, a numerology life path calculator, or a spiritual AI agent without writing a single calculation. Calculations are verified against NASA JPL Horizons; interpretations ship in eight languages.
11
11
 
12
12
  ## Install
13
13
 
@@ -25,19 +25,19 @@ import { createRoxy } from '@roxyapi/sdk';
25
25
  const roxy = createRoxy(process.env.ROXY_API_KEY!);
26
26
 
27
27
  // Step 1: geocode the birth city (required for any chart endpoint)
28
- const { data: cities } = await roxy.location.searchCities({
28
+ const { data } = await roxy.location.searchCities({
29
29
  query: { q: 'Mumbai, India' },
30
30
  });
31
- const { latitude, longitude, timezone } = cities[0];
31
+ const { latitude, longitude, utcOffset } = data.cities[0];
32
32
 
33
- // Step 2: Western natal chart
33
+ // Step 2: Western natal chart. Pass utcOffset as the `timezone` number.
34
34
  const { data: chart } = await roxy.astrology.generateNatalChart({
35
- body: { date: '1990-01-15', time: '14:30:00', latitude, longitude, timezone },
35
+ body: { date: '1990-01-15', time: '14:30:00', latitude, longitude, timezone: utcOffset },
36
36
  });
37
37
 
38
- // Vedic kundli uses the same inputs
38
+ // Vedic kundli uses the same inputs (timezone optional, defaults to 5.5 IST)
39
39
  const { data: kundli } = await roxy.vedicAstrology.generateBirthChart({
40
- body: { date: '1990-01-15', time: '14:30:00', latitude, longitude },
40
+ body: { date: '1990-01-15', time: '14:30:00', latitude, longitude, timezone: utcOffset },
41
41
  });
42
42
  ```
43
43
 
@@ -49,7 +49,10 @@ Every chart, horoscope, panchang, dasha, dosha, navamsa, KP, synastry, compatibi
49
49
 
50
50
  ```typescript
51
51
  const { data } = await roxy.location.searchCities({ query: { q: 'Tokyo' } });
52
- const { latitude, longitude, timezone } = data[0];
52
+ const { latitude, longitude, utcOffset } = data.cities[0];
53
+ // Pass utcOffset (5.5, -5, 9, ...) as `timezone` to astrology endpoints.
54
+ // The `timezone` field on the city is the IANA string ("Asia/Tokyo"), keep
55
+ // that for your own date formatting, not for RoxyAPI chart calls.
53
56
  ```
54
57
 
55
58
  ## Domains
@@ -70,94 +73,193 @@ const { latitude, longitude, timezone } = data[0];
70
73
  | `roxy.usage` | 1 | API usage stats, rate limits, subscription info |
71
74
  <!-- END:DOMAINS -->
72
75
 
73
- ## Recipes
76
+ ## Most-used endpoints
74
77
 
75
- ### Daily horoscope (wellness, news, lifestyle apps)
78
+ The highest-demand endpoints by domain, in the order you are most likely to ship them. Each block shows the most-searched API call in that domain so you can pick the feature that drives the most user value first. Full endpoint catalog in the [API reference](https://roxyapi.com/api-reference).
76
79
 
77
- ```typescript
78
- const { data } = await roxy.astrology.getDailyHoroscope({
79
- path: { sign: 'aries' },
80
- });
81
- // data.overview, data.love, data.career, data.luckyNumber, ...
82
- ```
80
+ ### 1. Western astrology API (natal chart, daily horoscope, synastry)
83
81
 
84
- ### Vedic kundli (India market, matrimonial, muhurat)
82
+ The global astrology app market is $6.27B and almost entirely Western. These endpoints power zodiac dating apps, Co-Star-style natal chart products, daily horoscope features, and lunar-cycle wellness apps.
85
83
 
86
84
  ```typescript
87
- const { data: cities } = await roxy.location.searchCities({ query: { q: 'Delhi' } });
88
- const { latitude, longitude } = cities[0];
85
+ // Natal chart. The #1 Western query, called on every onboarding.
86
+ const { data: natal } = await roxy.astrology.generateNatalChart({
87
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209, timezone: 5.5 },
88
+ });
89
89
 
90
- const { data: kundli } = await roxy.vedicAstrology.generateBirthChart({
91
- body: { date: '1990-01-15', time: '14:30:00', latitude, longitude },
90
+ // Daily horoscope. Highest per-user call frequency in the catalog, drives DAUs and push.
91
+ const { data: horoscope } = await roxy.astrology.getDailyHoroscope({ path: { sign: 'aries' } });
92
+ // horoscope.overview, horoscope.love, horoscope.career, horoscope.luckyNumber
93
+
94
+ // Synastry. The dating-app pro-tier feature, full inter-aspect analysis between two charts.
95
+ const { data: synastry } = await roxy.astrology.calculateSynastry({
96
+ body: {
97
+ person1: { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20, timezone: 5.5 },
98
+ person2: { date: '1992-07-22', time: '09:00:00', latitude: 19.07, longitude: 72.87, timezone: 5.5 },
99
+ },
92
100
  });
101
+ // synastry.compatibilityScore, synastry.interAspects, synastry.strengths
102
+
103
+ // Moon phase. Viral for wellness, cycle-tracking, and meditation apps.
104
+ const { data: moon } = await roxy.astrology.getCurrentMoonPhase({});
93
105
  ```
94
106
 
95
- ### Panchang (daily almanac, ritual planner)
107
+ ### 2. Vedic astrology API (kundli, panchang, dasha, Guna Milan, KP)
108
+
109
+ The depth moat. India astrology market: $163M in 2024, projected $1.8B by 2030 (49% CAGR). Kundli, panchang, dasha, dosha, and KP are the five Google-dominant queries for every matrimonial platform, kundli generator, and muhurat app.
96
110
 
97
111
  ```typescript
98
- const { data } = await roxy.vedicAstrology.getDetailedPanchang({
112
+ // Vedic kundli. Top India astrology keyword. Entry point for every Jyotish product.
113
+ const { data: kundli } = await roxy.vedicAstrology.generateBirthChart({
114
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209, timezone: 5.5 },
115
+ });
116
+
117
+ // Panchang. Tithi, nakshatra, yoga, karana, rahu kaal, abhijit muhurta in one call.
118
+ const { data: panchang } = await roxy.vedicAstrology.getDetailedPanchang({
99
119
  body: { date: '2026-04-22', latitude: 28.6139, longitude: 77.209 },
100
120
  });
101
- // data.tithi, data.nakshatra, data.rahuKaal, data.abhijitMuhurta, ...
102
- ```
103
121
 
104
- ### Guna Milan (matrimonial matching)
122
+ // Vimshottari dasha. Highest-value single-shot Vedic query.
123
+ const { data: dasha } = await roxy.vedicAstrology.getCurrentDasha({
124
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209, timezone: 5.5 },
125
+ });
105
126
 
106
- ```typescript
107
- const person1 = { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20 };
108
- const person2 = { date: '1992-07-22', time: '09:00:00', latitude: 19.07, longitude: 72.87 };
127
+ // Mangal Dosha. Most-asked matrimonial question in India.
128
+ const { data: dosha } = await roxy.vedicAstrology.checkManglikDosha({
129
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209, timezone: 5.5 },
130
+ });
131
+
132
+ // Guna Milan. 36-point Ashtakoota matrimonial compatibility score.
133
+ const { data: milan } = await roxy.vedicAstrology.calculateGunMilan({
134
+ body: {
135
+ person1: { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20 },
136
+ person2: { date: '1992-07-22', time: '09:00:00', latitude: 19.07, longitude: 72.87 },
137
+ },
138
+ });
109
139
 
110
- const { data } = await roxy.vedicAstrology.calculateGunMilan({
111
- body: { person1, person2 },
140
+ // KP ruling planets. Horary answers for "will X happen" questions in real time.
141
+ const { data: kp } = await roxy.vedicAstrology.getKpRulingPlanets({
142
+ body: { latitude: 28.6139, longitude: 77.209, timezone: 5.5 },
112
143
  });
113
- // data.total, data.maxScore (36), data.isCompatible, data.breakdown[8]
114
144
  ```
115
145
 
116
- ### Numerology life path (numerology calculators)
146
+ ### 3. Numerology API (life path, full chart, personal year)
147
+
148
+ Commodity content with durable demand. `life path number calculator` is among the highest-volume spiritual searches globally. Works without birth time, the easiest domain to integrate.
117
149
 
118
150
  ```typescript
119
- const { data } = await roxy.numerology.calculateLifePath({
151
+ // Life Path. The #1 numerology keyword, every calculator page starts here.
152
+ const { data: lp } = await roxy.numerology.calculateLifePath({
120
153
  body: { year: 1990, month: 1, day: 15 },
121
154
  });
122
- // data.number, data.type, data.hasKarmicDebt, data.meaning
155
+ // lp.number, lp.type ("single" | "master"), lp.meaning
156
+
157
+ // Full numerology chart. Premium one-shot: all six core numbers plus karmic, personal year.
158
+ const { data: chart } = await roxy.numerology.generateNumerologyChart({
159
+ body: { fullName: 'Jane Smith', year: 1990, month: 1, day: 15 },
160
+ });
161
+
162
+ // Personal Year. Annual forecast, drives January traffic spikes.
163
+ const { data: pyear } = await roxy.numerology.calculatePersonalYear({
164
+ body: { month: 1, day: 15, year: 2026 },
165
+ });
123
166
  ```
124
167
 
125
- ### Tarot Celtic Cross (premium-tier tarot feature)
168
+ ### 4. Tarot API (daily card, Celtic Cross, three-card, yes / no)
169
+
170
+ High search volume, evergreen. The tarot card database is the highest per-endpoint call count in the catalog because apps fetch once and cache.
126
171
 
127
172
  ```typescript
128
- const { data } = await roxy.tarot.castCelticCross({
129
- body: { question: 'What should I focus on?' },
173
+ // Daily card. Stickiest tarot feature. Seed per user for deterministic once-per-day behavior.
174
+ const { data: card } = await roxy.tarot.getDailyCard({ body: { seed: 'user-42' } });
175
+ // card.card.name, card.card.imageUrl, card.interpretation
176
+
177
+ // Celtic Cross. Professional-reader spread. Premium-tier, ten positions.
178
+ const { data: cc } = await roxy.tarot.castCelticCross({
179
+ body: { question: 'What should I focus on?', seed: 'user-42' },
180
+ });
181
+
182
+ // Three-card past-present-future. Most-drawn spread on every tarot platform.
183
+ const { data: three } = await roxy.tarot.castThreeCard({
184
+ body: { question: 'My next quarter', seed: 'user-42' },
130
185
  });
131
- // data.positions[10], data.reading
186
+
187
+ // Yes / No. Impulse micro-query, highest conversion-to-first-call on tarot surfaces.
188
+ const { data: answer } = await roxy.tarot.castYesNo({ body: { question: 'Should I take the offer?' } });
189
+ // answer.answer ("Yes" | "No" | "Maybe"), answer.strength
132
190
  ```
133
191
 
134
- ### Daily biorhythm (wellness, productivity, sports apps)
192
+ ### 5. Biorhythm API (daily check-in, forecast, compatibility)
193
+
194
+ Zero competition domain. Steady search volume with the top Google result being a static calculator page. Pure land-grab for wellness, productivity, sports, and couples apps.
135
195
 
136
196
  ```typescript
137
- const { data } = await roxy.biorhythm.getDailyBiorhythm({
138
- body: { seed: 'user-123' },
197
+ // Daily biorhythm. Physical, emotional, intellectual, intuitive, plus seven extended cycles.
198
+ const { data: bio } = await roxy.biorhythm.getDailyBiorhythm({
199
+ body: { seed: 'user-1', date: '2026-04-23' },
139
200
  });
201
+
202
+ // Multi-day forecast. Best-day / worst-day planner for calendar and coaching products.
203
+ const { data: forecast } = await roxy.biorhythm.getForecast({
204
+ body: { birthDate: '1990-01-15', startDate: '2026-04-01', endDate: '2026-04-30' },
205
+ });
206
+ ```
207
+
208
+ ### 6. I Ching API (daily hexagram, coin cast, 64-hexagram catalog)
209
+
210
+ Meditation apps, decision-making tools, and wisdom chatbots. `i ching API` and `hexagram API` are the keywords.
211
+
212
+ ```typescript
213
+ // Cast a reading. Active divination, primary hexagram plus changing lines and transformed hexagram.
214
+ const { data: reading } = await roxy.iching.castReading({ query: { seed: 'user-42' } });
215
+ // reading.hexagram, reading.changingLinePositions, reading.resultingHexagram
216
+
217
+ // Hexagram catalog. Cache once for all 64 hexagrams.
218
+ const { data: hexagrams } = await roxy.iching.listHexagrams({});
219
+ // hexagrams.hexagrams has 64 entries
140
220
  ```
141
221
 
142
- ### I Ching cast (decision-making, meditation)
222
+ ### 7. Crystals API (by zodiac, by chakra, birthstone)
223
+
224
+ Crystal retail and metaphysical shops use these to build "crystals for [sign]" and "[chakra] chakra stones" pages.
143
225
 
144
226
  ```typescript
145
- const { data } = await roxy.iching.castReading();
146
- // data.hexagram, data.changingLinePositions, data.resultingHexagram
227
+ // By zodiac. Highest-search crystal query pattern.
228
+ const { data: bySign } = await roxy.crystals.getCrystalsByZodiac({ path: { sign: 'scorpio' } });
229
+ // bySign.crystals is a list of id, name, color, chakra, properties
230
+
231
+ // By chakra. Second-highest crystal query pattern.
232
+ const { data: byChakra } = await roxy.crystals.getCrystalsByChakra({ path: { chakra: 'heart' } });
233
+
234
+ // Birthstone. Evergreen gift and jewelry SEO.
235
+ const { data: birthstone } = await roxy.crystals.getBirthstones({ path: { month: 4 } });
147
236
  ```
148
237
 
149
- ### Dream symbol lookup (journaling, self-discovery)
238
+ ### 8. Dream interpretation API (symbol dictionary, search)
239
+
240
+ Thousands of dream symbols. `dream meaning` is among the highest-volume spiritual searches on Google. Journal apps, AI therapy chatbots, and self-discovery products are the buyers.
150
241
 
151
242
  ```typescript
152
- const { data } = await roxy.dreams.getDreamSymbol({ path: { id: 'flying' } });
243
+ // Symbol detail. Every "what does it mean to dream about X" page lands here.
244
+ const { data: symbol } = await roxy.dreams.getDreamSymbol({ path: { id: 'flying' } });
245
+ // symbol.id, symbol.name, symbol.meaning
246
+
247
+ // Symbol search. Chatbots cache the dictionary locally after one call.
248
+ const { data: results } = await roxy.dreams.searchDreamSymbols({ query: { q: 'flying' } });
249
+ // results.symbols is an array of matching symbols
153
250
  ```
154
251
 
155
- ### Angel number meaning (viral content, spiritual apps)
252
+ ### 9. Angel Numbers API (1111, 222, 333 meanings plus universal lookup)
253
+
254
+ Gen Z spiritual-tok fuel. `111 meaning`, `222 meaning`, `333 angel number` are evergreen viral queries with massive shareability.
156
255
 
157
256
  ```typescript
158
- const { data } = await roxy.angelNumbers.getAngelNumber({
159
- path: { number: '1111' },
160
- });
257
+ // By number. Every "meaning of 1111" page is backed by this.
258
+ const { data: angel } = await roxy.angelNumbers.getAngelNumber({ path: { number: '1111' } });
259
+ // angel.meaning.spiritual, angel.meaning.love, angel.affirmation
260
+
261
+ // Universal lookup. Works for any positive integer via digit-root fallback.
262
+ const { data: anyNumber } = await roxy.angelNumbers.analyzeNumberSequence({ query: { number: '4242' } });
161
263
  ```
162
264
 
163
265
  ## Authentication
package/dist/factory.cjs CHANGED
@@ -2821,7 +2821,7 @@ var Roxy = class _Roxy extends HeyApiClient {
2821
2821
  };
2822
2822
 
2823
2823
  // src/version.ts
2824
- var VERSION = "1.2.12";
2824
+ var VERSION = "1.2.14";
2825
2825
 
2826
2826
  // src/factory.ts
2827
2827
  function createRoxy(auth) {
package/dist/factory.js CHANGED
@@ -1986,7 +1986,7 @@ var Roxy = class _Roxy extends HeyApiClient {
1986
1986
  };
1987
1987
 
1988
1988
  // src/version.ts
1989
- var VERSION = "1.2.12";
1989
+ var VERSION = "1.2.14";
1990
1990
 
1991
1991
  // src/factory.ts
1992
1992
  function createRoxy(auth) {
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.2.12";
1
+ export declare const VERSION = "1.2.14";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roxyapi/sdk",
3
- "version": "1.2.12",
3
+ "version": "1.2.14",
4
4
  "description": "TypeScript SDK for Roxy — the multi-domain spiritual intelligence API",
5
5
  "type": "module",
6
6
  "exports": {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.2.12';
1
+ export const VERSION = '1.2.14';