mkorkmaz/flightradar24

try your example but error return

filipdns opened this issue ยท 7 comments

hello, I seen on previous issue you give link like:

https://api.flightradar24.com/common/v1/airport.json?code=bvs&plugin[]=&plugin-setting[schedule][mode]=&plugin-setting[schedule][timestamp]=1522140833&page=1&limit=100&token=

it's working with new timestamp.

do you know what I can use to have flight informations with registration number?
I need to have live data of latitude/longitude/altitude/speed

I try that:
https://api.flightradar24.com/common/v1/flight/list.json?query=F-GUGE&fetchBy=reg&limit=1&token=

but I don't have these information in it

kind regards
Philippe

You should request data with the following query:

https://data-live.flightradar24.com/zones/fcgi/feed.js?reg=!F-GUGE&_={current_time_stamp}

Example: https://data-live.flightradar24.com/zones/fcgi/feed.js?reg=!F-GUGE&_=1543220376030

It should return a response data like this:

{"full_count":10777,"version":4,"1eacb77b":["3950C4",43.4685,-1.5124,90,0,26,"0000","FLFBZ2","A318","F-GUGE",1543220364,"BIQ","ORY","AF7497",1,0,"AFR71JL",0,"AFR"]}

Use the data under '1eacb77b' index. This index can be different for your query since it represents flight id used internally at FR24.

Data under this index can be changed to named indexes:

    flight_data = dict()
    flight_data['aircraft_id'] = str(flight[0])
    flight_data['latitude'] = float(flight[1])
    flight_data['longitude'] = float(flight[2])
    flight_data['angle'] = int(flight[3])
    flight_data['altitude'] = int(flight[4])
    flight_data['speed'] = int(flight[5])
    flight_data['squawk_code'] = str(flight[6])
    flight_data['radar_id'] = str(flight[7])
    flight_data['aircraft'] = str(flight[8])
    flight_data['registration'] = str(flight[9])
    flight_data['last_update'] = int(flight[10])
    flight_data['departure'] = str(flight[11])
    flight_data['arrival'] = str(flight[12])
    flight_data['iata_identity'] = str(flight[13])
    flight_data['arrived'] = int(flight[14])
    flight_data['vspeed'] = int(flight[15])
    flight_data['icao_identity'] = str(flight[16])
    flight_data['reserved'] = str(flight[17])

PRO TIP: If you can see the data on flightradar24.com you can find how to get it just using developer tools of browsers. Follow network tab, check XHR requests and their responses.

That is perfect thank you very much!!!

Just little more question about flightradar, i feel you know a lot of it, do you know how they do to have 3D view?

Check this page: https://www.flightradar24.com/blog/exploring-the-new-flightradar24-3d-view/

I have no further knowledge about it.

thank you very much, your answers help me a lot!!

Hello, Do you know it I can receive the live GPS altitude information?

See the dict example above.