RATE_LIMIT_ERROR when I should be within my bounds

Greetings FA crew,

I am trying to get flight schedules from a 2 hour period and pulling a maximum of 9 pages per API request.

Here is my code:

            airport = apt
            print(airport,orighours[tm])
            payload = {'start': start,'end': end,'type':'Airline','max_pages': 9}
            auth_header = {'x-apikey':key}
            apiUrl = "https://aeroapi.flightaware.com/aeroapi/"
            response = requests.get(apiUrl + f"airports/{airport}/flights/scheduled_departures",
                params=payload, headers=auth_header)
            
            
            
            if response.status_code == 200:
                #print(response.json())
                print("Got flights")
            else:
                print(response.json())
                print("Error executing request")
                
            print("Pausing for 60 seconds")
            time.sleep(61)    
     

I am limited to 10sets/min with the free plan.

So in my code I am pulling 9 pages and then telling the code to sleep for 61 seconds.
But eventually after about 5 requests I get this error:

{‘title’: ‘Rate limit error’, ‘reason’: ‘RATE_LIMIT_ERROR’, ‘detail’: ‘User has reached quota limit’, ‘status’: 429}

I know that my code is actually pausing for 61 seconds between requests so I am confused as to what is going on…

Thanks for the help!

Hello,

Our engineering team has been working on a fix for this and should be released in the near future. Thank you for bringing the bug to our attention and I apologize about the delay.

Taylor Fischer -
Commercial Support

Toll Free: +1.800.713.8570
Support Line:+1.713.588.6514

Eleven Greenway Plaza, Suite 2900 - Houston, Texas - 77046

Learn about FlightAware Global and Premium Accounts: http://flightaware.com/commercial/