Sky Scanner

FREEMIUM
От Things4u | Обновлено a day ago | Travel
Популярность

9.9 / 10

Задержка

3,236ms

Уровень обслуживания

100%

Health Check

N/A

Назад ко всем обсуждениям

Direct flights only

Rapid account: Iamadamgoodman
iamadamgoodman
a month ago

Hello
How can i get the direct flights only ?
Its too much data that i really do not need

Rapid account: Ntd 119
ntd119 Commented 10 days ago

Hi,

I have investigated your case. In this case, there are no direct flights (direct->isPresent=false).
https://drive.google.com/file/d/1gAvB1GZxz25qySEH6fgINS0oxGk9gwOr/view?usp=sharing

Therefore, when calling the endpoint with stops=direct, there will be no data in the ‘itineraries’ item.
The endpoint returned the correct result.
We only filter direct flights in the ‘itineraries’ item.
We do not change other items. You can filter according to your own purposes.

Thanks.

Rapid account: Ntd 119
ntd119 Commented 11 days ago

Hi,

The API from the Skyscanner website does not provide a parameter to filter for direct flights.
Therefore, we have been filtering them ourselves, which may result in errors.
You can filter and get the flights according to your preferences.
We will investigate the issue you are encountering.

Thanks

Rapid account: Iamadamgoodman
iamadamgoodman Commented 11 days ago

Hello
is still cant figure out how to get the direct flights only …
The server reruns data which contain all the possible flights that i do not really need .
My project depends only on the direct (no stops flights).
I tried stops=direct . stops=0 . But no luck…
here is my request
https://sky-scanner3.p.rapidapi.com/flights/search-roundtrip?fromEntityId=FCO&toEntityId=SSH&departDate=2024-05-25&returnDate=2024-05-31&currency=EUR&stops=0&adults=2&cabinClass=economy

image

Rapid account: Ntd 119
ntd119 Commented a month ago

Hi,

You need to use the /flights/detail endpoint to get the list of prices.
Note: The prices displayed on the website will be rounded compared to the prices in the endpoint.
Please refer to the image for a better understanding
https://drive.google.com/file/d/15q4BP9VaA0s0Zx20EOWXO5Hn2hGzkW0n/view

Thanks.

Rapid account: Ntd 119
ntd119 Commented a month ago

Hi,

Regarding the’stops’ parameter, you have passed the wrong value.
The ‘stops’ parameter have the values I listed: direct,1stop,2stops.
It is not the number.
As for the price, we will investigate and notify you as soon as possible

Thanks.

Rapid account: Iamadamgoodman
iamadamgoodman Commented a month ago

Thanks
i tried to add stops=0 to the endpoint but i still get another 2 options in the data (One and twoOrMore) which i dont reaaly need.
Also the data comes that way that make it impossible to know which price is relative to which flight, even after parsing and looping into.

Rapid account: Ntd 119
ntd119 Commented a month ago

Hi,

I have just added the ‘stops’ parameter to the following endpoints.
Now you can use it to get direct flights.
/flights/search-roundtrip
/flights/search-one-way
/flights/search-multi-city
/flights/search-incomplete

Thanks.

Rapid account: Ntd 119
ntd119 Commented a month ago

Hi,

The Skyscanner API does not have a parameter to get direct flights.
Instead, it retrieves full data, and then filters direct flights on the website.
We are currently investigating how to filter direct flights in the list of flights, and will notify you when we have results.

Thanks.

Присоединяйтесь к обсуждению – добавьте комментарий ниже:

Войдите / Зарегистрируйтесь, чтобы публиковать новые комментарии