ADSBexchange.com

PAID
By ADSBexchange.com | Updated 7 days ago | Transportation
Popularity

9.7 / 10

Latency

218ms

Service Level

100%

Back to All Discussions

No flight data received with the API

avatar
jerrycd
10 months ago

There was no airplane data retrieved with the folloiwng Python scripts. Could anyone help me please? Thansk in advance!

Returned string:
{‘states’: [], ‘time’: 1608711590}

Python scripts:
import http.client

conn = http.client.HTTPSConnection(“adsbexchange-com1.p.rapidapi.com”)

headers = {
‘x-rapidapi-key’: “”,
‘x-rapidapi-host’: “”
}

conn.request(“GET”, “/icao/78048f/”, headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode(“utf-8”))

A
AVIARLabs commented 9 months ago

I don’t code in python, but I’m sure You’re missing the header info, the key and host, which are provided by Rapid. Add those and you should be good.

Join in the discussion - add comment below:

Login / Signup to post new comments
Rating: 2.7 - Votes: 3