@roxyapi/sdk 1.2.84 → 1.2.86
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 +55 -34
- package/README.md +256 -190
- package/dist/client/client.gen.d.ts +1 -1
- package/dist/client/client.gen.d.ts.map +1 -1
- package/dist/client/index.d.ts +10 -10
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/types.gen.d.ts +4 -4
- package/dist/client/types.gen.d.ts.map +1 -1
- package/dist/client/utils.gen.d.ts +2 -2
- package/dist/client/utils.gen.d.ts.map +1 -1
- package/dist/client.gen.d.ts +2 -2
- package/dist/client.gen.d.ts.map +1 -1
- package/dist/core/bodySerializer.gen.d.ts +1 -1
- package/dist/core/bodySerializer.gen.d.ts.map +1 -1
- package/dist/core/serverSentEvents.gen.d.ts +1 -1
- package/dist/core/serverSentEvents.gen.d.ts.map +1 -1
- package/dist/core/types.gen.d.ts +2 -2
- package/dist/core/types.gen.d.ts.map +1 -1
- package/dist/core/utils.gen.d.ts +1 -1
- package/dist/core/utils.gen.d.ts.map +1 -1
- package/dist/factory.cjs +9 -9
- package/dist/factory.d.ts +2 -2
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +9 -9
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/sdk.gen.d.ts +10 -10
- package/dist/sdk.gen.d.ts.map +1 -1
- package/dist/types.gen.d.ts +42 -64
- package/dist/types.gen.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/docs/llms-full.txt +32 -28
- package/package.json +23 -11
- package/src/client/client.gen.ts +5 -5
- package/src/client/index.ts +10 -10
- package/src/client/types.gen.ts +4 -4
- package/src/client/utils.gen.ts +6 -6
- package/src/client.gen.ts +2 -2
- package/src/core/bodySerializer.gen.ts +1 -1
- package/src/core/serverSentEvents.gen.ts +1 -1
- package/src/core/types.gen.ts +2 -2
- package/src/core/utils.gen.ts +2 -2
- package/src/factory.ts +4 -4
- package/src/index.ts +2 -2
- package/src/sdk.gen.ts +12 -12
- package/src/types.gen.ts +42 -64
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -34,7 +34,8 @@ import { createRoxy } from '@roxyapi/sdk';
|
|
|
34
34
|
|
|
35
35
|
const roxy = createRoxy(process.env.ROXY_API_KEY!);
|
|
36
36
|
|
|
37
|
-
const { data } = await roxy.astrology.getDailyHoroscope({ path: { sign: 'aries' } });
|
|
37
|
+
const { data, error } = await roxy.astrology.getDailyHoroscope({ path: { sign: 'aries' } });
|
|
38
|
+
if (error) throw error;
|
|
38
39
|
console.log(data.overview, data.love, data.luckyNumber);
|
|
39
40
|
```
|
|
40
41
|
|
|
@@ -47,38 +48,25 @@ import { createRoxy } from '@roxyapi/sdk';
|
|
|
47
48
|
|
|
48
49
|
const roxy = createRoxy(process.env.ROXY_API_KEY!);
|
|
49
50
|
|
|
50
|
-
// Step 1: geocode the birth city
|
|
51
|
-
const { data } = await roxy.location.searchCities({
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
const { latitude, longitude, timezone } = data.cities[0];
|
|
51
|
+
// Step 1: geocode the birth city once. Every chart endpoint takes these three values.
|
|
52
|
+
const { data: place, error: lookupError } = await roxy.location.searchCities({ query: { q: 'London' } });
|
|
53
|
+
if (lookupError) throw lookupError;
|
|
54
|
+
const { latitude, longitude, timezone } = place.cities[0];
|
|
55
55
|
|
|
56
|
-
// Step 2: Western natal chart. `timezone`
|
|
57
|
-
//
|
|
58
|
-
// the chart
|
|
56
|
+
// Step 2: a Western natal chart. `timezone` is the IANA string from the lookup
|
|
57
|
+
// ("Europe/London"); the server resolves it to the DST-correct offset for the
|
|
58
|
+
// date of the chart.
|
|
59
59
|
const { data: chart } = await roxy.astrology.generateNatalChart({
|
|
60
60
|
body: { date: '1990-01-15', time: '14:30:00', latitude, longitude, timezone },
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
-
//
|
|
63
|
+
// Step 3: the same birth as a Vedic kundli. Same inputs, sidereal zodiac.
|
|
64
64
|
const { data: kundli } = await roxy.vedicAstrology.generateBirthChart({
|
|
65
65
|
body: { date: '1990-01-15', time: '14:30:00', latitude, longitude, timezone },
|
|
66
66
|
});
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
`createRoxy` sets the base URL (`https://roxyapi.com/api/v2`) and injects the auth header and SDK identification header on every request.
|
|
70
|
-
|
|
71
|
-
## Location first
|
|
72
|
-
|
|
73
|
-
Every chart, horoscope, panchang, dasha, dosha, navamsa, KP, synastry, compatibility, and natal endpoint needs `latitude`, `longitude`, and (for Western) `timezone`. **Never ask users to type coordinates.** Call `roxy.location.searchCities({ query: { q: city } })` first, then feed the result into the chart method.
|
|
74
|
-
|
|
75
|
-
```typescript
|
|
76
|
-
const { data } = await roxy.location.searchCities({ query: { q: 'Tokyo' } });
|
|
77
|
-
const { latitude, longitude, timezone } = data.cities[0];
|
|
78
|
-
// `timezone` is the IANA string ("Asia/Tokyo"). Pass it straight into any
|
|
79
|
-
// chart endpoint and the server resolves it to the DST-correct offset for the
|
|
80
|
-
// chart's date. If you prefer a decimal, `data.cities[0].utcOffset` also works.
|
|
81
|
-
```
|
|
69
|
+
`createRoxy` sets the base URL (`https://roxyapi.com/api/v2`) and injects the auth header and SDK identification header on every request. Every method returns `{ data, error, response }`; check `error` first, or pass `throwOnError: true` in the call options to have failures throw and `data` typed as always present (see Error handling).
|
|
82
70
|
|
|
83
71
|
## Domains
|
|
84
72
|
|
|
@@ -86,10 +74,10 @@ const { latitude, longitude, timezone } = data.cities[0];
|
|
|
86
74
|
| Namespace | What it covers |
|
|
87
75
|
|-----------|----------------|
|
|
88
76
|
| `roxy.astrology` | Western astrology API for natal birth charts, daily, weekly, monthly, and yearly horoscopes with unique content per s... |
|
|
89
|
-
| `roxy.vedicAstrology` | Vedic astrology (Jyotish) and KP API for kundli generation with 15 divisional charts (D1-D60),
|
|
90
|
-
| `roxy.forecast` |
|
|
91
|
-
| `roxy.humanDesign` |
|
|
92
|
-
| `roxy.chineseAstrology` |
|
|
77
|
+
| `roxy.vedicAstrology` | Vedic astrology (Jyotish) and KP API for kundli generation with 15 divisional charts (D1-D60), panchang with choghadi... |
|
|
78
|
+
| `roxy.forecast` | Astrology forecast API that merges upcoming transit aspects, sign ingresses, retrograde stations, new and full moons,... |
|
|
79
|
+
| `roxy.humanDesign` | Human Design API that generates the full bodygraph from a birth moment: type, strategy, inner authority, profile, def... |
|
|
80
|
+
| `roxy.chineseAstrology` | Chinese zodiac and BaZi astrology API: Four Pillars charts, Chinese zodiac signs and the Chinese lunisolar calendar f... |
|
|
93
81
|
| `roxy.fengShui` | Compute classical feng shui from one API: Xuan Kong flying star natal charts for any of the nine periods and 24 mount... |
|
|
94
82
|
| `roxy.mesoamericanAstrology` | Calculate Mayan astrology day signs, the Tzolkin sacred round, the Haab year, the full Long Count and the Aztec tonal... |
|
|
95
83
|
| `roxy.vastu` | Vastu Shastra API for directional home and plot analysis: entrance padas with the classical effect of each of the 32... |
|
|
@@ -102,287 +90,361 @@ const { latitude, longitude, timezone } = data.cities[0];
|
|
|
102
90
|
| `roxy.crystals` | Crystal healing API covering the most popular and widely-searched healing crystals and gemstones, from Amethyst and R... |
|
|
103
91
|
| `roxy.dreams` | Dream interpretation API with a 2,000+ symbol dream dictionary and psychological meanings covering animals, objects,... |
|
|
104
92
|
| `roxy.angelNumbers` | Angel numbers API with meanings for 111, 222, 333, 444, 555, 666, 777, 888, 999, 1111, and 75+ sequences covering eve... |
|
|
105
|
-
| `roxy.location` |
|
|
93
|
+
| `roxy.location` | Timezone and location API with city search and geocoding across 235,000+ cities in 240+ countries, returning latitude... |
|
|
106
94
|
| `roxy.usage` | Monitor your API usage, check rate limits, and track request consumption |
|
|
107
95
|
| `roxy.languages` | List the response languages accepted by the `lang` query parameter on every i18n-aware endpoint |
|
|
108
96
|
<!-- END:DOMAINS -->
|
|
109
97
|
|
|
110
98
|
## Most-used endpoints
|
|
111
99
|
|
|
112
|
-
The highest-demand endpoints by domain, in the order you are most likely to ship them.
|
|
100
|
+
The highest-demand endpoints by domain, in the order you are most likely to ship them. Every example below reads the same birth through a different domain, and every coordinate comes from one location lookup at the top: one API key, one lookup, and eighteen domains that compose into a single product instead of eighteen separate ones. Full catalog in the [API reference](https://roxyapi.com/api-reference).
|
|
101
|
+
|
|
102
|
+
### Location first: one lookup feeds every chart
|
|
103
|
+
|
|
104
|
+
Every chart, horoscope, panchang, dasha, dosha, synastry and compatibility endpoint needs `latitude`, `longitude` and `timezone`. Never ask users to type coordinates. Look the city up once and reuse the result in every domain below.
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
// One lookup feeds every chart below. `timezone` is the IANA name from the city
|
|
108
|
+
// record; the server resolves it to the DST-correct offset for the date of each chart.
|
|
109
|
+
const { data: place, error } = await roxy.location.searchCities({ query: { q: 'New York' } });
|
|
110
|
+
if (error) throw error;
|
|
111
|
+
const { latitude, longitude, timezone } = place.cities[0];
|
|
112
|
+
const birth = { date: '1990-01-15', time: '14:30:00', latitude, longitude, timezone };
|
|
113
|
+
|
|
114
|
+
// A second person for the two-chart calls (synastry, Guna Milan, Human Design connection).
|
|
115
|
+
const { data: london, error: error2 } = await roxy.location.searchCities({ query: { q: 'London' } });
|
|
116
|
+
if (error2) throw error2;
|
|
117
|
+
const { latitude: lat2, longitude: lon2, timezone: tz2 } = london.cities[0];
|
|
118
|
+
const partner = { date: '1992-07-22', time: '09:00:00', latitude: lat2, longitude: lon2, timezone: tz2 };
|
|
119
|
+
```
|
|
113
120
|
|
|
114
121
|
### 1. Western astrology API (natal chart, daily horoscope, synastry)
|
|
115
122
|
|
|
116
|
-
|
|
123
|
+
Natal chart products, daily horoscope features, dating and compatibility apps, and lunar-cycle wellness apps start here.
|
|
117
124
|
|
|
118
125
|
```typescript
|
|
119
|
-
// Natal chart. The
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
126
|
+
// Natal chart. The most requested Western call, run once at onboarding.
|
|
127
|
+
// `birth` carries the latitude, longitude and timezone from the location lookup above.
|
|
128
|
+
const { data: natal } = await roxy.astrology.generateNatalChart({ body: birth });
|
|
129
|
+
// natal.planets[n].name, .sign, .house, .interpretation?.summary; natal.ascendant.sign; natal.aspects
|
|
123
130
|
|
|
124
|
-
// Daily horoscope.
|
|
131
|
+
// Daily horoscope. The highest per-user call frequency in the catalog: daily content, streaks, push.
|
|
125
132
|
const { data: horoscope } = await roxy.astrology.getDailyHoroscope({ path: { sign: 'aries' } });
|
|
126
|
-
// horoscope.overview, horoscope.love, horoscope.career, horoscope.luckyNumber
|
|
133
|
+
// horoscope.overview, horoscope.love, horoscope.career, horoscope.column, horoscope.events, horoscope.luckyNumber
|
|
127
134
|
|
|
128
|
-
// Synastry.
|
|
135
|
+
// Synastry. Full inter-aspect analysis between two charts, the relationship feature of dating apps.
|
|
129
136
|
const { data: synastry } = await roxy.astrology.calculateSynastry({
|
|
130
|
-
body: {
|
|
131
|
-
person1: { date: '1990-01-15', time: '14:30:00', latitude: 40.71, longitude: -74.01, timezone: -5 },
|
|
132
|
-
person2: { date: '1992-07-22', time: '09:00:00', latitude: 51.51, longitude: -0.13, timezone: 1 },
|
|
133
|
-
},
|
|
137
|
+
body: { person1: birth, person2: partner },
|
|
134
138
|
});
|
|
135
139
|
// synastry.compatibilityScore, synastry.interAspects, synastry.analysis.strengths
|
|
136
140
|
|
|
137
|
-
// Moon phase.
|
|
141
|
+
// Moon phase. A zero-setup GET for wellness, cycle-tracking and meditation apps.
|
|
138
142
|
const { data: moon } = await roxy.astrology.getCurrentMoonPhase({});
|
|
143
|
+
// moon.phase, moon.illumination, moon.sign, moon.meaning?.description
|
|
139
144
|
```
|
|
140
145
|
|
|
141
146
|
### 2. Vedic astrology API (kundli, panchang, dasha, Guna Milan, KP)
|
|
142
147
|
|
|
143
|
-
|
|
148
|
+
Kundli generators, matrimonial matching, muhurta and panchang apps, and KP practitioners. The same `birth` object, read sidereally.
|
|
144
149
|
|
|
145
150
|
```typescript
|
|
146
|
-
// Vedic kundli.
|
|
147
|
-
const { data: kundli } = await roxy.vedicAstrology.generateBirthChart({
|
|
148
|
-
|
|
149
|
-
});
|
|
151
|
+
// Vedic kundli. The same birth read sidereally: `birth` reuses the location lookup above.
|
|
152
|
+
const { data: kundli } = await roxy.vedicAstrology.generateBirthChart({ body: birth });
|
|
153
|
+
// kundli.meta.Moon.rashi, kundli.meta.Moon.nakshatra, kundli.houses, kundli.combustion
|
|
150
154
|
|
|
151
|
-
//
|
|
155
|
+
// Detailed panchang. Tithi, nakshatra, yoga, karana, rahu kaal and the muhurtas for a date and place.
|
|
152
156
|
const { data: panchang } = await roxy.vedicAstrology.getDetailedPanchang({
|
|
153
|
-
body: { date: '2026-
|
|
157
|
+
body: { date: '2026-10-01', latitude, longitude, timezone },
|
|
154
158
|
});
|
|
159
|
+
// panchang.tithi, panchang.nakshatra, panchang.rahuKaal, panchang.abhijitMuhurta
|
|
155
160
|
|
|
156
|
-
// Vimshottari dasha.
|
|
157
|
-
const { data: dasha } = await roxy.vedicAstrology.getCurrentDasha({
|
|
158
|
-
|
|
159
|
-
});
|
|
161
|
+
// Vimshottari dasha. The mahadasha, antardasha and pratyantardasha running right now.
|
|
162
|
+
const { data: dasha } = await roxy.vedicAstrology.getCurrentDasha({ body: birth });
|
|
163
|
+
// dasha.mahadasha, dasha.antardasha, dasha.remainingInMahadasha
|
|
160
164
|
|
|
161
|
-
// Mangal Dosha.
|
|
162
|
-
const { data: dosha } = await roxy.vedicAstrology.checkManglikDosha({
|
|
163
|
-
|
|
164
|
-
});
|
|
165
|
+
// Mangal Dosha. The most asked matrimonial check.
|
|
166
|
+
const { data: dosha } = await roxy.vedicAstrology.checkManglikDosha({ body: birth });
|
|
167
|
+
// dosha.present; dosha.severity and dosha.remedies are set only when present is true
|
|
165
168
|
|
|
166
|
-
// Guna Milan. 36-point Ashtakoota
|
|
169
|
+
// Guna Milan. The 36-point Ashtakoota score behind kundli matching, both people from the lookups above.
|
|
167
170
|
const { data: milan } = await roxy.vedicAstrology.calculateGunMilan({
|
|
168
|
-
body: {
|
|
169
|
-
person1: { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20 },
|
|
170
|
-
person2: { date: '1992-07-22', time: '09:00:00', latitude: 19.07, longitude: 72.87 },
|
|
171
|
-
},
|
|
171
|
+
body: { person1: birth, person2: partner },
|
|
172
172
|
});
|
|
173
|
+
// milan.total, milan.percentage, milan.isCompatible, milan.breakdown
|
|
173
174
|
|
|
174
|
-
// KP ruling planets. Horary answers
|
|
175
|
+
// KP ruling planets. Horary answers at the moment of the question, for the place looked up above.
|
|
175
176
|
const { data: kp } = await roxy.vedicAstrology.getKpRulingPlanets({
|
|
176
|
-
body: { latitude
|
|
177
|
+
body: { latitude, longitude, timezone },
|
|
177
178
|
});
|
|
179
|
+
// kp.dayLord, kp.moonSublord, kp.rulingPlanets
|
|
178
180
|
```
|
|
179
181
|
|
|
180
|
-
### 3.
|
|
182
|
+
### 3. Astrology forecast API (transit forecast, cross-domain timeline)
|
|
181
183
|
|
|
182
|
-
|
|
184
|
+
Forecast feeds, transit alerts and timing tools. One call returns a dated, significance-scored event list; the timeline variant merges Vedic dasha boundaries and biorhythm critical days into the same list, which no single-domain API can do.
|
|
183
185
|
|
|
184
186
|
```typescript
|
|
185
|
-
//
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
// Transit forecast. Transit-to-natal aspects, sign ingresses and retrograde stations over a window.
|
|
188
|
+
// `birthData` is the same `birth` object: date, time, latitude, longitude, timezone.
|
|
189
|
+
const { data: transits } = await roxy.forecast.forecastTransits({
|
|
190
|
+
body: { birthData: birth, startDate: '2026-10-01', endDate: '2026-10-31' },
|
|
188
191
|
});
|
|
189
|
-
//
|
|
192
|
+
// transits.count, transits.events[n].date, .type, .body, .target, .aspect, .significance
|
|
190
193
|
|
|
191
|
-
//
|
|
192
|
-
const { data:
|
|
193
|
-
body: {
|
|
194
|
-
});
|
|
195
|
-
|
|
196
|
-
// Personal Year. Annual forecast, drives January traffic spikes.
|
|
197
|
-
const { data: pyear } = await roxy.numerology.calculatePersonalYear({
|
|
198
|
-
body: { month: 1, day: 15, year: 2026 },
|
|
194
|
+
// Cross-domain timeline. The same window with Vedic dasha boundaries and biorhythm critical days merged in.
|
|
195
|
+
const { data: timeline } = await roxy.forecast.generateTimeline({
|
|
196
|
+
body: { birthData: birth, startDate: '2026-10-01', endDate: '2026-10-31' },
|
|
199
197
|
});
|
|
198
|
+
// timeline.events[n].domain ('western' | 'vedic' | 'biorhythm'), .description, .significance
|
|
200
199
|
```
|
|
201
200
|
|
|
202
|
-
### 4.
|
|
201
|
+
### 4. Human Design API (bodygraph, connection)
|
|
203
202
|
|
|
204
|
-
|
|
203
|
+
Self-discovery apps, coaching bots and compatibility products. The full bodygraph is one call, and the Design side is solved on the exact 88-degree solar arc rather than approximated as calendar days.
|
|
205
204
|
|
|
206
205
|
```typescript
|
|
207
|
-
//
|
|
208
|
-
|
|
209
|
-
|
|
206
|
+
// Bodygraph. Type, strategy, authority, profile, definition, centers, channels and all 26 gates in one call.
|
|
207
|
+
// Human Design needs only the birth instant, so it takes the date, time and timezone from the lookup above.
|
|
208
|
+
const { data: hd } = await roxy.humanDesign.generateBodygraph({
|
|
209
|
+
body: { date: birth.date, time: birth.time, timezone: birth.timezone },
|
|
210
|
+
});
|
|
211
|
+
// hd.type, hd.strategy, hd.authority, hd.profile, hd.definition, hd.incarnationCross.name, hd.centers, hd.channels, hd.gates
|
|
210
212
|
|
|
211
|
-
//
|
|
212
|
-
const { data:
|
|
213
|
-
body: {
|
|
213
|
+
// Connection. Two bodygraphs combined, each of the 36 channels classified by how the pair forms it.
|
|
214
|
+
const { data: connection } = await roxy.humanDesign.calculateConnection({
|
|
215
|
+
body: {
|
|
216
|
+
personA: { date: birth.date, time: birth.time, timezone: birth.timezone },
|
|
217
|
+
personB: { date: partner.date, time: partner.time, timezone: partner.timezone },
|
|
218
|
+
},
|
|
214
219
|
});
|
|
220
|
+
// connection.totalChannels, connection.summary.electromagnetic, connection.combinedDefinition
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### 5. Chinese zodiac API (BaZi four pillars, zodiac animal, almanac)
|
|
215
224
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
225
|
+
BaZi readings, zodiac content and Tong Shu date pages. The school splits that make two calculators disagree (`dayBoundary`, `yearBoundary`, `hourClock`) are typed request parameters with named defaults.
|
|
226
|
+
|
|
227
|
+
```typescript
|
|
228
|
+
// BaZi Four Pillars. The anchor call of the domain, from the same birth instant as every chart above.
|
|
229
|
+
// Each response echoes the `conventions` it was computed under, so a chart can be reproduced, not guessed.
|
|
230
|
+
const { data: bazi } = await roxy.chineseAstrology.generateBaziChart({
|
|
231
|
+
body: { date: birth.date, time: birth.time, timezone: birth.timezone },
|
|
219
232
|
});
|
|
233
|
+
// bazi.pillars[n].position ('year' | 'month' | 'day' | 'hour'), .stem.element, .branch.animal, .tenGod.name
|
|
234
|
+
// bazi.dayMaster.element, bazi.zodiacAnimal, bazi.fiveElements, bazi.conventions
|
|
220
235
|
|
|
221
|
-
//
|
|
222
|
-
|
|
223
|
-
|
|
236
|
+
// Chinese zodiac animal. Defaults `yearBoundary` to the Lunar New Year, the folk rule people mean
|
|
237
|
+
// when they ask which animal they are. Pass 'li-chun' for the classical BaZi boundary.
|
|
238
|
+
const { data: animal } = await roxy.chineseAstrology.calculateZodiacAnimal({ body: { date: birth.date } });
|
|
239
|
+
// animal.animal.name, animal.animal.element, animal.element (the year stem element), animal.interpretation
|
|
240
|
+
|
|
241
|
+
// Almanac day. The Tong Shu view of a date: day officer, mansion, clash animal, favours and avoids.
|
|
242
|
+
const { data: almanac } = await roxy.chineseAstrology.getAlmanacDay({ path: { date: '2026-10-01' } });
|
|
243
|
+
// almanac.dayPillar, almanac.dayOfficer, almanac.clashAnimal, almanac.favours, almanac.avoids
|
|
224
244
|
```
|
|
225
245
|
|
|
226
|
-
###
|
|
246
|
+
### 6. Feng shui API (Kua number, flying star chart)
|
|
227
247
|
|
|
228
|
-
|
|
248
|
+
Kua numbers with the Eight Mansions map, Xuan Kong flying star charts for any of the nine periods and 24 mountains, annual and monthly star plates, and the annual afflictions.
|
|
229
249
|
|
|
230
250
|
```typescript
|
|
231
|
-
//
|
|
232
|
-
const { data:
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
},
|
|
240
|
-
});
|
|
241
|
-
// hd.type, hd.strategy, hd.profile, hd.definition
|
|
242
|
-
// hd.centers, hd.channels, hd.gates, hd.incarnationCross
|
|
251
|
+
// Kua number. One birth date and a gender give the personal directions everything else reads off.
|
|
252
|
+
const { data: kua } = await roxy.fengShui.calculateKuaNumber({ body: { date: birth.date, gender: 'female' } });
|
|
253
|
+
// kua.kua, kua.group ('east' | 'west'), kua.trigram.english, kua.sectors[n].direction, .nature, .rank
|
|
254
|
+
|
|
255
|
+
// Flying star natal chart. Period plus facing gives the nine palaces with base, mountain and water stars.
|
|
256
|
+
// Send `facing` (a mountain id like 'bing' or a compass label like 'S2') or `facingDegrees`, not neither.
|
|
257
|
+
const { data: stars } = await roxy.fengShui.generateFlyingStarChart({ body: { period: 9, facing: 'S2' } });
|
|
258
|
+
// stars.facing.label, stars.sitting.label, stars.structure.name, stars.palaces[n].palace, .base, .mountain, .water, .reading
|
|
243
259
|
```
|
|
244
260
|
|
|
245
|
-
###
|
|
261
|
+
### 7. Mayan astrology API (Tzolkin day sign, full Maya chart)
|
|
246
262
|
|
|
247
|
-
|
|
263
|
+
Maya day signs, the Haab and Long Count, and the Aztec tonalpohualli, every value a function of the date under a typed `correlation` convention echoed back in `conventions`.
|
|
248
264
|
|
|
249
265
|
```typescript
|
|
250
|
-
//
|
|
251
|
-
const { data:
|
|
266
|
+
// Tzolkin day sign. The most asked Maya question, answered from a date alone.
|
|
267
|
+
const { data: tzolkin } = await roxy.mesoamericanAstrology.calculateTzolkin({ body: { date: birth.date } });
|
|
268
|
+
// tzolkin.daySign, tzolkin.daySignName, tzolkin.number, tzolkin.trecena, tzolkin.reading
|
|
269
|
+
|
|
270
|
+
// Full Maya chart. Tzolkin, Haab, Long Count, Calendar Round, Lord of the Night, Year Bearer and the Cruz Maya.
|
|
271
|
+
const { data: maya } = await roxy.mesoamericanAstrology.generateMayanChart({ body: { date: birth.date } });
|
|
272
|
+
// maya.tzolkin, maya.haab, maya.longCount, maya.calendarRound, maya.yearBearer, maya.cross, maya.conventions.correlation
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### 8. Vastu Shastra API (entrance analysis, room compliance)
|
|
276
|
+
|
|
277
|
+
Home and plot analysis from typed geometry. Every verdict carries a `source` object naming the text, chapter and verse it rests on, or a convention label where the texts are silent.
|
|
278
|
+
|
|
279
|
+
```typescript
|
|
280
|
+
// Entrance analysis. Plot, facing and door in; the pada, its devata, the classical effect and the recommended padas out.
|
|
281
|
+
const { data: entrance } = await roxy.vastu.calculateEntrancePada({
|
|
282
|
+
body: { plot: { width: 30, depth: 40, unit: 'feet' }, facing: 'North', doorPosition: 0.4 },
|
|
283
|
+
});
|
|
284
|
+
// entrance.pada, entrance.devata, entrance.effect, entrance.auspiciousness, entrance.recommendedPadas, entrance.source
|
|
285
|
+
|
|
286
|
+
// Room compliance. A verdict per room with the verse or the convention it rests on, and a scored composite.
|
|
287
|
+
const { data: rooms } = await roxy.vastu.calculateRoomCompliance({
|
|
252
288
|
body: {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
startDate: '2026-06-01',
|
|
261
|
-
endDate: '2026-06-30',
|
|
289
|
+
plot: { width: 30, depth: 40, unit: 'feet' },
|
|
290
|
+
facing: 'North',
|
|
291
|
+
rooms: [
|
|
292
|
+
{ type: 'kitchen', direction: 'Southeast' },
|
|
293
|
+
{ type: 'master-bedroom', direction: 'Southwest' },
|
|
294
|
+
{ type: 'puja', direction: 'Northeast' },
|
|
295
|
+
],
|
|
262
296
|
},
|
|
263
297
|
});
|
|
264
|
-
//
|
|
265
|
-
// timeline.events[0].date, timeline.events[0].domain, timeline.events[0].description, timeline.events[0].significance
|
|
298
|
+
// rooms.score, rooms.rooms[n].type, .verdict, .idealDirections, .source
|
|
266
299
|
```
|
|
267
300
|
|
|
268
|
-
###
|
|
301
|
+
### 9. Numerology API (life path, full chart, personal year)
|
|
269
302
|
|
|
270
|
-
|
|
303
|
+
Works from the birth date and name alone, no coordinates, which makes it the easiest domain to integrate.
|
|
271
304
|
|
|
272
305
|
```typescript
|
|
273
|
-
//
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
// bazi.dayMaster.element, bazi.zodiacAnimal, bazi.fiveElements, bazi.conventions, bazi.summary
|
|
281
|
-
|
|
282
|
-
// Chinese zodiac sign. Defaults `yearBoundary` to 'lunar-new-year', the folk rule people mean
|
|
283
|
-
// when they say which animal they are. Pass 'li-chun' to match the classical BaZi boundary.
|
|
284
|
-
const { data: sign } = await roxy.chineseAstrology.calculateZodiacAnimal({
|
|
285
|
-
body: { date: '1990-07-04' },
|
|
306
|
+
// Life Path. The most searched numerology number, from the birth date alone.
|
|
307
|
+
const { data: lifePath } = await roxy.numerology.calculateLifePath({ body: { year: 1990, month: 1, day: 15 } });
|
|
308
|
+
// lifePath.number, lifePath.type ('single' | 'master'), lifePath.meaning
|
|
309
|
+
|
|
310
|
+
// Full numerology chart. All six core numbers plus karmic lessons, pinnacles and the personal year in one call.
|
|
311
|
+
const { data: numerology } = await roxy.numerology.generateNumerologyChart({
|
|
312
|
+
body: { fullName: 'Jane Smith', year: 1990, month: 1, day: 15 },
|
|
286
313
|
});
|
|
287
|
-
//
|
|
288
|
-
|
|
289
|
-
//
|
|
314
|
+
// numerology.coreNumbers.lifePath, .expression, .soulUrge, numerology.additionalInsights.personalYear
|
|
315
|
+
|
|
316
|
+
// Personal Year. The annual theme, the January feature of every numerology app.
|
|
317
|
+
const { data: personalYear } = await roxy.numerology.calculatePersonalYear({ body: { month: 1, day: 15, year: 2026 } });
|
|
318
|
+
// personalYear.personalYear, personalYear.theme, personalYear.advice
|
|
290
319
|
```
|
|
291
320
|
|
|
292
|
-
###
|
|
321
|
+
### 10. Kabbalah API (gematria, birth profile)
|
|
293
322
|
|
|
294
|
-
|
|
323
|
+
Gematria of a Latin name under a declared transliteration convention, the 72 names, the Tree of Life, and a Hebrew birthday computed from the same birth instant as every chart above.
|
|
295
324
|
|
|
296
325
|
```typescript
|
|
297
|
-
//
|
|
298
|
-
const { data:
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
//
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
// Flying star natal chart. Period plus facing gives the nine palaces with base, mountain
|
|
305
|
-
// and water stars. Send `facing` (a mountain id like 'bing' or a compass label like 'S2')
|
|
306
|
-
// or `facingDegrees`, not neither.
|
|
307
|
-
const { data: chart } = await roxy.fengShui.generateFlyingStarChart({
|
|
308
|
-
body: { period: 9, facing: 'S2' },
|
|
326
|
+
// Gematria. A Latin name transliterated under a declared convention, ten ciphers, each with its tradition and source.
|
|
327
|
+
const { data: gematria } = await roxy.kabbalah.calculateGematria({ body: { text: 'Sarah' } });
|
|
328
|
+
// gematria.chosen.hebrew, gematria.values[n].id, .name, .value, .tradition; gematria.matches, gematria.conventions
|
|
329
|
+
|
|
330
|
+
// Birth profile. The Hebrew date and birthday, the three birth angels and the birth sephirah from the instant above.
|
|
331
|
+
const { data: kabbalah } = await roxy.kabbalah.generateBirthProfile({
|
|
332
|
+
body: { date: birth.date, time: birth.time, timezone: birth.timezone },
|
|
309
333
|
});
|
|
310
|
-
//
|
|
311
|
-
|
|
312
|
-
|
|
334
|
+
// kabbalah.hebrewDate, kabbalah.hebrewBirthday, kabbalah.angels, kabbalah.sephirah
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### 11. Tarot API (daily card, three-card, Celtic Cross, yes or no)
|
|
338
|
+
|
|
339
|
+
The complete 78-card deck with meanings for love, career, health and spirit. Pass a `seed` per user for deterministic once-per-day draws.
|
|
340
|
+
|
|
341
|
+
```typescript
|
|
342
|
+
// Daily card. Deterministic per (seed, date), so one user sees one card per day.
|
|
343
|
+
const { data: card } = await roxy.tarot.getDailyCard({ body: { seed: 'user-42' } });
|
|
344
|
+
// card.card.name, card.card.reversed, card.card.imageUrl, card.dailyMessage
|
|
345
|
+
|
|
346
|
+
// Three-card spread. Past, present, future: the most drawn spread on every tarot platform.
|
|
347
|
+
const { data: three } = await roxy.tarot.castThreeCard({ body: { question: 'My next quarter', seed: 'user-42' } });
|
|
348
|
+
// three.positions[n].name, .card.name, .interpretation; three.summary
|
|
349
|
+
|
|
350
|
+
// Celtic Cross. The ten-position professional reading.
|
|
351
|
+
const { data: celtic } = await roxy.tarot.castCelticCross({ body: { question: 'What should I focus on?', seed: 'user-42' } });
|
|
352
|
+
// celtic.positions[n].name, .card.name, .interpretation; celtic.summary
|
|
353
|
+
|
|
354
|
+
// Yes or no. One card, one answer, with its strength.
|
|
355
|
+
const { data: answer } = await roxy.tarot.castYesNo({ body: { question: 'Should I take the offer?' } });
|
|
356
|
+
// answer.answer ('Yes' | 'No' | 'Maybe'), answer.strength, answer.card.name
|
|
313
357
|
```
|
|
314
358
|
|
|
315
|
-
###
|
|
359
|
+
### 12. Biorhythm API (reading, forecast)
|
|
316
360
|
|
|
317
|
-
|
|
361
|
+
Ten cycle types across primary, secondary and extended cycles, for wellness, productivity, sports and couples apps.
|
|
318
362
|
|
|
319
363
|
```typescript
|
|
320
|
-
//
|
|
321
|
-
const { data: bio } = await roxy.biorhythm.
|
|
322
|
-
|
|
364
|
+
// Biorhythm reading. All ten cycles for a date, from the same birth date as every chart above.
|
|
365
|
+
const { data: bio } = await roxy.biorhythm.getReading({ body: { birthDate: birth.date, targetDate: '2026-10-01' } });
|
|
366
|
+
// bio.cycles.physical.value, .phase; bio.energyRating, bio.overallPhase, bio.criticalAlerts, bio.interpretation
|
|
367
|
+
|
|
368
|
+
// Forecast. Every cycle for every day of a window, with the best and worst days named.
|
|
369
|
+
const { data: bioForecast } = await roxy.biorhythm.getForecast({
|
|
370
|
+
body: { birthDate: birth.date, startDate: '2026-10-01', endDate: '2026-10-31' },
|
|
323
371
|
});
|
|
372
|
+
// bioForecast.summary.bestDay, .worstDay, .averageEnergy; bioForecast.days[n].date, .physical, .emotional, .intellectual, .isCritical
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
### 13. Ayurveda API (dosha constitution, dinacharya)
|
|
324
376
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
377
|
+
The dosha profile read from a verified sidereal chart with the verse on each factor, a daily routine anchored on the local sunrise, and the six seasons from real solar ingresses. Every response carries `meta.disclaimer`.
|
|
378
|
+
|
|
379
|
+
```typescript
|
|
380
|
+
// Constitution. The dosha profile read from the sidereal chart of the same birth, each factor with its verse.
|
|
381
|
+
const { data: constitution } = await roxy.ayurveda.calculateAyurvedicConstitution({ body: birth });
|
|
382
|
+
// constitution.composite.dominant, .type; constitution.factors[n].id, .input, .doshas, .source; constitution.meta.disclaimer
|
|
383
|
+
|
|
384
|
+
// Dinacharya. Brahma muhurta, the dosha periods and the routine for a date at the place looked up above.
|
|
385
|
+
const { data: dinacharya } = await roxy.ayurveda.getDinacharyaSchedule({
|
|
386
|
+
body: { date: '2026-10-01', latitude, longitude, timezone },
|
|
328
387
|
});
|
|
388
|
+
// dinacharya.brahmaMuhurta, dinacharya.doshaPeriods, dinacharya.routine
|
|
329
389
|
```
|
|
330
390
|
|
|
331
|
-
###
|
|
391
|
+
### 14. I Ching API (cast a reading, hexagram catalog)
|
|
332
392
|
|
|
333
|
-
|
|
393
|
+
All 64 hexagrams, 384 changing lines and 8 trigrams, for meditation apps, decision tools and wisdom chatbots.
|
|
334
394
|
|
|
335
395
|
```typescript
|
|
336
|
-
// Cast a reading.
|
|
396
|
+
// Cast a reading. Three coins six times: the primary hexagram, the changing lines and the resulting hexagram.
|
|
337
397
|
const { data: reading } = await roxy.iching.castReading({ query: { seed: 'user-42' } });
|
|
338
|
-
// reading.hexagram, reading.changingLinePositions, reading.resultingHexagram
|
|
398
|
+
// reading.hexagram?.number, reading.hexagram?.english, reading.lines, reading.changingLinePositions, reading.resultingHexagram
|
|
339
399
|
|
|
340
|
-
// Hexagram catalog.
|
|
341
|
-
const { data: hexagrams } = await roxy.iching.listHexagrams({});
|
|
342
|
-
// hexagrams.hexagrams
|
|
400
|
+
// Hexagram catalog. Paginated, 20 per page by default; ask for all 64 once and cache them.
|
|
401
|
+
const { data: hexagrams } = await roxy.iching.listHexagrams({ query: { limit: 64 } });
|
|
402
|
+
// hexagrams.total, hexagrams.hexagrams[n].number, .english, .pinyin; fetch roxy.iching.getHexagram({ path: { number } }) for the judgment and lines
|
|
343
403
|
```
|
|
344
404
|
|
|
345
|
-
###
|
|
405
|
+
### 15. Crystal healing API (by zodiac, by chakra, birthstone)
|
|
346
406
|
|
|
347
|
-
Crystal retail and metaphysical
|
|
407
|
+
Crystal retail and metaphysical content: "crystals for [sign]" and "[chakra] chakra stones" pages, plus the birthstone for each month.
|
|
348
408
|
|
|
349
409
|
```typescript
|
|
350
|
-
// By zodiac.
|
|
410
|
+
// By zodiac. The most searched crystal query pattern.
|
|
351
411
|
const { data: bySign } = await roxy.crystals.getCrystalsByZodiac({ path: { sign: 'scorpio' } });
|
|
352
|
-
// bySign.crystals
|
|
412
|
+
// bySign.crystals[n].id, .name, .imageUrl, .colors; fetch roxy.crystals.getCrystal({ path: { id } }) for full properties
|
|
353
413
|
|
|
354
|
-
// By chakra.
|
|
414
|
+
// By chakra. Wellness and yoga content pages.
|
|
355
415
|
const { data: byChakra } = await roxy.crystals.getCrystalsByChakra({ path: { chakra: 'Heart' } });
|
|
416
|
+
// byChakra.crystals[n].name, .colors
|
|
356
417
|
|
|
357
|
-
// Birthstone. Evergreen gift and jewelry
|
|
358
|
-
const { data: birthstone } = await roxy.crystals.getBirthstones({ path: { month:
|
|
418
|
+
// Birthstone. Evergreen gift and jewelry pages.
|
|
419
|
+
const { data: birthstone } = await roxy.crystals.getBirthstones({ path: { month: 1 } });
|
|
359
420
|
```
|
|
360
421
|
|
|
361
|
-
###
|
|
422
|
+
### 16. Dream interpretation API (symbol dictionary, search)
|
|
362
423
|
|
|
363
|
-
|
|
424
|
+
A 2,000+ symbol dream dictionary for journal apps, AI companions and self-discovery products.
|
|
364
425
|
|
|
365
426
|
```typescript
|
|
366
427
|
// Symbol detail. Every "what does it mean to dream about X" page lands here.
|
|
367
428
|
const { data: symbol } = await roxy.dreams.getDreamSymbol({ path: { id: 'flying' } });
|
|
368
429
|
// symbol.id, symbol.name, symbol.meaning
|
|
369
430
|
|
|
370
|
-
// Symbol search. Chatbots
|
|
371
|
-
const { data:
|
|
372
|
-
//
|
|
431
|
+
// Symbol search. Chatbots fetch the dictionary once and keep it locally.
|
|
432
|
+
const { data: symbols } = await roxy.dreams.searchDreamSymbols({ query: { q: 'water' } });
|
|
433
|
+
// symbols.symbols[n].id, .name
|
|
373
434
|
```
|
|
374
435
|
|
|
375
|
-
###
|
|
436
|
+
### 17. Angel numbers API (1111, 222, 333 meanings plus universal lookup)
|
|
376
437
|
|
|
377
|
-
|
|
438
|
+
Meanings for every common sequence, and a lookup that answers any positive integer through its digit root.
|
|
378
439
|
|
|
379
440
|
```typescript
|
|
380
|
-
// By number. Every "meaning of 1111" page is backed by this.
|
|
441
|
+
// By number. Every "meaning of 1111" page is backed by this. The path param is a string.
|
|
381
442
|
const { data: angel } = await roxy.angelNumbers.getAngelNumber({ path: { number: '1111' } });
|
|
382
|
-
// angel.meaning.spiritual, angel.meaning.love, angel.affirmation
|
|
443
|
+
// angel.title, angel.coreMessage, angel.meaning.spiritual, angel.meaning.love, angel.affirmation
|
|
383
444
|
|
|
384
|
-
// Universal lookup.
|
|
385
|
-
const { data:
|
|
445
|
+
// Universal lookup. Any positive integer, with the digit root carrying the answer when no curated entry exists.
|
|
446
|
+
const { data: sequence } = await roxy.angelNumbers.analyzeNumberSequence({ query: { number: '4242' } });
|
|
447
|
+
// sequence.digitRoot, sequence.isRepeating, sequence.knownMeaning (null when not curated), sequence.digitRootMeaning?.title
|
|
386
448
|
```
|
|
387
449
|
|
|
388
450
|
## Built for AI agents (Cursor, Claude Code, Copilot, Codex, Gemini CLI)
|
|
@@ -449,6 +511,8 @@ Supported: `astrology`, `vedicAstrology`, `forecast`, `humanDesign`, `chineseAst
|
|
|
449
511
|
|
|
450
512
|
Every method returns `{ data, error, response }`. On 4xx / 5xx the error shape is `{ error: string, code: string }`. Switch on `code` for programmatic handling.
|
|
451
513
|
|
|
514
|
+
`data` and `error` are a discriminated pair, so `data` is typed as possibly undefined until `error` is checked; a `strict` project narrows with `if (error)` first. Pass `throwOnError: true` in any call to have failures throw instead, which makes `data` non-optional on that call.
|
|
515
|
+
|
|
452
516
|
```typescript
|
|
453
517
|
const { data, error } = await roxy.astrology.getDailyHoroscope({
|
|
454
518
|
path: { sign: 'aries' },
|
|
@@ -468,7 +532,9 @@ if (error) {
|
|
|
468
532
|
| 401 | `invalid_api_key` | Key format invalid or tampered |
|
|
469
533
|
| 401 | `subscription_not_found` | Key references non-existent subscription |
|
|
470
534
|
| 401 | `subscription_inactive` | Subscription cancelled, expired, or suspended |
|
|
535
|
+
| 401 | `api_key_revoked` | Key was deleted from the account |
|
|
471
536
|
| 404 | `not_found` | Resource not found |
|
|
537
|
+
| 4xx | `bad_request` and other status-derived codes | A client error the endpoint itself detected, such as a date window whose `endDate` precedes `startDate` |
|
|
472
538
|
| 429 | `rate_limit_exceeded` | Monthly quota reached |
|
|
473
539
|
| 500 | `internal_error` | Server error |
|
|
474
540
|
|
|
@@ -482,7 +548,7 @@ Every request and response is fully typed. IDE autocomplete shows available meth
|
|
|
482
548
|
- [API Reference](https://roxyapi.com/api-reference)
|
|
483
549
|
- [Pricing](https://roxyapi.com/pricing)
|
|
484
550
|
- [MCP setup for AI agents](https://roxyapi.com/docs/mcp)
|
|
485
|
-
- [
|
|
551
|
+
- [Templates](https://roxyapi.com/templates)
|
|
486
552
|
- [Python SDK](https://pypi.org/project/roxy-sdk/)
|
|
487
553
|
- [Issues](https://github.com/RoxyAPI/sdk-typescript/issues)
|
|
488
554
|
|