import requests

url = "https://spotify81.p.rapidapi.com/top_20_by_monthly_listeners"

headers = {
	"X-RapidAPI-Key": "825200d0f8msh414d353da41bfcfp1ddcfcjsnb40ef386fce9",
	"X-RapidAPI-Host": "spotify81.p.rapidapi.com"
}

response = requests.request("GET", url, headers=headers)

print(response.json())
[{'rank': 1, 'artist': 'Ed Sheeran', 'monthlyListeners': 78.11}, {'rank': 2, 'artist': 'The Weeknd', 'monthlyListeners': 77.34}, {'rank': 3, 'artist': 'Justin Bieber', 'monthlyListeners': 69.95}, {'rank': 4, 'artist': 'Harry Styles', 'monthlyListeners': 67.46}, {'rank': 5, 'artist': 'David Guetta', 'monthlyListeners': 66.27}, {'rank': 6, 'artist': 'Bad Bunny', 'monthlyListeners': 63.88}, {'rank': 7, 'artist': 'Dua Lipa', 'monthlyListeners': 62.97}, {'rank': 8, 'artist': 'Drake (musician)', 'monthlyListeners': 61.11}, {'rank': 9, 'artist': 'Coldplay', 'monthlyListeners': 58}, {'rank': 10, 'artist': 'Taylor Swift', 'monthlyListeners': 57.87}, {'rank': 11, 'artist': 'Doja Cat', 'monthlyListeners': 54.22}, {'rank': 12, 'artist': 'Imagine Dragons', 'monthlyListeners': 53.77}, {'rank': 13, 'artist': 'Eminem', 'monthlyListeners': 53.06}, {'rank': 14, 'artist': 'Rihanna', 'monthlyListeners': 52.92}, {'rank': 15, 'artist': 'Sam Smith', 'monthlyListeners': 52.44}, {'rank': 16, 'artist': 'Post Malone', 'monthlyListeners': 52.02}, {'rank': 17, 'artist': 'Ariana Grande', 'monthlyListeners': 51.72}, {'rank': 18, 'artist': 'Elton John', 'monthlyListeners': 51.66}, {'rank': 19, 'artist': 'Calvin Harris', 'monthlyListeners': 51.39}, {'rank': 20, 'artist': 'Kanye West', 'monthlyListeners': 50.87}, {'rank': 21, 'artist': 'J Balvin', 'monthlyListeners': 50.83}, {'rank': 22, 'artist': 'Khalid (singer)', 'monthlyListeners': 50.42}, {'rank': 23, 'artist': 'Bruno Mars', 'monthlyListeners': 50.09}, {'rank': 24, 'artist': 'Nicki Minaj', 'monthlyListeners': 49.72}, {'rank': 25, 'artist': 'OneRepublic', 'monthlyListeners': 49.12}, {'rank': 26, 'artist': 'Billie Eilish', 'monthlyListeners': 48.97}, {'rank': 27, 'artist': 'Maroon 5', 'monthlyListeners': 48.75}, {'rank': 28, 'artist': 'Shakira', 'monthlyListeners': 47.96}, {'rank': 29, 'artist': 'Bebe Rexha', 'monthlyListeners': 46.7}, {'rank': 30, 'artist': 'Chris Brown', 'monthlyListeners': 45.07}]
for artistDB in response.json():
    print(artistDB['rank'], artistDB['artist'], artistDB['monthlyListeners'], "Million Monthly Listeners")
    print()
1 Ed Sheeran 78.11 Million Monthly Listeners

2 The Weeknd 77.34 Million Monthly Listeners

3 Justin Bieber 69.95 Million Monthly Listeners

4 Harry Styles 67.46 Million Monthly Listeners

5 David Guetta 66.27 Million Monthly Listeners

6 Bad Bunny 63.88 Million Monthly Listeners

7 Dua Lipa 62.97 Million Monthly Listeners

8 Drake (musician) 61.11 Million Monthly Listeners

9 Coldplay 58 Million Monthly Listeners

10 Taylor Swift 57.87 Million Monthly Listeners

11 Doja Cat 54.22 Million Monthly Listeners

12 Imagine Dragons 53.77 Million Monthly Listeners

13 Eminem 53.06 Million Monthly Listeners

14 Rihanna 52.92 Million Monthly Listeners

15 Sam Smith 52.44 Million Monthly Listeners

16 Post Malone 52.02 Million Monthly Listeners

17 Ariana Grande 51.72 Million Monthly Listeners

18 Elton John 51.66 Million Monthly Listeners

19 Calvin Harris 51.39 Million Monthly Listeners

20 Kanye West 50.87 Million Monthly Listeners

21 J Balvin 50.83 Million Monthly Listeners

22 Khalid (singer) 50.42 Million Monthly Listeners

23 Bruno Mars 50.09 Million Monthly Listeners

24 Nicki Minaj 49.72 Million Monthly Listeners

25 OneRepublic 49.12 Million Monthly Listeners

26 Billie Eilish 48.97 Million Monthly Listeners

27 Maroon 5 48.75 Million Monthly Listeners

28 Shakira 47.96 Million Monthly Listeners

29 Bebe Rexha 46.7 Million Monthly Listeners

30 Chris Brown 45.07 Million Monthly Listeners