This is an unofficial PHP SDK for the Skyscanner's API to support Flights, Car Hire, Localisation and Places services.
Currently, all of the services are implemented and tested.
Note: Hotels service is missing, because it is currently unavailable.
Via Composer
$ composer require ozdemirburak/skyscanner-php
Please see the wiki for more detailed information about the methods and the parameters.
You can find a simple demonstration of how to use the methods below, or check the tests for more advanced examples.
use OzdemirBurak\SkyScanner\Travel\Flights\LivePricing;
$pricing = new LivePricing($apiKey = 'your-api-key', $country = 'GB', $currency = 'GBP', $locale = 'en-GB');
$pricing->setParameters([
'adults' => 1,
'destinationplace' => 'IST',
'originplace' => 'LHR',
'outbounddate' => date('Y-m-d', strtotime('+1 week')),
'stops' => 0
]);
$flights = $pricing->getFlights($onlyFirstAgentPerItinerary = true);
use OzdemirBurak\SkyScanner\Travel\Flights\BrowseCache;
$cache = new BrowseCache($apiKey = 'your-api-key', $country = 'GB', $currency = 'GBP', $locale = 'en-GB');
$cache->setParameters([
'destinationPlace' => 'IST',
'originPlace' => 'LHR',
'outboundPartialDate' => date('Y-m-d', strtotime('+1 week')),
]);
$quotes = $cache->getPrices()['Quotes'];
use OzdemirBurak\SkyScanner\Travel\CarHire\LivePricing;
$pricing = new LivePricing($apiKey = 'your-api-key', $country = 'GB', $currency = 'GBP', $locale = 'en-GB');
$pricing->setParameters([
'dropoffplace' => 'ADB',
'dropoffdatetime' => date('Y-m-d\TH:i', strtotime('+2 week')),
'pickupplace' => 'IST',
'pickupdatetime' => date('Y-m-d\TH:i', strtotime('+1 week')),
'driverage' => 21
]);
$cars = $pricing->getCars();
use OzdemirBurak\SkyScanner\Localisation\Currency;
$currency = new Currency($apiKey = 'your-api-key');
$currencies = $currency->get();
use OzdemirBurak\SkyScanner\Localisation\Locale;
$locale = new Locale($apiKey = 'your-api-key');
$locales = $locale->get();
use OzdemirBurak\SkyScanner\Localisation\Market;
$market = new Market($apiKey = 'your-api-key', $locale = 'en-GB'));
$countries = $market->get();
use OzdemirBurak\SkyScanner\PlacesService;
$places = new PlacesService($apiKey = 'your-api-key');
$geoCatalog = $places->get();
$list = $places->getList('UK', 'GBP', 'en-GB', 'istanbul');
$information = $places->getInformation('UK', 'GBP', 'en-GB', 'CDG-sky');
$hotels = $places->getHotels('UK', 'EUR', 'en-GB', 'paris');
Please see CHANGELOG for more information what has changed recently.
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email mail@burakozdemir.co.uk instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.