PHPackages                             astroway/sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. astroway/sdk

ActiveLibrary[HTTP &amp; Networking](/categories/http)

astroway/sdk
============

Official PHP SDK for the AstroWay API — natal, synastry, transits, Vedic, Human Design, Tarot, Numerology, AI horoscopes. Type-safe, retry-aware, OpenAPI 3.1 generated.

v1.1.0(2w ago)0342MITPHPPHP ^8.2CI passing

Since May 10Pushed 2w agoCompare

[ Source](https://github.com/astroway/astroway-php)[ Packagist](https://packagist.org/packages/astroway/sdk)[ Docs](https://api.astroway.info/docs/)[ RSS](/packages/astroway-sdk/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (4)Dependencies (12)Versions (5)Used By (2)

astroway/sdk
============

[](#astrowaysdk)

> Official PHP SDK for the [AstroWay API](https://api.astroway.info) — natal charts, synastry, transits, Vedic dashas, Tarot, Numerology, Human Design, AI horoscopes. Type-safe, retry-aware, PSR-18 compatible.

[![Latest Version](https://camo.githubusercontent.com/7717ed1195e48c76a8178ebe216a2fc59d9cae2f7e1b47d8d8b3d974cd5abcc6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617374726f7761792f73646b2e7376673f7374796c653d666c617426636f6c6f723d626c7565)](https://packagist.org/packages/astroway/sdk)[![PHP version](https://camo.githubusercontent.com/8acf57510dda295c8b122e8fe346b2d996cb14d6040394e1da657f47a4ee398d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f617374726f7761792f73646b2e737667)](https://packagist.org/packages/astroway/sdk)[![license: MIT](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)

700+ endpoints. Pure **PSR-18 / PSR-17** — bring your own HTTP client (Guzzle, Symfony, Buzz, …) or let auto-discovery pick one. Built-in retry on 408/409/429/5xx with exponential backoff. Stainless-style error hierarchy (`AuthenticationError` / `RateLimitError` / `BadRequestError` / …). PHP 8.1+.

---

Install
-------

[](#install)

```
composer require astroway/sdk
```

The SDK requires a PSR-18 HTTP client. If you don't already have one, the simplest path is:

```
composer require guzzlehttp/guzzle nyholm/psr7
```

Already using Symfony's HTTP client, Buzz, or another PSR-18 implementation? `php-http/discovery` (a transitive dep of this SDK) auto-finds it. Or pass it explicitly:

```
$aw = new Astroway([
    'apiKey'        => getenv('ASTROWAY_API_KEY'),
    'httpClient'    => $myPsr18Client,    // any Psr\Http\Client\ClientInterface
    'requestFactory'=> $myRequestFactory, // optional Psr\Http\Message\RequestFactoryInterface
    'streamFactory' => $myStreamFactory,  // optional Psr\Http\Message\StreamFactoryInterface
]);
```

Get an API key at  — **10 000 credits/month free**, no card required. Each endpoint costs 5–500 credits depending on what it computes ([pricing](https://api.astroway.info/pricing/)).

---

Quick start
-----------

[](#quick-start)

```
