PHPackages                             rubin/opensky - 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. rubin/opensky

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

rubin/opensky
=============

OpenSky REST API connector

1.0.2(1y ago)18PHPPHP &gt;=8.2.0

Since Jun 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/xRubin/OpenSky)[ Packagist](https://packagist.org/packages/rubin/opensky)[ RSS](/packages/rubin-opensky/feed)WikiDiscussions master Synced yesterday

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

OpenSky REST API
================

[](#opensky-rest-api)

[![Build Status](https://github.com/xRubin/OpenSky/workflows/CI/badge.svg)](https://github.com/xRubin/OpenSky/actions)[![Latest Stable Version](https://camo.githubusercontent.com/0f4c1f389c97f16a55385d72cb359fd1a4434fba40455a7e984f3adbcf9c7bef/687474703a2f2f706f7365722e707567782e6f72672f727562696e2f6f70656e736b792f76)](https://packagist.org/packages/rubin/opensky)[![Coverage Status](https://camo.githubusercontent.com/db0b08e172ccaf874dd31c8557a62c95a8eb578f819c97f134275d1d80382ade/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f78527562696e2f4f70656e536b792f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/xRubin/OpenSky?branch=master)[![PHP Version Require](https://camo.githubusercontent.com/a01bfb2beb0138fea52b04e02a4278e4e5be6bc65ea5ebcbe2489d8901a67e30/687474703a2f2f706f7365722e707567782e6f72672f727562696e2f6f70656e736b792f726571756972652f706870)](https://packagist.org/packages/rubin/opensky)

PHP implementation for the [OpenSky Network](https://opensky-network.org/) REST API. This library is based on the [REST API docs](https://opensky-network.org/apidoc/rest.html).

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

[](#installation)

With composer:

```
composer require rubin/opensky
```

Usage
-----

[](#usage)

Create API connector:

```
$openSkyApi = new \OpenSky\OpenSkyApi();
```

Set credentials (optional):

```
$openSkyApi->setCredentials('{username}', '{password}');
```

Refer to the [limitations](https://opensky-network.org/apidoc/rest.html#limitations), to see why/when a user account would be preferred.

Examples
--------

[](#examples)

Example query with time and aircraft: [https://opensky-network.org/api/states/all?time=1458564121&amp;icao24=3c6444](https://opensky-network.org/api/states/all?time=1458564121&icao24=3c6444)

```
echo "ICAO\tLongitude\tLatitude\n";
foreach ($openSkyApi->getStatesAll(time: 1458564121, icao24: '3c6444')->getStates() as $state) {
    printf(
        "%s\t%f\t%f\n",
        $state->getIcao24(),
        $state->getLongitude(),
        $state->getLatitude()
    );
}
```

Example query with bounding box covering Switzerland: [https://opensky-network.org/api/states/all?lamin=45.8389&amp;lomin=5.9962&amp;lamax=47.8229&amp;lomax=10.5226](https://opensky-network.org/api/states/all?lamin=45.8389&lomin=5.9962&lamax=47.8229&lomax=10.5226)

```
echo "ICAO\tLongitude\tLatitude\n";
foreach ($openSkyApi->getStatesAll(bBox: new \OpenSky\BoundingBox(45.8389, 47.8229, 5.9962, 10.5226))->getStates() as $state) {
    printf(
        "%s\t%f\t%f\n",
        $state->getIcao24(),
        $state->getLongitude(),
        $state->getLatitude()
    );
}
```

Retrieve states of two particular airplanes: [https://opensky-network.org/api/states/all?icao24=3c6444&amp;icao24=3e1bf9](https://opensky-network.org/api/states/all?icao24=3c6444&icao24=3e1bf9)

```
echo "ICAO\tLongitude\tLatitude\n";
foreach ($openSkyApi->getStatesAll(icao24: ['3c6444', '3e1bf9'])->getStates() as $state) {
    printf(
        "%s\t%f\t%f\n",
        $state->getIcao24(),
        $state->getLongitude(),
        $state->getLatitude()
    );
}
```

Get flights from 12pm to 1pm on Jan 29 2018: [https://opensky-network.org/api/flights/all?begin=1517227200&amp;end=1517230800](https://opensky-network.org/api/flights/all?begin=1517227200&end=1517230800)

```
echo "ICAO\tDep  - Arr\n";
foreach ($openSkyApi->getFlightsAll(begin: 1517227200, end: 1517230800)->getFlights() as $flight) {
    printf(
        "%s\t%s - %s\n",
        $flight->getIcao24(),
        $flight->getEstDepartureAirport() ?: '----',
        $flight->getEstArrivalAirport() ?: '----'
    );
}
```

Get flights for D-AIZZ (3c675a) on Jan 29 2018: [https://opensky-network.org/api/flights/aircraft?icao24=3c675a&amp;begin=1517184000&amp;end=1517270400](https://opensky-network.org/api/flights/aircraft?icao24=3c675a&begin=1517184000&end=1517270400)

```
echo "ICAO\tDep  - Arr\n";
foreach ($openSkyApi->getFlightsAircraft(icao24: '3c675a', begin: 1517227200, end: 1517230800)->getFlights() as $flight) {
    printf(
        "%s\t%s - %s\n",
        $flight->getIcao24(),
        $flight->getEstDepartureAirport() ?: '----',
        $flight->getEstArrivalAirport() ?: '----'
    );
}
```

Get all flights arriving at Frankfurt International Airport (EDDF) from 12pm to 1pm on Jan 29 2018: [https://opensky-network.org/api/flights/arrival?airport=EDDF&amp;begin=1517227200&amp;end=1517230800](https://opensky-network.org/api/flights/arrival?airport=EDDF&begin=1517227200&end=1517230800)

```
echo "ICAO\tDep  - Arr\n";
foreach ($openSkyApi->getFlightsArrival(airport: 'EDDF', begin: 1517227200, end: 1517230800)->getFlights() as $flight) {
    printf(
        "%s\t%s - %s\n",
        $flight->getIcao24(),
        $flight->getEstDepartureAirport() ?: '----',
        $flight->getEstArrivalAirport() ?: '----'
    );
}
```

Get all flights departing at Frankfurt International Airport (EDDF) from 12pm to 1pm on Jan 29 2018: [https://opensky-network.org/api/flights/departure?airport=EDDF&amp;begin=1517227200&amp;end=1517230800](https://opensky-network.org/api/flights/departure?airport=EDDF&begin=1517227200&end=1517230800)

```
echo "ICAO\tDep  - Arr\n";
foreach ($openSkyApi->getFlightsDeparture(airport: 'EDDF', begin: 1517227200, end: 1517230800)->getFlights() as $flight) {
    printf(
        "%s\t%s - %s\n",
        $flight->getIcao24(),
        $flight->getEstDepartureAirport() ?: '----',
        $flight->getEstArrivalAirport() ?: '----'
    );
}
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Every ~13 days

Total

3

Last Release

711d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

restOpenSky

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rubin-opensky/health.svg)

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

###  Alternatives

[xeroapi/xero-php-oauth2

Xero official PHP SDK for oAuth2 generated with OpenAPI spec 3

1054.7M18](/packages/xeroapi-xero-php-oauth2)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34216.9k2](/packages/onesignal-onesignal-php-api)[dreamfactory/df-core

DreamFactory(tm) Core Components

1652.1k38](/packages/dreamfactory-df-core)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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