PHPackages                             cbzink/launchlibrary - 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. cbzink/launchlibrary

AbandonedArchivedLibrary

cbzink/launchlibrary
====================

An unofficial SDK for Launch Library 2.

v1.0.1(3y ago)14MITPHP

Since Aug 6Pushed 3y ago1 watchersCompare

[ Source](https://github.com/cbzink/launchlibrary)[ Packagist](https://packagist.org/packages/cbzink/launchlibrary)[ RSS](/packages/cbzink-launchlibrary/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Launch Library 2 SDK for PHP
============================

[](#launch-library-2-sdk-for-php)

[![Build Status](https://github.com/cbzink/launchlibrary/workflows/tests/badge.svg)](https://github.com/cbzink/launchlibrary/actions) [![Latest Stable Version](https://camo.githubusercontent.com/f64b07abbb64ce365602ba66720c54f46af6a6ef24f3316e04b8666d21f05f37/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63627a696e6b2f6c61756e63686c696272617279)](https://packagist.org/packages/cbzink/launchlibrary) [![Total Downloads](https://camo.githubusercontent.com/9e336ec6b7e0f70c7b4a82434a135318fe3f56aba7b874cd48836e609ace075e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63627a696e6b2f6c61756e63686c696272617279)](https://packagist.org/packages/cbzink/launchlibrary) [![License](https://camo.githubusercontent.com/4ae7cdbdb5a94410ea395fb3983e6be4cce47b89e84756f527a94c55850fad52/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f63627a696e6b2f6c61756e63686c696272617279)](https://packagist.org/packages/cbzink/launchlibrary)

A simple SDK for interacting with the [Launch Library 2 API](https://thespacedevs.com/llapi).

Table of Contents
-----------------

[](#table-of-contents)

 View the table of contents.
- [Launch Library 2 SDK for PHP](#launch-library-2-sdk-for-php)
    - [Requirements](#requirements)
    - [Installation](#installation)
    - [Usage](#usage)
        - [Setup](#setup)
            - [Pagination limits](#pagination-limits)
        - [Resources](#resources)
        - [Searching for resources](#searching-for-resources)
            - [Pagination](#pagination)
        - [Retrieving resources](#retrieving-resources)
        - [Special cases](#special-cases)
            - [Events and Launches](#events-and-launches)
        - [Spacecraft](#spacecraft)

- [Acknowledgements](#acknowledgements)
- [License](#license)

Requirements
------------

[](#requirements)

- PHP &gt;= 7.4
- A LL2 API token *(Optional)*

Installation
------------

[](#installation)

Install this library via [Composer](https://getcomposer.org/).

```
composer require cbzink/launchlibrary

```

Usage
-----

[](#usage)

### Setup

[](#setup)

Instantiate an instance of the LL2 class

```
use cbzink\LaunchLibrary\LL2;

$client = new LL2($apiToken, $apiEndpoint);
```

ParameterRequired?Description`$apiToken`NoProvide your own API token for increased rate limits. Default none.`$apiEndpoint`NoProvide an alternate API endpoint for switching between prod and dev environments. Default production.#### Pagination limits

[](#pagination-limits)

You can change the pagination limit (default `10`) using `setPaginationLimit`.

```
$client->setPaginationLimit(30);

$client->getPaginationLimit() // (int) 30
```

### Resources

[](#resources)

Currently available resources include Agencies, Astronauts, Docking Events, Events, Expeditions, Launchers, Launches, Locations, Pads, Space Stations, and Spacecraft.

### Searching for resources

[](#searching-for-resources)

You can search for resources using the parameters specified in the [LL2 API docs](https://ll.thespacedevs.com/2.2.0/swagger/).

```
$results = $client->agencies()->search([
    'country_code' => 'US',
]);
```

#### Pagination

[](#pagination)

Searches are often paginated. An array of resources is available under the `results` property, and `next()` and `previous()` methods are available for moving through pagination.

```
$agencies = $client->agencies()->search();

// Array of Agency resources.
$resources = $agencies->results;

// Fetch the next page of results
$agencies = $agencies->next();
```

### Retrieving resources

[](#retrieving-resources)

You can retrieve detailed resources by their ID.

```
$results = $client->agencies()->fetch(123);
```

### Special cases

[](#special-cases)

#### Events and Launches

[](#events-and-launches)

Events and Launches have additional Previous and Upcoming endpoints you can access using the SDK. `search()` and `fetch()` are available on both.

```
// Previous
$results = $client->events()->previous()->search();

// Upcoming
$results = $client->launches()->upcoming()->search();
```

### Spacecraft

[](#spacecraft)

Spacecraft have an additional Flights endpoint you can access using the SDK. `search()` and `fetch()` are available on both.

```
$results = $client->spacecraft()->flights()->search();
```

Acknowledgements
----------------

[](#acknowledgements)

Inspiration for the design of this SDK was taken from [laravel/forge-sdk](https://github.com/laravel/forge-sdk) and [KnpLabs/php-github-api](https://github.com/KnpLabs/php-github-api).

License
-------

[](#license)

Launch Library 2 SDK for PHP is open source software licensed under the [MIT license](LICENSE.md).

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1379d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b62a9e88680a3ecde0b884cabc2d027422ead75efb01faf978d056572650b336?d=identicon)[cbzink](/maintainers/cbzink)

---

Top Contributors

[![cbzink](https://avatars.githubusercontent.com/u/12833132?v=4)](https://github.com/cbzink "cbzink (6 commits)")[![charleshacks](https://avatars.githubusercontent.com/u/44277074?v=4)](https://github.com/charleshacks "charleshacks (1 commits)")

---

Tags

launchlibraryphp

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/cbzink-launchlibrary/health.svg)

```
[![Health](https://phpackages.com/badges/cbzink-launchlibrary/health.svg)](https://phpackages.com/packages/cbzink-launchlibrary)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
