can't fetch flight prices data

173 Views Asked by At

I have tried keeping yesterday's date, today's date but still showing same.

my_code:

requests.get(url="https://api.tequila.kiwi.com/v2/search?fly_from=LGA&fly_to=MIA&dateFrom=11/08/2022&dateTo=02/09/2022", headers=header)

What is this error of 45 days period?

error:' {'status': 'Bad Request','error': "couldn't decode request parameters: date_from: date value is too far in the past, the threshold is 45 days ; date_to: date value is too far in the past, the threshold is 45 days"}

1

There are 1 best solutions below

0
On

dateFrom=11/08/2022

this date is more than 45 days in the past, you can go as much as 45 days in the past from when the request is being made.