import json with open("ghid.json", encoding="utf-8") as f: data = json.loads(f.read()) for key in data['data']['data']: print(key['ghId'])