Sky Scanner

FREEMIUM
Por Things4u | Atualizado a day ago | Travel
Popularidade

9.9 / 10

Latência

3,236ms

Nível de serviço

100%

Health Check

N/A

Voltar para todas as discussões

Not able to get all airports from Airport Endpoint

Rapid account: Georgek 97
georgek97
14 days ago

Hello,

When I run the Airport endpoint, I am not able to get all the airports as it stops alphabetically at RZZ.

There are still airports after RZZ (e.g., YUl, YYZ, etc.)

What should I do to get around this

Thanks

Rapid account: Ntd 119
ntd119 Commented 13 days ago

Hi,

The Skyscanner API does not provide a list of airports. The /flights/airports endpoint contains airports that I have collected from many websites, so it is not complete.

I have just added the /flights/skyId-list endpoint, which is a list of skyIds that I have gathered from the /flights/auto-complete endpoint.

I have noticed that skyId is similar to the airport code, so I hope this will be helpful to you.

Thanks.

Rapid account: Georgek 97
georgek97 Commented 13 days ago

Hello!

Apologies I wasn’t clear. When I use the following script in Python, I do not get the full list of airports. It stops after the letter R. For example, this script would not return YYZ even though it is a valide commercial airport.

What do you suggest I do?

Script here:

import requests

url = “https://sky-scanner3.p.rapidapi.com/flights/airports

headers = {
“X-RapidAPI-Key”: “xxxxxx”,
“X-RapidAPI-Host”: “sky-scanner3.p.rapidapi.com
}

response = requests.get(url, headers=headers)

print(response.json())

Rapid account: Ntd 119
ntd119 Commented 14 days ago

Hi,

The airports RZZ and YUL do not exist on the Skyscanner website, so you cannot search with those airports. The airport YYZ works normally.

Thanks.

Junte-se à discussão - adicione o comentário abaixo:

Efetue login / inscreva-se para postar novos comentários