Sky Scanner

FREEMIUM
Par Things4u | Mise à jour a day ago | Travel
Popularité

9.9 / 10

Latence

3,236ms

Niveau de service

100%

Health Check

N/A

Retour à toutes les discussions

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 13 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.

Participez à la discussion - ajoutez un commentaire ci-dessous:

Connectez-vous / Inscrivez-vous pour publier de nouveaux commentaires