Amadeus Python SDK discrepancies in airport suggestions
Hello I have been trying to get airport IATA/recommendations/search using the Amadeus Airports search endpoint with lat, long codes as follows, but when I search for Prague it returns airports from Munich which is way far from Prague. But when I later try using PRG for flight_offers_search it works fine [Just tried this to see if there are any PRG airports supported].
I don't understand why I am unable to get any airports from Prague. Please help me solve this issue. Below is the python SDK code I use.
from amadeus import Client
amadeus = Client(
client_id='YOUR_ID',
client_secret='YOUR_SECRET')
#airport search test
response = amadeus.reference_data.locations.airports.get(
latitude=50.0755381,
longitude=14.4378005,
)
print(response.data)
#offer search test
kwargs_trip_purpose = {
"originLocationCode": "PRG",
"destinationLocationCode": "SFO",
"departureDate": "2024-08-22", #Please change dates accordingly
"returnDate": "2024-08-30", #Please change dates accordingly
"adults": 1,
"currencyCode": "USD"
}
offers_search_output = amadeus.shopping.flight_offers_search.get(**kwargs_trip_purpose).data
@minjikarin @cbetta @anthonyroux Please let me know how I can solve this or if I am making some mistake in the way I am using this API.
@niranjanakella This is most probably because you are using the test environment.
According to their docs on Free test data collection of Self-Service APIs, the Airport Nearest Relevant API supports cities in Germany, while the Flight Offers Search API returns cached data including most cities/countries.
Moving your application to the production environment should solve this issue.