By topic / PHP and Laravel
Integrations
Astrology API for PHP and Laravel
Install the official PHP client from Packagist. It reads the key from `ASTRO_API_KEY`, retries rate limits for you, adds idempotency keys, and ships a Laravel service provider and an `Astro96` facade. Inside WordPress it uses the WordPress HTTP API.
Ideas
What people build with it
A kundli page in a Laravel app
A WordPress plugin with a daily panchang
Matching on a PHP matrimony site
Reference
The endpoints
- Planet PositionsSidereal longitude, sign and sign lord, nakshatra, nakshatra lord and pada, house, speed, retrograde and combust flags for the Ascendant, the nine grahas and Uranus, Neptune and Pluto.POST/v1/vedic-charts/planet-positions 3 credits
- Daily PanchangThe full panchang for one day at one place: limbs, Sun and Moon times, calendar, auspicious and inauspicious periods, choghadiya, hora, festivals, balas, sunrise chart, doshas and more.POST/v1/panchang/daily-panchang 1 credit
- Kundli Matching (Ayu Milan)Ashtakoot matching from two births: koota scores and total, Manglik for both with cancellations, Papasamya, Rajju and Vedha, and classical longevity (Ayurdaya) spans for each.POST/v1/matching/ayu-milan 3 credits
- Complete Kundli ReportEvery part of a chart in one report: birth details, planets, strengths, dashas, doshas, yogas, predictions, gemstones and rudraksha. As a PDF it prints six divisional charts.POST/v1/reports/report-complete-kundli 100 credits
- Place SearchSearches about 780,000 places by name, in any script, and returns coordinates, IANA zone and the UTC offset in force on a given date/time. Fast enough to call as someone types.POST/v1/utilities/geo-search 1 credit
Code
Your first call
composer require 96astro/apiuse Astro96\Api\Client;
$astro = new Client(); // reads ASTRO_API_KEY
$res = $astro->vedicCharts->planetPositions([
'datetime' => '1990-10-18T14:30:00', 'timezone' => 'Asia/Kolkata',
'latitude' => 28.6139, 'longitude' => 77.209,
]);
echo $res->data['ascendant']['sign'];use Astro96\Api\Laravel\Facades\Astro96;
$chart = Astro96::client()->vedicCharts->planetPositions($birth)->data;Start building with PHP and Laravel
5,000 free trial credits. No card required.

