1. Go to this page and download the library: Download roxyapi/sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
function RoxyAPI\Sdk\createRoxy;
// Retries 429, 500, 502, 503 and 504 by default. Optional settings, shown with their defaults:
// createRoxy($key, new RetryPolicy(maxRetries: 2, initialDelayMs: 500, maxDelayMs: 30000))
$roxy = createRoxy(getenv('ROXY_API_KEY'));
// Step 1: geocode the birth city once. Every chart endpoint takes these three values.
$place = $roxy->location->searchCities(q: 'London');
['latitude' => $latitude, 'longitude' => $longitude, 'timezone' => $timezone] = $place['cities'][0];
// Step 2: a Western natal chart. `timezone` is the IANA string from the lookup
// ("Europe/London"); the server resolves it to the DST-correct offset for the
// date of the chart.
$chart = $roxy->astrology->generateNatalChart(
date: '1990-01-15', time: '14:30:00', latitude: $latitude, longitude: $longitude, timezone: $timezone,
);
// Step 3: the same birth as a Vedic kundli. Same inputs, sidereal zodiac.
$kundli = $roxy->vedicAstrology->generateBirthChart(
date: '1990-01-15', time: '14:30:00', latitude: $latitude, longitude: $longitude, timezone: $timezone,
);
// One lookup feeds every chart below. `timezone` is the IANA name from the city
// record; the server resolves it to the DST-correct offset for the date of each chart.
$place = $roxy->location->searchCities(q: 'New York');
['latitude' => $latitude, 'longitude' => $longitude, 'timezone' => $timezone] = $place['cities'][0];
$birth = ['date' => '1990-01-15', 'time' => '14:30:00', 'latitude' => $latitude, 'longitude' => $longitude, 'timezone' => $timezone];
// A second person for the two-chart calls (synastry, Guna Milan, Human Design connection).
$london = $roxy->location->searchCities(q: 'London');
['latitude' => $lat2, 'longitude' => $lon2, 'timezone' => $tz2] = $london['cities'][0];
$partner = ['date' => '1992-07-22', 'time' => '09:00:00', 'latitude' => $lat2, 'longitude' => $lon2, 'timezone' => $tz2];
// Natal chart. The most requested Western call, run once at onboarding.
// `$birth` carries the latitude, longitude and timezone from the location lookup above,
// spread into the named arguments of the call.
$natal = $roxy->astrology->generateNatalChart(...$birth);
// $natal['planets'][n]['name'], ['sign'], ['house'], ['interpretation']['summary']; $natal['ascendant']['sign']; $natal['aspects']
// Daily horoscope. The highest per-user call frequency in the catalog: daily content, streaks, push.
$horoscope = $roxy->astrology->getDailyHoroscope(sign: 'aries');
// $horoscope['overview'], ['love'], ['career'], ['column'], ['events'], ['luckyNumber']
// Synastry. Full inter-aspect analysis between two charts, the relationship feature of dating apps.
$synastry = $roxy->astrology->calculateSynastry(person1: $birth, person2: $partner);
// $synastry['compatibilityScore'], ['interAspects'], ['analysis']['strengths']
// Moon phase. A zero-setup GET for wellness, cycle-tracking and meditation apps.
$moon = $roxy->astrology->getCurrentMoonPhase();
// $moon['phase'], ['illumination'], ['sign'], ['meaning']['description']
// Vedic kundli. The same birth read sidereally: `$birth` reuses the location lookup above.
$kundli = $roxy->vedicAstrology->generateBirthChart(...$birth);
// $kundli['meta']['Moon']['rashi'], $kundli['meta']['Moon']['nakshatra'], $kundli['houses'], $kundli['combustion']
// Detailed panchang. Tithi, nakshatra, yoga, karana, rahu kaal and the muhurtas for a date and place.
$panchang = $roxy->vedicAstrology->getDetailedPanchang(
date: '2026-10-01', latitude: $latitude, longitude: $longitude, timezone: $timezone,
);
// $panchang['tithi'], ['nakshatra'], ['rahuKaal'], ['abhijitMuhurta']
// Vimshottari dasha. The mahadasha, antardasha and pratyantardasha running right now.
$dasha = $roxy->vedicAstrology->getCurrentDasha(...$birth);
// $dasha['mahadasha'], ['antardasha'], ['remainingInMahadasha']
// Mangal Dosha. The most asked matrimonial check.
$dosha = $roxy->vedicAstrology->checkManglikDosha(...$birth);
// $dosha['present']; $dosha['severity'] and $dosha['remedies'] are set only when present is true
// Guna Milan. The 36-point Ashtakoota score behind kundli matching, both people from the lookups above.
$milan = $roxy->vedicAstrology->calculateGunMilan(person1: $birth, person2: $partner);
// $milan['total'], ['percentage'], ['isCompatible'], ['breakdown']
// KP ruling planets. Horary answers at the moment of the question, for the place looked up above.
$kp = $roxy->vedicAstrology->getKpRulingPlanets(latitude: $latitude, longitude: $longitude, timezone: $timezone);
// $kp['dayLord'], ['moonSublord'], ['rulingPlanets']
// Transit forecast. Transit-to-natal aspects, sign ingresses and retrograde stations over a window.
// `birthData` is the same `$birth` array: date, time, latitude, longitude, timezone.
$transits = $roxy->forecast->forecastTransits(birthData: $birth, startDate: '2026-10-01', endDate: '2026-10-31');
// $transits['count'], $transits['events'][n]['date'], ['type'], ['body'], ['target'], ['aspect'], ['significance']
// Cross-domain timeline. The same window with Vedic dasha boundaries and biorhythm critical days merged in.
$timeline = $roxy->forecast->generateTimeline(birthData: $birth, startDate: '2026-10-01', endDate: '2026-10-31');
// $timeline['events'][n]['domain'] ('western' | 'vedic' | 'biorhythm'), ['description'], ['significance']
// Bodygraph. Type, strategy, authority, profile, definition, centers, channels and all 26 gates in one call.
// Human Design needs only the birth instant, so it takes the date, time and timezone from the lookup above.
$hd = $roxy->humanDesign->generateBodygraph(date: $birth['date'], time: $birth['time'], timezone: $birth['timezone']);
// $hd['type'], ['strategy'], ['authority'], ['profile'], ['definition'], ['incarnationCross']['name'], ['centers'], ['channels'], ['gates']
// Connection. Two bodygraphs combined, each of the 36 channels classified by how the pair forms it.
$connection = $roxy->humanDesign->calculateConnection(
personA: ['date' => $birth['date'], 'time' => $birth['time'], 'timezone' => $birth['timezone']],
personB: ['date' => $partner['date'], 'time' => $partner['time'], 'timezone' => $partner['timezone']],
);
// $connection['totalChannels'], ['summary']['electromagnetic'], ['combinedDefinition']
// BaZi Four Pillars. The anchor call of the domain, from the same birth instant as every chart above.
// Each response echoes the `conventions` it was computed under, so a chart can be reproduced, not guessed.
$bazi = $roxy->chineseAstrology->generateBaziChart(date: $birth['date'], time: $birth['time'], timezone: $birth['timezone']);
// $bazi['pillars'][n]['position'] ('year' | 'month' | 'day' | 'hour'), ['stem']['element'], ['branch']['animal'], ['tenGod']['name']
// $bazi['dayMaster']['element'], $bazi['zodiacAnimal'], $bazi['fiveElements'], $bazi['conventions']
// Chinese zodiac animal. Defaults `yearBoundary` to the Lunar New Year, the folk rule people mean
// when they ask which animal they are. Pass 'li-chun' for the classical BaZi boundary.
$animal = $roxy->chineseAstrology->calculateZodiacAnimal(date: $birth['date']);
// $animal['animal']['name'], $animal['animal']['element'], $animal['element'] (the year stem element), $animal['interpretation']
// Almanac day. The Tong Shu view of a date: day officer, mansion, clash animal, favours and avoids.
$almanac = $roxy->chineseAstrology->getAlmanacDay(date: '2026-10-01');
// $almanac['dayPillar'], ['dayOfficer'], ['clashAnimal'], ['favours'], ['avoids']
// Kua number. One birth date and a gender give the personal directions everything else reads off.
$kua = $roxy->fengShui->calculateKuaNumber(date: $birth['date'], gender: 'female');
// $kua['kua'], $kua['group'] ('east' | 'west'), $kua['trigram']['english'], $kua['sectors'][n]['direction'], ['nature'], ['rank']
// Flying star natal chart. Period plus facing gives the nine palaces with base, mountain and water stars.
// Send `facing` (a mountain id like 'bing' or a compass label like 'S2') or `facingDegrees`, not neither.
$stars = $roxy->fengShui->generateFlyingStarChart(period: 9, facing: 'S2');
// $stars['facing']['label'], $stars['sitting']['label'], $stars['structure']['name'], $stars['palaces'][n]['palace'], ['base'], ['mountain'], ['water'], ['reading']
// Tzolkin day sign. The most asked Maya question, answered from a date alone.
$tzolkin = $roxy->mesoamericanAstrology->calculateTzolkin(date: $birth['date']);
// $tzolkin['daySign'], ['daySignName'], ['number'], ['trecena'], ['reading']
// Full Maya chart. Tzolkin, Haab, Long Count, Calendar Round, Lord of the Night, Year Bearer and the Cruz Maya.
$maya = $roxy->mesoamericanAstrology->generateMayanChart(date: $birth['date']);
// $maya['tzolkin'], ['haab'], ['longCount'], ['calendarRound'], ['yearBearer'], ['cross'], $maya['conventions']['correlation']
// Entrance analysis. Plot, facing and door in; the pada, its devata, the classical effect and the recommended padas out.
$entrance = $roxy->vastu->calculateEntrancePada(
plot: ['width' => 30, 'depth' => 40, 'unit' => 'feet'], facing: 'North', doorPosition: 0.4,
);
// $entrance['pada'], ['devata'], ['effect'], ['auspiciousness'], ['recommendedPadas'], ['source']
// Room compliance. A verdict per room with the verse or the convention it rests on, and a scored composite.
$rooms = $roxy->vastu->calculateRoomCompliance(
plot: ['width' => 30, 'depth' => 40, 'unit' => 'feet'],
facing: 'North',
rooms: [
['type' => 'kitchen', 'direction' => 'Southeast'],
['type' => 'master-bedroom', 'direction' => 'Southwest'],
['type' => 'puja', 'direction' => 'Northeast'],
],
);
// $rooms['score'], $rooms['rooms'][n]['type'], ['verdict'], ['idealDirections'], ['source']
// Life Path. The most searched numerology number, from the birth date alone.
$lifePath = $roxy->numerology->calculateLifePath(year: 1990, month: 1, day: 15);
// $lifePath['number'], $lifePath['type'] ('single' | 'master'), $lifePath['meaning']
// Full numerology chart. All six core numbers plus karmic lessons, pinnacles and the personal year in one call.
$numerology = $roxy->numerology->generateNumerologyChart(fullName: 'Jane Smith', year: 1990, month: 1, day: 15);
// $numerology['coreNumbers']['lifePath'], ['expression'], ['soulUrge'], $numerology['additionalInsights']['personalYear']
// Personal Year. The annual theme, the January feature of every numerology app.
$personalYear = $roxy->numerology->calculatePersonalYear(month: 1, day: 15, year: 2026);
// $personalYear['personalYear'], ['theme'], ['advice']
// Gematria. A Latin name transliterated under a declared convention, ten ciphers, each with its tradition and source.
$gematria = $roxy->kabbalah->calculateGematria(text: 'Sarah');
// $gematria['chosen'], $gematria['values'][n]['id'], ['name'], ['value'], $gematria['matches'], $gematria['conventions']
// Birth profile. The Hebrew date and birthday, the three birth angels and the birth sephirah from the instant above.
$kabbalah = $roxy->kabbalah->generateBirthProfile(date: $birth['date'], time: $birth['time'], timezone: $birth['timezone']);
// $kabbalah['hebrewDate'], ['hebrewBirthday'], ['angels'], ['sephirah']
// Daily card. `seed` and `date` are both optional: `date` (YYYY-MM-DD) defaults to today (UTC),
// and without a `seed` the reading is anonymous. The same seed and date always give the same card.
$card = $roxy->tarot->getDailyCard(seed: 'user-42');
// $card['card']['name'], $card['card']['reversed'], $card['card']['imageUrl'], $card['dailyMessage']
// Three-card spread. Past, present, future: the most drawn spread on every tarot platform.
$three = $roxy->tarot->castThreeCard(question: 'My next quarter', seed: 'user-42');
// $three['positions'][n]['name'], ['card']['name'], ['interpretation']; $three['summary']
// Celtic Cross. The ten-position professional reading.
$celtic = $roxy->tarot->castCelticCross(question: 'What should I focus on?', seed: 'user-42');
// $celtic['positions'][n]['name'], ['card']['name'], ['interpretation']; $celtic['summary']
// Yes or no. One card, one answer, with its strength.
$answer = $roxy->tarot->castYesNo(question: 'Should I take the offer?');
// $answer['answer'] ('Yes' | 'No' | 'Maybe'), $answer['strength'], $answer['card']['name']
// Biorhythm reading. All ten cycles for a date, from the same birth date as every chart above.
$bio = $roxy->biorhythm->getReading(birthDate: $birth['date'], targetDate: '2026-10-01');
// $bio['cycles']['physical']['value'], ['phase']; $bio['energyRating'], ['overallPhase'], ['criticalAlerts'], ['interpretation']
// Forecast. Every cycle for every day of a window, with the best and worst days named.
$bioForecast = $roxy->biorhythm->getForecast(birthDate: $birth['date'], startDate: '2026-10-01', endDate: '2026-10-31');
// $bioForecast['summary']['bestDay'], ['worstDay'], ['averageEnergy']; $bioForecast['days'][n]['date'], ['physical'], ['emotional'], ['intellectual'], ['isCritical']
// Constitution. The dosha profile read from the sidereal chart of the same birth, each factor with its verse.
$constitution = $roxy->ayurveda->calculateAyurvedicConstitution(...$birth);
// $constitution['composite'], $constitution['factors'][n]['id'], ['input'], ['doshas'], ['source'], $constitution['meta']['disclaimer']
// Dinacharya. Brahma muhurta, the dosha periods and the routine for a date at the place looked up above.
$dinacharya = $roxy->ayurveda->getDinacharyaSchedule(
date: '2026-10-01', latitude: $latitude, longitude: $longitude, timezone: $timezone,
);
// $dinacharya['brahmaMuhurta'], ['doshaPeriods'], ['routine']
// Cast a reading. Three coins six times: the primary hexagram, the changing lines and the resulting hexagram.
$reading = $roxy->iching->castReading(seed: 'user-42');
// $reading['hexagram']['number'], $reading['hexagram']['english'], $reading['lines'], ['changingLinePositions'], ['resultingHexagram']
// Hexagram catalog. Paginated, 20 per page by default; ask for all 64 once and cache them.
$hexagrams = $roxy->iching->listHexagrams(limit: 64);
// $hexagrams['total'], $hexagrams['hexagrams'][n]['number'], ['english'], ['pinyin']; call $roxy->iching->getHexagram(number: ...) for the judgment and lines
// By zodiac. The most searched crystal query pattern.
$bySign = $roxy->crystals->getCrystalsByZodiac(sign: 'scorpio');
// $bySign['crystals'][n]['id'], ['name'], ['imageUrl'], ['colors']; call $roxy->crystals->getCrystal(id: ...) for full properties
// By chakra. Wellness and yoga content pages.
$byChakra = $roxy->crystals->getCrystalsByChakra(chakra: 'Heart');
// $byChakra['crystals'][n]['name'], ['colors']
// Birthstone. Evergreen gift and jewelry pages.
$birthstone = $roxy->crystals->getBirthstones(month: 1);
// Symbol detail. Every "what does it mean to dream about X" page lands here.
$symbol = $roxy->dreams->getDreamSymbol(id: 'flying');
// $symbol['id'], ['name'], ['meaning']
// Symbol search. Chatbots fetch the dictionary once and keep it locally.
$symbols = $roxy->dreams->searchDreamSymbols(q: 'water');
// $symbols['symbols'][n]['id'], ['name']
// By number. Every "meaning of 1111" page is backed by this. The path param is a string.
$angel = $roxy->angelNumbers->getAngelNumber(number: '1111');
// $angel['title'], ['coreMessage'], $angel['meaning']['spiritual'], $angel['meaning']['love'], $angel['affirmation']
// Universal lookup. Any positive integer, with the digit root carrying the answer when no curated entry exists.
$sequence = $roxy->angelNumbers->analyzeNumberSequence(number: '4242');
// $sequence['digitRoot'], ['isRepeating'], ['knownMeaning'] (null when not curated), $sequence['digitRootMeaning']['title']
use function RoxyAPI\Sdk\createRoxy;
$roxy = createRoxy(getenv('ROXY_API_KEY'));
use RoxyAPI\Sdk\Retry\RetryPolicy;
use RoxyAPI\Sdk\RoxyApiException;
use function RoxyAPI\Sdk\createRoxy;
$roxy = createRoxy(
getenv('ROXY_API_KEY'),
new RetryPolicy(maxRetries: 4, initialDelayMs: 500, maxDelayMs: 30000),
);
try {
$roxy->astrology->getDailyHoroscope(sign: 'aries');
} catch (RoxyApiException $e) {
// e.g. 429 rate_limit_per_minute or 503 compute_saturated after the retries ran out
error_log("{$e->errorCode} {$e->docUrl} retry in {$e->retryAfter}s");
}
use RoxyAPI\Sdk\Generated\Requests\GetDailyHoroscopeRequest;
use Saloon\Http\Faking\MockClient;
use Saloon\Http\Faking\MockResponse;
use function RoxyAPI\Sdk\createRoxy;
$roxy = createRoxy('test-key');
$roxy->withMockClient(new MockClient([
GetDailyHoroscopeRequest::class => MockResponse::make([
'sign' => 'aries', 'overview' => 'fixture',
]),
]));
$result = $roxy->astrology->getDailyHoroscope(sign: 'aries');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.