I am using Python and I am reading the documentation and using the Get request to search for Flights under a certain price for a project in my online course. I am able to get my requests to go through successfully and return data that I need, but I am trying to search for flights within a 6 month window. Right now I am entering a static date. I am putting in all the required parameters, but I cannot seem to find anywhere I can specify a window for my departure date. A “from” and “to” date specification would be nice. The documentation is at the URL below.
https://developers.amadeus.com/self-service/category/flights/api-doc/flight-offers-search/api-reference
The only thing I can find under “Models” is the dateTimeRange, which only allows you to search within 3 days of the date you input. Even this, no matter how I put it in the parameters, tells me it is an “Invalid query parameter”. I need to search within 180 days. I thought if I could at least get this 3 day window to work I could just loop it 60 times.
Wondering if anyone knows a better way to search within this 6 month window, or if you know how to get this dateTimeRange to work.
I have tried entering another parameter as “dateTimeRange”: “I3D”.
I’ve tried “dateWindow”: “I3D”.
I’ve tried
“dateTimeRange”: {
“date”: “2024-07-04”,
“dateWindow”: “I3D”
}.
All give me to same “Invalid query parameter”.
Taylor Python is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.