import requests import pprint def get_plane_data(icao_code): base_url = "https://api.adsb.lol/v2/" api_url = "hex/" url = base_url + api_url req = requests.get(url+icao_code) pprint.pprint(req.json()) return req.json() get_plane_data("4BAA84")