I am trying to process api data, but using the code I have to access a dict, I get the "String indices must be integers" error. Any ideas on how to get strings to find the keys in the dict (would prefer not to use integers, and if i do I get the out of range error). import requests import json headers = { "X-RapidAPI-Key": "1b6ce2494dmshf74f9c461b4cdbbp1d3b11jsndd6ab0d8575c", "X-RapidAPI-Host": "api-football-v1.p.rapidapi.com" } url_stats = "https://api-football-v1.p.rapidapi.com/v3/teams/statistics" qstring_stats1 = {"league":"39","season":"2022","team":"33"} resp_stats = requests.request("GET", url_stats, headers=headers, params=qstring_stats1) resp_stats = resp_stats.json() print(type(resp_stats)) print(resp_stats) for team in resp_stats["response"]: print(str(team["team"]["id"]) + " - " + (team["team"]["name"])) print(resp_stats) Output: <class 'dict'> {'get': 'teams/statistics', 'parameters': {'league': '39', 'season': '2022', 'team': '33'}, 'errors': [], 'results': 11, 'paging': {'current': 1, 'total': 1}, 'response': {'league': {'id': 39, 'name': 'Premier League', 'country': 'England', 'logo': 'https://media.api-sports.io/football/leagues/39.png', 'flag': 'https://media.api-sports.io/flags/gb.svg', 'season': 2022}, 'team': {'id': 33, 'name': 'Manchester United'}............ Traceback (most recent call last): File "E:\Dropbox\CG\Coding\music_api\main.py", line 47, in <module> print(str(team["team"]["id"]) + " - " + (team["team"]["name"])) TypeError: string indices must be integers Continue reading...