PHPackages                             lsv/airlabs - 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. lsv/airlabs

ActiveLibrary

lsv/airlabs
===========

v1.0.0(3y ago)07MITPHPPHP &gt;=8.2

Since Jan 31Pushed 3y ago2 watchersCompare

[ Source](https://github.com/lsv/airlabs)[ Packagist](https://packagist.org/packages/lsv/airlabs)[ RSS](/packages/lsv-airlabs/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (22)Versions (2)Used By (0)

Airlabs API
-----------

[](#airlabs-api)

[![Workflow](https://github.com/lsv/airlabs/actions/workflows/ci.yml/badge.svg)](https://github.com/lsv/airlabs/actions/workflows/ci.yml/badge.svg)

PHP Wrapper for [Airlabs APIs](https://airlabs.co/)

Install
-------

[](#install)

```
composer require lsv/airlabs
```

Usage
-----

[](#usage)

### Quick example

[](#quick-example)

To get flight information

```
require 'vendor/autoload.php';
$apikey = '';
$factory = new \Lsv\Airlabs\RequestFactory($apikey);

$request = new \Lsv\Airlabs\Request\FlightInformationRequest(
    flightCode: new \Lsv\Airlabs\Utils\IcaoIataCode(null, 'AA6')
);
$response = $factory->call($request);
echo $response->depTime; // Would write departure time for this aircraft
```

### Factory

[](#factory)

```
require 'vendor/autoload.php';
$apikey = '';
$factory = new \Lsv\Airlabs\RequestFactory($apikey);

$request = instance of \Lsv\Airlabs\RequestInterface::class;
// See below for requests available
$response = $factory->call($request);
```

### Requests

[](#requests)

#### Airline Fleet

[](#airline-fleet)

```
$request = new \Lsv\Airlabs\Request\AirlineFleetRequest()
$optionalParameters = [
    'airlineCode' => new \Lsv\Airlabs\Utils\IcaoIataCode('icao', 'iata'), // only add either icao or iata code
    'hex' => 'H12345', // ICAO24 Hex address
    'reg_number' => 'OY-123', // Aircraft registration number
    'msn' => '', // Manufacturer Serial Number
    'flag' => 'DK' // Country code
];
$request = new \Lsv\Airlabs\Request\AirlineFleetRequest(...$optionalParameters);

// Response
array of \Lsv\Airlabs\Response\AirlineFleetResponse()
// If using a free account
array of \Lsv\Airlabs\Response\AirlineFleetFreeResponse()
```

#### Airline

[](#airline)

```
$request = new \Lsv\Airlabs\Request\AirlineRequest()
$optionalParameters = [
    'airlineCode' => new \Lsv\Airlabs\Utils\IcaoIataCode('icao', 'iata'), // only add either icao or iata code
    'iataPrefix' => '1', // IATA prefix number
    'iataAccounting' => '1', // IATA accounting number
    'callsign' => 'AMERICAN', // ICAO callsign
    'name' => 'American Airlines', // Airline name
    'countryCode' => 'DK' // Country code
];
$request = new \Lsv\Airlabs\Request\AirlineFleetRequest(...$optionalParameters);

// Response
array of \Lsv\Airlabs\Response\AirlineResponse()
// If using a free account
array of \Lsv\Airlabs\Response\AirlineFreeResponse()
```

#### Airline Route

[](#airline-route)

```
$requiredParameters = [
    'departureAirport' => new \Lsv\Airlabs\Utils\IcaoIataCode('icao', 'iata'), // only add either icao or iata code
    'arrivalAirport' => new \Lsv\Airlabs\Utils\IcaoIataCode('icao', 'iata'), // only add either icao or iata code
    'airlineCode' => new \Lsv\Airlabs\Utils\IcaoIataCode('icao', 'iata'), // only add either icao or iata code
];
$request = new \Lsv\Airlabs\Request\AirlineRouteRequest(...$requiredParameters);

$optionalParameters = [
    'flightCode' => new \Lsv\Airlabs\Utils\IcaoIataCode('icao', 'iata'), // only add either icao or iata code
    'flightNumber' => '1', // Flight number
];
$request = new \Lsv\Airlabs\Request\AirlineRouteRequest(...array_merge($requiredParameters, $optionalParameters));

array of \Lsv\Airlabs\Response\AirlineRouteResponse()
// If using a free account
array of \Lsv\Airlabs\Response\AirlineFreeResponse()
```

#### Flight Information

[](#flight-information)

```
$requiredParameters = [
    'flightCode' => new \Lsv\Airlabs\Utils\IcaoIataCode('icao', 'iata'), // only add either icao or iata code
];
$request = new \Lsv\Airlabs\Request\FlightInformationRequest(...$requiredParameters);

instance of new \Lsv\Airlabs\Response\FlightInformationResponse()
```

#### Flight Schedule

[](#flight-schedule)

```
$requiredParameters = [
    'departureAirport' => new \Lsv\Airlabs\Utils\IcaoIataCode('icao', 'iata'), // only add either icao or iata code
    'arrivalAirport' => new \Lsv\Airlabs\Utils\IcaoIataCode('icao', 'iata'), // only add either icao or iata code
    'airlineCode' => new \Lsv\Airlabs\Utils\IcaoIataCode('icao', 'iata'), // only add either icao or iata code
];
$request = new \Lsv\Airlabs\Request\FlightScheduleRequest(...$requiredParameters);

$optionalParameters = [
    'flightCode' => new \Lsv\Airlabs\Utils\IcaoIataCode('icao', 'iata'), // only add either icao or iata code
    'flightNumber' => '1', // Flight number
];
$request = new \Lsv\Airlabs\Request\FlightScheduleRequest(...array_merge($requiredParameters, $optionalParameters));

array of \Lsv\Airlabs\Response\FlightScheduleResponse()
```

#### Flight Tracker

[](#flight-tracker)

```
$request = new \Lsv\Airlabs\Request\FlightTrackerRequest();

$optionalParameters = [
    'box' => new \Lsv\Airlabs\Utils\BoundaryBox($swLat, $swLng, $neLat, $neLng), // Boundary box from where you want data from
    'hex' => '1', // ICAO24 Hex address
    'registrationNumber' => '1', // Aircraft Registration number.
    'airlineCode' => new \Lsv\Airlabs\Utils\IcaoIataCode('icao', 'iata'), // Airline code
    'flag' => 'DK', // Country code
    'flightCode' => new \Lsv\Airlabs\Utils\IcaoIataCode('icao', 'iata'), // Flight code
    'flightNumber' => '1', // Flight number
    'departureAirport' => new \Lsv\Airlabs\Utils\IcaoIataCode('icao', 'iata'), // Departure airport
    'arrivalAirport' => new \Lsv\Airlabs\Utils\IcaoIataCode('icao', 'iata'), // Arrival airport
];
$request = new \Lsv\Airlabs\Request\FlightTrackerRequest(...$optionalParameters);

array of \Lsv\Airlabs\Response\FlightTrackerResponse()
```

License
-------

[](#license)

MIT License

Copyright (c) 2023 Martin Aarhof

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

25

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1145d ago

### Community

Maintainers

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

---

Top Contributors

[![lsv](https://avatars.githubusercontent.com/u/20708?v=4)](https://github.com/lsv "lsv (4 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/lsv-airlabs/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.5M596](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k14.6k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

605.0M332](/packages/shopware-core)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.7k3.6M345](/packages/pimcore-pimcore)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M115](/packages/typo3-cms)

PHPackages © 2026

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