import requests, json
headers = {
‘Accept’: ‘application/json; charset=UTF-8’,
‘x-apikey’: ‘’,
}
params = (
(‘type’, ‘Airline’),
(‘max_pages’, ‘1’),
)
url = “https://aeroapi.flightaware.com/aeroapi/airports/JFK/flights/scheduled_arrivals”
resp = requests.get(url, headers=headers, params=params)
print("Response: ", resp)
print("URL rep: ", resp.url)
print("TEXT: ", resp.text)
OUTPUT:
Response: <Response [429]>
URL rep: https://aeroapi.flightaware.com/aeroapi/airports/JFK/flights/scheduled_arrivals?type=Airline&max_pages=1
TEXT:
{“title”: “Rate limit error”, “reason”: “RATE_LIMIT_ERROR”, “detail”: “User has reached quota limit”, “status”: 429}