diff --git a/lab-apis.ipynb b/lab-apis.ipynb index e923554..83fee4f 100644 --- a/lab-apis.ipynb +++ b/lab-apis.ipynb @@ -34,32 +34,35 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 225, "id": "ea44c82a-5c07-4dbc-beb2-bba2601bb75e", "metadata": {}, "outputs": [], "source": [ - "CLIENT_ID = \"\"\n", - "CLIENT_SECRET = \"\"" + "CLIENT_ID = \"60ad39ae543a42109c6e87298e916968\"\n", + "CLIENT_SECRET = \"04d7488838364731b065d5ab058a87e9\"" ] }, { "cell_type": "code", - "execution_count": null, - "id": "319cfd4e-f6fb-4419-80e0-e3983cd25e43", - "metadata": {}, - "outputs": [], - "source": [ - "CLIENT_ID = \"4109b2d9f5014671863bb2df1d1fbdd3\"\n", - "CLIENT_SECRET = \"5cb719fae80c4191a9c0b288f51bfe50\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, + "execution_count": 226, "id": "04e12954-fd70-4311-88a5-fb7e2c29799c", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: spotipy in e:\\jejoc\\anaconda\\lib\\site-packages (2.26.0)\n", + "Requirement already satisfied: redis>=3.5.3 in e:\\jejoc\\anaconda\\lib\\site-packages (from spotipy) (8.0.0)\n", + "Requirement already satisfied: requests>=2.25.0 in e:\\jejoc\\anaconda\\lib\\site-packages (from spotipy) (2.32.5)\n", + "Requirement already satisfied: urllib3>=1.26.0 in e:\\jejoc\\anaconda\\lib\\site-packages (from spotipy) (2.5.0)\n", + "Requirement already satisfied: charset_normalizer<4,>=2 in e:\\jejoc\\anaconda\\lib\\site-packages (from requests>=2.25.0->spotipy) (3.4.4)\n", + "Requirement already satisfied: idna<4,>=2.5 in e:\\jejoc\\anaconda\\lib\\site-packages (from requests>=2.25.0->spotipy) (3.11)\n", + "Requirement already satisfied: certifi>=2017.4.17 in e:\\jejoc\\anaconda\\lib\\site-packages (from requests>=2.25.0->spotipy) (2026.1.4)\n" + ] + } + ], "source": [ "# If you havent done so, install the spotipy wrapper\n", "!pip install spotipy" @@ -75,13 +78,14 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 227, "id": "03034bc6-9858-412a-83b7-18abdc345d7e", "metadata": {}, "outputs": [], "source": [ "import spotipy\n", "from spotipy.oauth2 import SpotifyClientCredentials\n", + "import requests\n", "\n", "#Initialize SpotiPy with user credentials\n", "sp = spotipy.Spotify(auth_manager=SpotifyClientCredentials(client_id=CLIENT_ID,\n", @@ -106,95 +110,1183 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 266, "id": "7772a1e0-9692-4d04-a590-76111a272d8d", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "{'tracks': {'href': 'https://api.spotify.com/v1/search?offset=0&limit=10&query=Lady%20Gaga&type=track',\n", + " 'limit': 10,\n", + " 'next': 'https://api.spotify.com/v1/search?offset=10&limit=10&query=Lady%20Gaga&type=track',\n", + " 'offset': 0,\n", + " 'previous': None,\n", + " 'total': 11,\n", + " 'items': [{'album': {'album_type': 'single',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0du5cEVh5yTK9QJze8zA0C'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0du5cEVh5yTK9QJze8zA0C',\n", + " 'id': '0du5cEVh5yTK9QJze8zA0C',\n", + " 'name': 'Bruno Mars',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0du5cEVh5yTK9QJze8zA0C'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/10FLjwfpbxLmW8c25Xyc2N'},\n", + " 'href': 'https://api.spotify.com/v1/albums/10FLjwfpbxLmW8c25Xyc2N',\n", + " 'id': '10FLjwfpbxLmW8c25Xyc2N',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b27382ea2e9e1858aa012c57cd45'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e0282ea2e9e1858aa012c57cd45'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000485182ea2e9e1858aa012c57cd45'}],\n", + " 'is_playable': True,\n", + " 'name': 'Die With A Smile',\n", + " 'release_date': '2024-08-16',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 1,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:10FLjwfpbxLmW8c25Xyc2N'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0du5cEVh5yTK9QJze8zA0C'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0du5cEVh5yTK9QJze8zA0C',\n", + " 'id': '0du5cEVh5yTK9QJze8zA0C',\n", + " 'name': 'Bruno Mars',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0du5cEVh5yTK9QJze8zA0C'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 251667,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'USUM72409273'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/2plbrEY59IikOBgBGLjaoe'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/2plbrEY59IikOBgBGLjaoe',\n", + " 'id': '2plbrEY59IikOBgBGLjaoe',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Die With A Smile',\n", + " 'track_number': 1,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:2plbrEY59IikOBgBGLjaoe'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/12GqGscKJx3aE4t07u7eVZ'},\n", + " 'href': 'https://api.spotify.com/v1/artists/12GqGscKJx3aE4t07u7eVZ',\n", + " 'id': '12GqGscKJx3aE4t07u7eVZ',\n", + " 'name': 'Peso Pluma',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:12GqGscKJx3aE4t07u7eVZ'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/4jox3ip1I39DFC2B7R5qLH'},\n", + " 'href': 'https://api.spotify.com/v1/albums/4jox3ip1I39DFC2B7R5qLH',\n", + " 'id': '4jox3ip1I39DFC2B7R5qLH',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b2732fb583ed96f8f35cbf2897ba'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e022fb583ed96f8f35cbf2897ba'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d000048512fb583ed96f8f35cbf2897ba'}],\n", + " 'is_playable': True,\n", + " 'name': 'GÉNESIS',\n", + " 'release_date': '2023-06-29',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 17,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:4jox3ip1I39DFC2B7R5qLH'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/12GqGscKJx3aE4t07u7eVZ'},\n", + " 'href': 'https://api.spotify.com/v1/artists/12GqGscKJx3aE4t07u7eVZ',\n", + " 'id': '12GqGscKJx3aE4t07u7eVZ',\n", + " 'name': 'Peso Pluma',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:12GqGscKJx3aE4t07u7eVZ'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/6Sbl0NT50roqWvy746MfVf'},\n", + " 'href': 'https://api.spotify.com/v1/artists/6Sbl0NT50roqWvy746MfVf',\n", + " 'id': '6Sbl0NT50roqWvy746MfVf',\n", + " 'name': 'Gabito Ballesteros',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:6Sbl0NT50roqWvy746MfVf'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/7Gi6gjaWy3DxyilpF1a8Is'},\n", + " 'href': 'https://api.spotify.com/v1/artists/7Gi6gjaWy3DxyilpF1a8Is',\n", + " 'id': '7Gi6gjaWy3DxyilpF1a8Is',\n", + " 'name': 'Junior H',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:7Gi6gjaWy3DxyilpF1a8Is'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 212878,\n", + " 'explicit': True,\n", + " 'external_ids': {'isrc': 'QM7282306246'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/7mXuWTczZNxG5EDcjFEuJR'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/7mXuWTczZNxG5EDcjFEuJR',\n", + " 'id': '7mXuWTczZNxG5EDcjFEuJR',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'LADY GAGA',\n", + " 'track_number': 10,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:7mXuWTczZNxG5EDcjFEuJR'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/4VIvfOurcf0vuLRxLkGnIG'},\n", + " 'href': 'https://api.spotify.com/v1/artists/4VIvfOurcf0vuLRxLkGnIG',\n", + " 'id': '4VIvfOurcf0vuLRxLkGnIG',\n", + " 'name': 'Bradley Cooper',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:4VIvfOurcf0vuLRxLkGnIG'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/4sLtOBOzn4s3GDUv3c5oJD'},\n", + " 'href': 'https://api.spotify.com/v1/albums/4sLtOBOzn4s3GDUv3c5oJD',\n", + " 'id': '4sLtOBOzn4s3GDUv3c5oJD',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273e2d156fdc691f57900134342'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02e2d156fdc691f57900134342'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851e2d156fdc691f57900134342'}],\n", + " 'is_playable': True,\n", + " 'name': 'A Star Is Born Soundtrack',\n", + " 'release_date': '2018-10-05',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 34,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:4sLtOBOzn4s3GDUv3c5oJD'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/4VIvfOurcf0vuLRxLkGnIG'},\n", + " 'href': 'https://api.spotify.com/v1/artists/4VIvfOurcf0vuLRxLkGnIG',\n", + " 'id': '4VIvfOurcf0vuLRxLkGnIG',\n", + " 'name': 'Bradley Cooper',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:4VIvfOurcf0vuLRxLkGnIG'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 215733,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'USUM71813192'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/2VxeLyX666F8uXCJ0dZF8B'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/2VxeLyX666F8uXCJ0dZF8B',\n", + " 'id': '2VxeLyX666F8uXCJ0dZF8B',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Shallow',\n", + " 'track_number': 12,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:2VxeLyX666F8uXCJ0dZF8B'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/1qwlxZTNLe1jq3b0iidlue'},\n", + " 'href': 'https://api.spotify.com/v1/albums/1qwlxZTNLe1jq3b0iidlue',\n", + " 'id': '1qwlxZTNLe1jq3b0iidlue',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273e691217483df8798445c82e2'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02e691217483df8798445c82e2'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851e691217483df8798445c82e2'}],\n", + " 'is_playable': True,\n", + " 'name': 'The Fame',\n", + " 'release_date': '2008-01-01',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 15,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:1qwlxZTNLe1jq3b0iidlue'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 237200,\n", + " 'explicit': True,\n", + " 'external_ids': {'isrc': 'USUM70824409'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/1QV6tiMFM6fSOKOGLMHYYg'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/1QV6tiMFM6fSOKOGLMHYYg',\n", + " 'id': '1QV6tiMFM6fSOKOGLMHYYg',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Poker Face',\n", + " 'track_number': 4,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:1QV6tiMFM6fSOKOGLMHYYg'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/4VIvfOurcf0vuLRxLkGnIG'},\n", + " 'href': 'https://api.spotify.com/v1/artists/4VIvfOurcf0vuLRxLkGnIG',\n", + " 'id': '4VIvfOurcf0vuLRxLkGnIG',\n", + " 'name': 'Bradley Cooper',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:4VIvfOurcf0vuLRxLkGnIG'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/3edjzMAVB9RYRd4UcZBchx'},\n", + " 'href': 'https://api.spotify.com/v1/albums/3edjzMAVB9RYRd4UcZBchx',\n", + " 'id': '3edjzMAVB9RYRd4UcZBchx',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273b5d4b4ed17ec86c4b3944af2'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02b5d4b4ed17ec86c4b3944af2'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851b5d4b4ed17ec86c4b3944af2'}],\n", + " 'is_playable': True,\n", + " 'name': 'A Star Is Born Soundtrack (Without Dialogue)',\n", + " 'release_date': '2018-10-05',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 19,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:3edjzMAVB9RYRd4UcZBchx'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 210200,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'USUM71813195'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/2rbDhOo9Fh61Bbu23T2qCk'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/2rbDhOo9Fh61Bbu23T2qCk',\n", + " 'id': '2rbDhOo9Fh61Bbu23T2qCk',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Always Remember Us This Way',\n", + " 'track_number': 9,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:2rbDhOo9Fh61Bbu23T2qCk'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/6LY3AerY6KNGOPsNPL63Kk'},\n", + " 'href': 'https://api.spotify.com/v1/albums/6LY3AerY6KNGOPsNPL63Kk',\n", + " 'id': '6LY3AerY6KNGOPsNPL63Kk',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273a5d31644260279be8d0c46c0'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02a5d31644260279be8d0c46c0'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851a5d31644260279be8d0c46c0'}],\n", + " 'is_playable': True,\n", + " 'name': 'Born This Way (International Special Edition Version)',\n", + " 'release_date': '2011-05-23',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 23,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:6LY3AerY6KNGOPsNPL63Kk'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 249066,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'USUM71104998'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/7F25roCtYi55JouckaayPC'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/7F25roCtYi55JouckaayPC',\n", + " 'id': '7F25roCtYi55JouckaayPC',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Judas',\n", + " 'track_number': 4,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:7F25roCtYi55JouckaayPC'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/6rePArBMb5nLWEaY9aQqL4'},\n", + " 'href': 'https://api.spotify.com/v1/albums/6rePArBMb5nLWEaY9aQqL4',\n", + " 'id': '6rePArBMb5nLWEaY9aQqL4',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b2735c9890c0456a3719eeecd8aa'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e025c9890c0456a3719eeecd8aa'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d000048515c9890c0456a3719eeecd8aa'}],\n", + " 'is_playable': True,\n", + " 'name': 'The Fame Monster (Deluxe Edition)',\n", + " 'release_date': '2009-11-05',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 23,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:6rePArBMb5nLWEaY9aQqL4'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 294573,\n", + " 'explicit': True,\n", + " 'external_ids': {'isrc': 'USUM70918596'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/0SiywuOBRcynK0uKGWdCnn'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/0SiywuOBRcynK0uKGWdCnn',\n", + " 'id': '0SiywuOBRcynK0uKGWdCnn',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Bad Romance',\n", + " 'track_number': 1,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:0SiywuOBRcynK0uKGWdCnn'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/6LY3AerY6KNGOPsNPL63Kk'},\n", + " 'href': 'https://api.spotify.com/v1/albums/6LY3AerY6KNGOPsNPL63Kk',\n", + " 'id': '6LY3AerY6KNGOPsNPL63Kk',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273a5d31644260279be8d0c46c0'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02a5d31644260279be8d0c46c0'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851a5d31644260279be8d0c46c0'}],\n", + " 'is_playable': True,\n", + " 'name': 'Born This Way (International Special Edition Version)',\n", + " 'release_date': '2011-05-23',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 23,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:6LY3AerY6KNGOPsNPL63Kk'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 260252,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'USUM71100638'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/30XU4suKzCeoCK9YFzdufg'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/30XU4suKzCeoCK9YFzdufg',\n", + " 'id': '30XU4suKzCeoCK9YFzdufg',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Born This Way',\n", + " 'track_number': 2,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:30XU4suKzCeoCK9YFzdufg'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/2MHUaRi9OCyTN02SoyRRBJ'},\n", + " 'href': 'https://api.spotify.com/v1/albums/2MHUaRi9OCyTN02SoyRRBJ',\n", + " 'id': '2MHUaRi9OCyTN02SoyRRBJ',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273b0860cf0a98e09663c82290c'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02b0860cf0a98e09663c82290c'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851b0860cf0a98e09663c82290c'}],\n", + " 'is_playable': True,\n", + " 'name': 'MAYHEM',\n", + " 'release_date': '2025-03-07',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 14,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:2MHUaRi9OCyTN02SoyRRBJ'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 223398,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'USUM72412581'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/2LHNTC9QZxsL3nWpt8iaSR'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/2LHNTC9QZxsL3nWpt8iaSR',\n", + " 'id': '2LHNTC9QZxsL3nWpt8iaSR',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Abracadabra',\n", + " 'track_number': 2,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:2LHNTC9QZxsL3nWpt8iaSR'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/2MHUaRi9OCyTN02SoyRRBJ'},\n", + " 'href': 'https://api.spotify.com/v1/albums/2MHUaRi9OCyTN02SoyRRBJ',\n", + " 'id': '2MHUaRi9OCyTN02SoyRRBJ',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273b0860cf0a98e09663c82290c'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02b0860cf0a98e09663c82290c'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851b0860cf0a98e09663c82290c'}],\n", + " 'is_playable': True,\n", + " 'name': 'MAYHEM',\n", + " 'release_date': '2025-03-07',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 14,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:2MHUaRi9OCyTN02SoyRRBJ'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0du5cEVh5yTK9QJze8zA0C'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0du5cEVh5yTK9QJze8zA0C',\n", + " 'id': '0du5cEVh5yTK9QJze8zA0C',\n", + " 'name': 'Bruno Mars',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0du5cEVh5yTK9QJze8zA0C'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 251667,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'USUM72409273'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/7so0lgd0zP2Sbgs2d7a1SZ'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/7so0lgd0zP2Sbgs2d7a1SZ',\n", + " 'id': '7so0lgd0zP2Sbgs2d7a1SZ',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Die With A Smile',\n", + " 'track_number': 14,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:7so0lgd0zP2Sbgs2d7a1SZ'}]}}" + ] + }, + "execution_count": 266, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "results = sp.search(q='Lady Gaga', limit=50)\n", + "results = sp.search(q=\"Lady Gaga\", limit=10)\n", "results" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 229, "id": "edc14c95-474b-4e2a-aea3-bdfd0a205546", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "dict_keys(['tracks'])" + ] + }, + "execution_count": 229, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "results.keys() # We can see that we only have tracks" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 230, "id": "ad8ef934-1dbb-4008-ac8e-f5c29823fe6a", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "dict_keys(['href', 'limit', 'next', 'offset', 'previous', 'total', 'items'])" + ] + }, + "execution_count": 230, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "results[\"tracks\"].keys() # Let's check the values" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 231, "id": "004b7814-4dd5-408e-b7ba-1da87f9250cb", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "'https://api.spotify.com/v1/search?offset=0&limit=10&query=Lady%20Gaga&type=track'" + ] + }, + "execution_count": 231, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "results[\"tracks\"][\"href\"] # Query we have searched " ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 232, "id": "7285cedd-fbe1-47cf-98d5-a7fdc3e5c8b8", "metadata": { "scrolled": true, "tags": [] }, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "[{'album': {'album_type': 'single',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0du5cEVh5yTK9QJze8zA0C'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0du5cEVh5yTK9QJze8zA0C',\n", + " 'id': '0du5cEVh5yTK9QJze8zA0C',\n", + " 'name': 'Bruno Mars',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0du5cEVh5yTK9QJze8zA0C'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/10FLjwfpbxLmW8c25Xyc2N'},\n", + " 'href': 'https://api.spotify.com/v1/albums/10FLjwfpbxLmW8c25Xyc2N',\n", + " 'id': '10FLjwfpbxLmW8c25Xyc2N',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b27382ea2e9e1858aa012c57cd45'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e0282ea2e9e1858aa012c57cd45'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000485182ea2e9e1858aa012c57cd45'}],\n", + " 'is_playable': True,\n", + " 'name': 'Die With A Smile',\n", + " 'release_date': '2024-08-16',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 1,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:10FLjwfpbxLmW8c25Xyc2N'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0du5cEVh5yTK9QJze8zA0C'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0du5cEVh5yTK9QJze8zA0C',\n", + " 'id': '0du5cEVh5yTK9QJze8zA0C',\n", + " 'name': 'Bruno Mars',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0du5cEVh5yTK9QJze8zA0C'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 251667,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'USUM72409273'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/2plbrEY59IikOBgBGLjaoe'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/2plbrEY59IikOBgBGLjaoe',\n", + " 'id': '2plbrEY59IikOBgBGLjaoe',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Die With A Smile',\n", + " 'track_number': 1,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:2plbrEY59IikOBgBGLjaoe'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/12GqGscKJx3aE4t07u7eVZ'},\n", + " 'href': 'https://api.spotify.com/v1/artists/12GqGscKJx3aE4t07u7eVZ',\n", + " 'id': '12GqGscKJx3aE4t07u7eVZ',\n", + " 'name': 'Peso Pluma',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:12GqGscKJx3aE4t07u7eVZ'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/4jox3ip1I39DFC2B7R5qLH'},\n", + " 'href': 'https://api.spotify.com/v1/albums/4jox3ip1I39DFC2B7R5qLH',\n", + " 'id': '4jox3ip1I39DFC2B7R5qLH',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b2732fb583ed96f8f35cbf2897ba'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e022fb583ed96f8f35cbf2897ba'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d000048512fb583ed96f8f35cbf2897ba'}],\n", + " 'is_playable': True,\n", + " 'name': 'GÉNESIS',\n", + " 'release_date': '2023-06-29',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 17,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:4jox3ip1I39DFC2B7R5qLH'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/12GqGscKJx3aE4t07u7eVZ'},\n", + " 'href': 'https://api.spotify.com/v1/artists/12GqGscKJx3aE4t07u7eVZ',\n", + " 'id': '12GqGscKJx3aE4t07u7eVZ',\n", + " 'name': 'Peso Pluma',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:12GqGscKJx3aE4t07u7eVZ'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/6Sbl0NT50roqWvy746MfVf'},\n", + " 'href': 'https://api.spotify.com/v1/artists/6Sbl0NT50roqWvy746MfVf',\n", + " 'id': '6Sbl0NT50roqWvy746MfVf',\n", + " 'name': 'Gabito Ballesteros',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:6Sbl0NT50roqWvy746MfVf'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/7Gi6gjaWy3DxyilpF1a8Is'},\n", + " 'href': 'https://api.spotify.com/v1/artists/7Gi6gjaWy3DxyilpF1a8Is',\n", + " 'id': '7Gi6gjaWy3DxyilpF1a8Is',\n", + " 'name': 'Junior H',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:7Gi6gjaWy3DxyilpF1a8Is'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 212878,\n", + " 'explicit': True,\n", + " 'external_ids': {'isrc': 'QM7282306246'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/7mXuWTczZNxG5EDcjFEuJR'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/7mXuWTczZNxG5EDcjFEuJR',\n", + " 'id': '7mXuWTczZNxG5EDcjFEuJR',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'LADY GAGA',\n", + " 'track_number': 10,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:7mXuWTczZNxG5EDcjFEuJR'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/4VIvfOurcf0vuLRxLkGnIG'},\n", + " 'href': 'https://api.spotify.com/v1/artists/4VIvfOurcf0vuLRxLkGnIG',\n", + " 'id': '4VIvfOurcf0vuLRxLkGnIG',\n", + " 'name': 'Bradley Cooper',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:4VIvfOurcf0vuLRxLkGnIG'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/4sLtOBOzn4s3GDUv3c5oJD'},\n", + " 'href': 'https://api.spotify.com/v1/albums/4sLtOBOzn4s3GDUv3c5oJD',\n", + " 'id': '4sLtOBOzn4s3GDUv3c5oJD',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273e2d156fdc691f57900134342'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02e2d156fdc691f57900134342'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851e2d156fdc691f57900134342'}],\n", + " 'is_playable': True,\n", + " 'name': 'A Star Is Born Soundtrack',\n", + " 'release_date': '2018-10-05',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 34,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:4sLtOBOzn4s3GDUv3c5oJD'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/4VIvfOurcf0vuLRxLkGnIG'},\n", + " 'href': 'https://api.spotify.com/v1/artists/4VIvfOurcf0vuLRxLkGnIG',\n", + " 'id': '4VIvfOurcf0vuLRxLkGnIG',\n", + " 'name': 'Bradley Cooper',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:4VIvfOurcf0vuLRxLkGnIG'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 215733,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'USUM71813192'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/2VxeLyX666F8uXCJ0dZF8B'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/2VxeLyX666F8uXCJ0dZF8B',\n", + " 'id': '2VxeLyX666F8uXCJ0dZF8B',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Shallow',\n", + " 'track_number': 12,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:2VxeLyX666F8uXCJ0dZF8B'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/1qwlxZTNLe1jq3b0iidlue'},\n", + " 'href': 'https://api.spotify.com/v1/albums/1qwlxZTNLe1jq3b0iidlue',\n", + " 'id': '1qwlxZTNLe1jq3b0iidlue',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273e691217483df8798445c82e2'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02e691217483df8798445c82e2'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851e691217483df8798445c82e2'}],\n", + " 'is_playable': True,\n", + " 'name': 'The Fame',\n", + " 'release_date': '2008-01-01',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 15,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:1qwlxZTNLe1jq3b0iidlue'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 237200,\n", + " 'explicit': True,\n", + " 'external_ids': {'isrc': 'USUM70824409'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/1QV6tiMFM6fSOKOGLMHYYg'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/1QV6tiMFM6fSOKOGLMHYYg',\n", + " 'id': '1QV6tiMFM6fSOKOGLMHYYg',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Poker Face',\n", + " 'track_number': 4,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:1QV6tiMFM6fSOKOGLMHYYg'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/4VIvfOurcf0vuLRxLkGnIG'},\n", + " 'href': 'https://api.spotify.com/v1/artists/4VIvfOurcf0vuLRxLkGnIG',\n", + " 'id': '4VIvfOurcf0vuLRxLkGnIG',\n", + " 'name': 'Bradley Cooper',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:4VIvfOurcf0vuLRxLkGnIG'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/3edjzMAVB9RYRd4UcZBchx'},\n", + " 'href': 'https://api.spotify.com/v1/albums/3edjzMAVB9RYRd4UcZBchx',\n", + " 'id': '3edjzMAVB9RYRd4UcZBchx',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273b5d4b4ed17ec86c4b3944af2'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02b5d4b4ed17ec86c4b3944af2'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851b5d4b4ed17ec86c4b3944af2'}],\n", + " 'is_playable': True,\n", + " 'name': 'A Star Is Born Soundtrack (Without Dialogue)',\n", + " 'release_date': '2018-10-05',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 19,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:3edjzMAVB9RYRd4UcZBchx'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 210200,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'USUM71813195'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/2rbDhOo9Fh61Bbu23T2qCk'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/2rbDhOo9Fh61Bbu23T2qCk',\n", + " 'id': '2rbDhOo9Fh61Bbu23T2qCk',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Always Remember Us This Way',\n", + " 'track_number': 9,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:2rbDhOo9Fh61Bbu23T2qCk'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/6LY3AerY6KNGOPsNPL63Kk'},\n", + " 'href': 'https://api.spotify.com/v1/albums/6LY3AerY6KNGOPsNPL63Kk',\n", + " 'id': '6LY3AerY6KNGOPsNPL63Kk',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273a5d31644260279be8d0c46c0'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02a5d31644260279be8d0c46c0'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851a5d31644260279be8d0c46c0'}],\n", + " 'is_playable': True,\n", + " 'name': 'Born This Way (International Special Edition Version)',\n", + " 'release_date': '2011-05-23',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 23,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:6LY3AerY6KNGOPsNPL63Kk'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 249066,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'USUM71104998'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/7F25roCtYi55JouckaayPC'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/7F25roCtYi55JouckaayPC',\n", + " 'id': '7F25roCtYi55JouckaayPC',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Judas',\n", + " 'track_number': 4,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:7F25roCtYi55JouckaayPC'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/6rePArBMb5nLWEaY9aQqL4'},\n", + " 'href': 'https://api.spotify.com/v1/albums/6rePArBMb5nLWEaY9aQqL4',\n", + " 'id': '6rePArBMb5nLWEaY9aQqL4',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b2735c9890c0456a3719eeecd8aa'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e025c9890c0456a3719eeecd8aa'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d000048515c9890c0456a3719eeecd8aa'}],\n", + " 'is_playable': True,\n", + " 'name': 'The Fame Monster (Deluxe Edition)',\n", + " 'release_date': '2009-11-05',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 23,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:6rePArBMb5nLWEaY9aQqL4'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 294573,\n", + " 'explicit': True,\n", + " 'external_ids': {'isrc': 'USUM70918596'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/0SiywuOBRcynK0uKGWdCnn'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/0SiywuOBRcynK0uKGWdCnn',\n", + " 'id': '0SiywuOBRcynK0uKGWdCnn',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Bad Romance',\n", + " 'track_number': 1,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:0SiywuOBRcynK0uKGWdCnn'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/6LY3AerY6KNGOPsNPL63Kk'},\n", + " 'href': 'https://api.spotify.com/v1/albums/6LY3AerY6KNGOPsNPL63Kk',\n", + " 'id': '6LY3AerY6KNGOPsNPL63Kk',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273a5d31644260279be8d0c46c0'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02a5d31644260279be8d0c46c0'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851a5d31644260279be8d0c46c0'}],\n", + " 'is_playable': True,\n", + " 'name': 'Born This Way (International Special Edition Version)',\n", + " 'release_date': '2011-05-23',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 23,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:6LY3AerY6KNGOPsNPL63Kk'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 260252,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'USUM71100638'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/30XU4suKzCeoCK9YFzdufg'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/30XU4suKzCeoCK9YFzdufg',\n", + " 'id': '30XU4suKzCeoCK9YFzdufg',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Born This Way',\n", + " 'track_number': 2,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:30XU4suKzCeoCK9YFzdufg'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/2MHUaRi9OCyTN02SoyRRBJ'},\n", + " 'href': 'https://api.spotify.com/v1/albums/2MHUaRi9OCyTN02SoyRRBJ',\n", + " 'id': '2MHUaRi9OCyTN02SoyRRBJ',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273b0860cf0a98e09663c82290c'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02b0860cf0a98e09663c82290c'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851b0860cf0a98e09663c82290c'}],\n", + " 'is_playable': True,\n", + " 'name': 'MAYHEM',\n", + " 'release_date': '2025-03-07',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 14,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:2MHUaRi9OCyTN02SoyRRBJ'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 223398,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'USUM72412581'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/2LHNTC9QZxsL3nWpt8iaSR'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/2LHNTC9QZxsL3nWpt8iaSR',\n", + " 'id': '2LHNTC9QZxsL3nWpt8iaSR',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Abracadabra',\n", + " 'track_number': 2,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:2LHNTC9QZxsL3nWpt8iaSR'},\n", + " {'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/2MHUaRi9OCyTN02SoyRRBJ'},\n", + " 'href': 'https://api.spotify.com/v1/albums/2MHUaRi9OCyTN02SoyRRBJ',\n", + " 'id': '2MHUaRi9OCyTN02SoyRRBJ',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273b0860cf0a98e09663c82290c'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02b0860cf0a98e09663c82290c'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851b0860cf0a98e09663c82290c'}],\n", + " 'is_playable': True,\n", + " 'name': 'MAYHEM',\n", + " 'release_date': '2025-03-07',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 14,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:2MHUaRi9OCyTN02SoyRRBJ'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0du5cEVh5yTK9QJze8zA0C'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0du5cEVh5yTK9QJze8zA0C',\n", + " 'id': '0du5cEVh5yTK9QJze8zA0C',\n", + " 'name': 'Bruno Mars',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0du5cEVh5yTK9QJze8zA0C'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 251667,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'USUM72409273'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/7so0lgd0zP2Sbgs2d7a1SZ'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/7so0lgd0zP2Sbgs2d7a1SZ',\n", + " 'id': '7so0lgd0zP2Sbgs2d7a1SZ',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Die With A Smile',\n", + " 'track_number': 14,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:7so0lgd0zP2Sbgs2d7a1SZ'}]" + ] + }, + "execution_count": 232, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "results[\"tracks\"][\"items\"] #items (actual tracks)" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 233, "id": "529fff56-47d3-4d78-8ff5-9530fe290d1d", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "10" + ] + }, + "execution_count": 233, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "results[\"tracks\"][\"limit\"]#Limit we have chosen" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 234, "id": "92c64c57-3bd2-4d42-bbd1-84a040f1e02a", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "'https://api.spotify.com/v1/search?offset=10&limit=10&query=Lady%20Gaga&type=track'" + ] + }, + "execution_count": 234, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "results[\"tracks\"][\"next\"] #link to the next page (next 50 tracks)" + "results[\"tracks\"][\"next\"] #link to the next page (next 10 tracks)" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 235, "id": "f5ccdf79-5d9e-40de-adb9-2cc1e5b7c74a", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "0" + ] + }, + "execution_count": 235, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "results[\"tracks\"][\"offset\"] # Actual offset (starting point)" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 236, "id": "356730c1-60a2-4ea8-bd2c-e0522bab8a4d", "metadata": {}, "outputs": [], @@ -204,10 +1296,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 237, "id": "7c44c8fd-63ea-45ba-94bd-5c5e8e1458b3", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "11" + ] + }, + "execution_count": 237, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "results[\"tracks\"][\"total\"] # Number of matches" ] @@ -222,33 +1325,133 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 238, "id": "6c3541a2-0fd2-41e0-9b27-60a7dc36c4cb", "metadata": { "scrolled": true, "tags": [] }, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "{'album': {'album_type': 'single',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0du5cEVh5yTK9QJze8zA0C'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0du5cEVh5yTK9QJze8zA0C',\n", + " 'id': '0du5cEVh5yTK9QJze8zA0C',\n", + " 'name': 'Bruno Mars',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0du5cEVh5yTK9QJze8zA0C'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/10FLjwfpbxLmW8c25Xyc2N'},\n", + " 'href': 'https://api.spotify.com/v1/albums/10FLjwfpbxLmW8c25Xyc2N',\n", + " 'id': '10FLjwfpbxLmW8c25Xyc2N',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b27382ea2e9e1858aa012c57cd45'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e0282ea2e9e1858aa012c57cd45'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000485182ea2e9e1858aa012c57cd45'}],\n", + " 'is_playable': True,\n", + " 'name': 'Die With A Smile',\n", + " 'release_date': '2024-08-16',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 1,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:10FLjwfpbxLmW8c25Xyc2N'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0du5cEVh5yTK9QJze8zA0C'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0du5cEVh5yTK9QJze8zA0C',\n", + " 'id': '0du5cEVh5yTK9QJze8zA0C',\n", + " 'name': 'Bruno Mars',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0du5cEVh5yTK9QJze8zA0C'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 251667,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'USUM72409273'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/2plbrEY59IikOBgBGLjaoe'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/2plbrEY59IikOBgBGLjaoe',\n", + " 'id': '2plbrEY59IikOBgBGLjaoe',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Die With A Smile',\n", + " 'track_number': 1,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:2plbrEY59IikOBgBGLjaoe'}" + ] + }, + "execution_count": 238, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "results[\"tracks\"][\"items\"][0] # Explore the first song" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 239, "id": "f2c35eb2-3ea6-4329-9f29-7c062f466638", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "dict_keys(['album', 'artists', 'disc_number', 'duration_ms', 'explicit', 'external_ids', 'external_urls', 'href', 'id', 'is_local', 'is_playable', 'name', 'track_number', 'type', 'uri'])" + ] + }, + "execution_count": 239, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "results[\"tracks\"][\"items\"][0].keys() # We will focus on album, artists, id, name, popularity, type and uri" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 240, "id": "889ca3c3-b0c8-4037-96fb-6add847f537f", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "[{'external_urls': {'spotify': 'https://open.spotify.com/artist/1HY2Jd0NmPuamShAr6KMms'},\n", + " 'href': 'https://api.spotify.com/v1/artists/1HY2Jd0NmPuamShAr6KMms',\n", + " 'id': '1HY2Jd0NmPuamShAr6KMms',\n", + " 'name': 'Lady Gaga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1HY2Jd0NmPuamShAr6KMms'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0du5cEVh5yTK9QJze8zA0C'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0du5cEVh5yTK9QJze8zA0C',\n", + " 'id': '0du5cEVh5yTK9QJze8zA0C',\n", + " 'name': 'Bruno Mars',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0du5cEVh5yTK9QJze8zA0C'}]" + ] + }, + "execution_count": 240, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# Track artists\n", "results[\"tracks\"][\"items\"][0][\"artists\"] " @@ -256,10 +1459,19 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 241, "id": "a9c6a0b2-cea7-48ff-8c51-179d15388aa2", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lady Gaga\n", + "Bruno Mars\n" + ] + } + ], "source": [ "# Track artists names\n", "for artist in results[\"tracks\"][\"items\"][0][\"artists\"]:\n", @@ -268,10 +1480,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 242, "id": "6a826e9c-d2e7-4537-a82c-3dc3a2b80b9f", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "'2plbrEY59IikOBgBGLjaoe'" + ] + }, + "execution_count": 242, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# Track ID\n", "results[\"tracks\"][\"items\"][0][\"id\"] " @@ -279,10 +1502,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 243, "id": "a5bd871b-6087-4680-819c-1a1d8ba879bc", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "'Die With A Smile'" + ] + }, + "execution_count": 243, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# Track name\n", "results[\"tracks\"][\"items\"][0][\"name\"] " @@ -290,10 +1524,22 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 244, "id": "812661f1-29db-452f-a719-cdfbe95ba9f6", "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "KeyError", + "evalue": "'popularity'", + "output_type": "error", + "traceback": [ + "\u001b[31m---------------------------------------------------------------------------\u001b[39m", + "\u001b[31mKeyError\u001b[39m Traceback (most recent call last)", + "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[244]\u001b[39m\u001b[32m, line 2\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;66;03m# Popularity index\u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m2\u001b[39m \u001b[43mresults\u001b[49m\u001b[43m[\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mtracks\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m[\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mitems\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m[\u001b[49m\u001b[32;43m0\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m[\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mpopularity\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m]\u001b[49m \n", + "\u001b[31mKeyError\u001b[39m: 'popularity'" + ] + } + ], "source": [ "# Popularity index\n", "results[\"tracks\"][\"items\"][0][\"popularity\"] " @@ -390,6 +1636,338 @@ "# Your answer here" ] }, + { + "cell_type": "code", + "execution_count": 245, + "id": "cc87f643-2c89-4891-b239-ea016761c097", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'tracks': {'href': 'https://api.spotify.com/v1/search?offset=0&limit=1&query=The%20strokes&type=track',\n", + " 'limit': 1,\n", + " 'next': 'https://api.spotify.com/v1/search?offset=1&limit=1&query=The%20strokes&type=track',\n", + " 'offset': 0,\n", + " 'previous': None,\n", + " 'total': 1000,\n", + " 'items': [{'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0epOFNiUfyON9EYx7Tpr6V'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0epOFNiUfyON9EYx7Tpr6V',\n", + " 'id': '0epOFNiUfyON9EYx7Tpr6V',\n", + " 'name': 'The Strokes',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0epOFNiUfyON9EYx7Tpr6V'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/2xkZV2Hl1Omi8rk2D7t5lN'},\n", + " 'href': 'https://api.spotify.com/v1/albums/2xkZV2Hl1Omi8rk2D7t5lN',\n", + " 'id': '2xkZV2Hl1Omi8rk2D7t5lN',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273e3f1ba3de4659708c25d0f39'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02e3f1ba3de4659708c25d0f39'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851e3f1ba3de4659708c25d0f39'}],\n", + " 'is_playable': True,\n", + " 'name': 'The New Abnormal',\n", + " 'release_date': '2020-04-10',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 9,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:2xkZV2Hl1Omi8rk2D7t5lN'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0epOFNiUfyON9EYx7Tpr6V'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0epOFNiUfyON9EYx7Tpr6V',\n", + " 'id': '0epOFNiUfyON9EYx7Tpr6V',\n", + " 'name': 'The Strokes',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0epOFNiUfyON9EYx7Tpr6V'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 309053,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'USRC11902726'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/5ruzrDWcT0vuJIOMW7gMnW'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/5ruzrDWcT0vuJIOMW7gMnW',\n", + " 'id': '5ruzrDWcT0vuJIOMW7gMnW',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'The Adults Are Talking',\n", + " 'track_number': 1,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:5ruzrDWcT0vuJIOMW7gMnW'}]}}" + ] + }, + "execution_count": 245, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "results_3 = sp.search(q=\"The strokes\", limit=1)\n", + "results_3" + ] + }, + { + "cell_type": "code", + "execution_count": 246, + "id": "f13fabdb-1d70-4c5a-a63b-0168062fee6c", + "metadata": {}, + "outputs": [], + "source": [ + "artists = [\"The strokes\", \"Arctic Monkeys\", \"Dillom\"]" + ] + }, + { + "cell_type": "code", + "execution_count": 270, + "id": "9bff32e2-42e3-40c9-9da4-ac197ef40efa", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'The strokes': {'tracks': {'href': 'https://api.spotify.com/v1/search?offset=0&limit=5&query=The%20strokes&type=track', 'limit': 5, 'next': 'https://api.spotify.com/v1/search?offset=5&limit=5&query=The%20strokes&type=track', 'offset': 0, 'previous': None, 'total': 7, 'items': [{'album': {'album_type': 'album', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0epOFNiUfyON9EYx7Tpr6V'}, 'href': 'https://api.spotify.com/v1/artists/0epOFNiUfyON9EYx7Tpr6V', 'id': '0epOFNiUfyON9EYx7Tpr6V', 'name': 'The Strokes', 'type': 'artist', 'uri': 'spotify:artist:0epOFNiUfyON9EYx7Tpr6V'}], 'external_urls': {'spotify': 'https://open.spotify.com/album/2yNaksHgeMQM9Quse463b5'}, 'href': 'https://api.spotify.com/v1/albums/2yNaksHgeMQM9Quse463b5', 'id': '2yNaksHgeMQM9Quse463b5', 'images': [{'height': 640, 'width': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b273a388a3f20d1bf2123249cc79'}, {'height': 300, 'width': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e02a388a3f20d1bf2123249cc79'}, {'height': 64, 'width': 64, 'url': 'https://i.scdn.co/image/ab67616d00004851a388a3f20d1bf2123249cc79'}], 'is_playable': True, 'name': 'Is This It', 'release_date': '2001-07-30', 'release_date_precision': 'day', 'total_tracks': 11, 'type': 'album', 'uri': 'spotify:album:2yNaksHgeMQM9Quse463b5'}, 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0epOFNiUfyON9EYx7Tpr6V'}, 'href': 'https://api.spotify.com/v1/artists/0epOFNiUfyON9EYx7Tpr6V', 'id': '0epOFNiUfyON9EYx7Tpr6V', 'name': 'The Strokes', 'type': 'artist', 'uri': 'spotify:artist:0epOFNiUfyON9EYx7Tpr6V'}], 'disc_number': 1, 'duration_ms': 193506, 'explicit': False, 'external_ids': {'isrc': 'USRC10100765'}, 'external_urls': {'spotify': 'https://open.spotify.com/track/7kzKAuUzOITUauHAhoMoxA'}, 'href': 'https://api.spotify.com/v1/tracks/7kzKAuUzOITUauHAhoMoxA', 'id': '7kzKAuUzOITUauHAhoMoxA', 'is_local': False, 'is_playable': True, 'name': 'Last Nite', 'track_number': 7, 'type': 'track', 'uri': 'spotify:track:7kzKAuUzOITUauHAhoMoxA'}, {'album': {'album_type': 'album', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0epOFNiUfyON9EYx7Tpr6V'}, 'href': 'https://api.spotify.com/v1/artists/0epOFNiUfyON9EYx7Tpr6V', 'id': '0epOFNiUfyON9EYx7Tpr6V', 'name': 'The Strokes', 'type': 'artist', 'uri': 'spotify:artist:0epOFNiUfyON9EYx7Tpr6V'}], 'external_urls': {'spotify': 'https://open.spotify.com/album/2xkZV2Hl1Omi8rk2D7t5lN'}, 'href': 'https://api.spotify.com/v1/albums/2xkZV2Hl1Omi8rk2D7t5lN', 'id': '2xkZV2Hl1Omi8rk2D7t5lN', 'images': [{'height': 640, 'width': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b273e3f1ba3de4659708c25d0f39'}, {'height': 300, 'width': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e02e3f1ba3de4659708c25d0f39'}, {'height': 64, 'width': 64, 'url': 'https://i.scdn.co/image/ab67616d00004851e3f1ba3de4659708c25d0f39'}], 'is_playable': True, 'name': 'The New Abnormal', 'release_date': '2020-04-10', 'release_date_precision': 'day', 'total_tracks': 9, 'type': 'album', 'uri': 'spotify:album:2xkZV2Hl1Omi8rk2D7t5lN'}, 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0epOFNiUfyON9EYx7Tpr6V'}, 'href': 'https://api.spotify.com/v1/artists/0epOFNiUfyON9EYx7Tpr6V', 'id': '0epOFNiUfyON9EYx7Tpr6V', 'name': 'The Strokes', 'type': 'artist', 'uri': 'spotify:artist:0epOFNiUfyON9EYx7Tpr6V'}], 'disc_number': 1, 'duration_ms': 309053, 'explicit': False, 'external_ids': {'isrc': 'USRC11902726'}, 'external_urls': {'spotify': 'https://open.spotify.com/track/5ruzrDWcT0vuJIOMW7gMnW'}, 'href': 'https://api.spotify.com/v1/tracks/5ruzrDWcT0vuJIOMW7gMnW', 'id': '5ruzrDWcT0vuJIOMW7gMnW', 'is_local': False, 'is_playable': True, 'name': 'The Adults Are Talking', 'track_number': 1, 'type': 'track', 'uri': 'spotify:track:5ruzrDWcT0vuJIOMW7gMnW'}, {'album': {'album_type': 'album', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0epOFNiUfyON9EYx7Tpr6V'}, 'href': 'https://api.spotify.com/v1/artists/0epOFNiUfyON9EYx7Tpr6V', 'id': '0epOFNiUfyON9EYx7Tpr6V', 'name': 'The Strokes', 'type': 'artist', 'uri': 'spotify:artist:0epOFNiUfyON9EYx7Tpr6V'}], 'external_urls': {'spotify': 'https://open.spotify.com/album/3HFbH1loOUbqCyPsLuHLLh'}, 'href': 'https://api.spotify.com/v1/albums/3HFbH1loOUbqCyPsLuHLLh', 'id': '3HFbH1loOUbqCyPsLuHLLh', 'images': [{'height': 640, 'width': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b2730f35726025e0f025da4c688f'}, {'height': 300, 'width': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e020f35726025e0f025da4c688f'}, {'height': 64, 'width': 64, 'url': 'https://i.scdn.co/image/ab67616d000048510f35726025e0f025da4c688f'}], 'is_playable': True, 'name': 'Room On Fire', 'release_date': '2003-10-28', 'release_date_precision': 'day', 'total_tracks': 11, 'type': 'album', 'uri': 'spotify:album:3HFbH1loOUbqCyPsLuHLLh'}, 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0epOFNiUfyON9EYx7Tpr6V'}, 'href': 'https://api.spotify.com/v1/artists/0epOFNiUfyON9EYx7Tpr6V', 'id': '0epOFNiUfyON9EYx7Tpr6V', 'name': 'The Strokes', 'type': 'artist', 'uri': 'spotify:artist:0epOFNiUfyON9EYx7Tpr6V'}], 'disc_number': 1, 'duration_ms': 219826, 'explicit': False, 'external_ids': {'isrc': 'USRC10301519'}, 'external_urls': {'spotify': 'https://open.spotify.com/track/57Xjny5yNzAcsxnusKmAfA'}, 'href': 'https://api.spotify.com/v1/tracks/57Xjny5yNzAcsxnusKmAfA', 'id': '57Xjny5yNzAcsxnusKmAfA', 'is_local': False, 'is_playable': True, 'name': 'Reptilia', 'track_number': 2, 'type': 'track', 'uri': 'spotify:track:57Xjny5yNzAcsxnusKmAfA'}, {'album': {'album_type': 'album', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0epOFNiUfyON9EYx7Tpr6V'}, 'href': 'https://api.spotify.com/v1/artists/0epOFNiUfyON9EYx7Tpr6V', 'id': '0epOFNiUfyON9EYx7Tpr6V', 'name': 'The Strokes', 'type': 'artist', 'uri': 'spotify:artist:0epOFNiUfyON9EYx7Tpr6V'}], 'external_urls': {'spotify': 'https://open.spotify.com/album/1HQ61my1h3VWp2EBWKlp0n'}, 'href': 'https://api.spotify.com/v1/albums/1HQ61my1h3VWp2EBWKlp0n', 'id': '1HQ61my1h3VWp2EBWKlp0n', 'images': [{'height': 640, 'width': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b2736898a982ff3c6049ba52586c'}, {'height': 300, 'width': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e026898a982ff3c6049ba52586c'}, {'height': 64, 'width': 64, 'url': 'https://i.scdn.co/image/ab67616d000048516898a982ff3c6049ba52586c'}], 'is_playable': True, 'name': 'First Impressions Of Earth', 'release_date': '2006-01-03', 'release_date_precision': 'day', 'total_tracks': 14, 'type': 'album', 'uri': 'spotify:album:1HQ61my1h3VWp2EBWKlp0n'}, 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0epOFNiUfyON9EYx7Tpr6V'}, 'href': 'https://api.spotify.com/v1/artists/0epOFNiUfyON9EYx7Tpr6V', 'id': '0epOFNiUfyON9EYx7Tpr6V', 'name': 'The Strokes', 'type': 'artist', 'uri': 'spotify:artist:0epOFNiUfyON9EYx7Tpr6V'}], 'disc_number': 1, 'duration_ms': 189226, 'explicit': False, 'external_ids': {'isrc': 'USRC10503559'}, 'external_urls': {'spotify': 'https://open.spotify.com/track/4fPBB44eDH71YohayI4eKV'}, 'href': 'https://api.spotify.com/v1/tracks/4fPBB44eDH71YohayI4eKV', 'id': '4fPBB44eDH71YohayI4eKV', 'is_local': False, 'is_playable': True, 'name': 'You Only Live Once', 'track_number': 1, 'type': 'track', 'uri': 'spotify:track:4fPBB44eDH71YohayI4eKV'}, {'album': {'album_type': 'album', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0epOFNiUfyON9EYx7Tpr6V'}, 'href': 'https://api.spotify.com/v1/artists/0epOFNiUfyON9EYx7Tpr6V', 'id': '0epOFNiUfyON9EYx7Tpr6V', 'name': 'The Strokes', 'type': 'artist', 'uri': 'spotify:artist:0epOFNiUfyON9EYx7Tpr6V'}], 'external_urls': {'spotify': 'https://open.spotify.com/album/2yNaksHgeMQM9Quse463b5'}, 'href': 'https://api.spotify.com/v1/albums/2yNaksHgeMQM9Quse463b5', 'id': '2yNaksHgeMQM9Quse463b5', 'images': [{'height': 640, 'width': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b273a388a3f20d1bf2123249cc79'}, {'height': 300, 'width': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e02a388a3f20d1bf2123249cc79'}, {'height': 64, 'width': 64, 'url': 'https://i.scdn.co/image/ab67616d00004851a388a3f20d1bf2123249cc79'}], 'is_playable': True, 'name': 'Is This It', 'release_date': '2001-07-30', 'release_date_precision': 'day', 'total_tracks': 11, 'type': 'album', 'uri': 'spotify:album:2yNaksHgeMQM9Quse463b5'}, 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0epOFNiUfyON9EYx7Tpr6V'}, 'href': 'https://api.spotify.com/v1/artists/0epOFNiUfyON9EYx7Tpr6V', 'id': '0epOFNiUfyON9EYx7Tpr6V', 'name': 'The Strokes', 'type': 'artist', 'uri': 'spotify:artist:0epOFNiUfyON9EYx7Tpr6V'}], 'disc_number': 1, 'duration_ms': 183573, 'explicit': False, 'external_ids': {'isrc': 'USRC10100769'}, 'external_urls': {'spotify': 'https://open.spotify.com/track/56NkIxSZZiMpFP5ZNSxtnT'}, 'href': 'https://api.spotify.com/v1/tracks/56NkIxSZZiMpFP5ZNSxtnT', 'id': '56NkIxSZZiMpFP5ZNSxtnT', 'is_local': False, 'is_playable': True, 'name': 'Someday', 'track_number': 5, 'type': 'track', 'uri': 'spotify:track:56NkIxSZZiMpFP5ZNSxtnT'}]}}, 'Arctic Monkeys': {'tracks': {'href': 'https://api.spotify.com/v1/search?offset=0&limit=5&query=Arctic%20Monkeys&type=track', 'limit': 5, 'next': 'https://api.spotify.com/v1/search?offset=5&limit=5&query=Arctic%20Monkeys&type=track', 'offset': 0, 'previous': None, 'total': 8, 'items': [{'album': {'album_type': 'album', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/7Ln80lUS6He07XvHI8qqHH'}, 'href': 'https://api.spotify.com/v1/artists/7Ln80lUS6He07XvHI8qqHH', 'id': '7Ln80lUS6He07XvHI8qqHH', 'name': 'Arctic Monkeys', 'type': 'artist', 'uri': 'spotify:artist:7Ln80lUS6He07XvHI8qqHH'}], 'external_urls': {'spotify': 'https://open.spotify.com/album/78bpIziExqiI9qztvNFlQu'}, 'href': 'https://api.spotify.com/v1/albums/78bpIziExqiI9qztvNFlQu', 'id': '78bpIziExqiI9qztvNFlQu', 'images': [{'height': 640, 'width': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b2734ae1c4c5c45aabe565499163'}, {'height': 300, 'width': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e024ae1c4c5c45aabe565499163'}, {'height': 64, 'width': 64, 'url': 'https://i.scdn.co/image/ab67616d000048514ae1c4c5c45aabe565499163'}], 'is_playable': True, 'name': 'AM', 'release_date': '2013-09-09', 'release_date_precision': 'day', 'total_tracks': 12, 'type': 'album', 'uri': 'spotify:album:78bpIziExqiI9qztvNFlQu'}, 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/7Ln80lUS6He07XvHI8qqHH'}, 'href': 'https://api.spotify.com/v1/artists/7Ln80lUS6He07XvHI8qqHH', 'id': '7Ln80lUS6He07XvHI8qqHH', 'name': 'Arctic Monkeys', 'type': 'artist', 'uri': 'spotify:artist:7Ln80lUS6He07XvHI8qqHH'}], 'disc_number': 1, 'duration_ms': 272394, 'explicit': False, 'external_ids': {'isrc': 'GBCEL1300362'}, 'external_urls': {'spotify': 'https://open.spotify.com/track/5FVd6KXrgO9B3JPmC8OPst'}, 'href': 'https://api.spotify.com/v1/tracks/5FVd6KXrgO9B3JPmC8OPst', 'id': '5FVd6KXrgO9B3JPmC8OPst', 'is_local': False, 'is_playable': True, 'name': 'Do I Wanna Know?', 'track_number': 1, 'type': 'track', 'uri': 'spotify:track:5FVd6KXrgO9B3JPmC8OPst'}, {'album': {'album_type': 'album', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/7Ln80lUS6He07XvHI8qqHH'}, 'href': 'https://api.spotify.com/v1/artists/7Ln80lUS6He07XvHI8qqHH', 'id': '7Ln80lUS6He07XvHI8qqHH', 'name': 'Arctic Monkeys', 'type': 'artist', 'uri': 'spotify:artist:7Ln80lUS6He07XvHI8qqHH'}], 'external_urls': {'spotify': 'https://open.spotify.com/album/78bpIziExqiI9qztvNFlQu'}, 'href': 'https://api.spotify.com/v1/albums/78bpIziExqiI9qztvNFlQu', 'id': '78bpIziExqiI9qztvNFlQu', 'images': [{'height': 640, 'width': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b2734ae1c4c5c45aabe565499163'}, {'height': 300, 'width': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e024ae1c4c5c45aabe565499163'}, {'height': 64, 'width': 64, 'url': 'https://i.scdn.co/image/ab67616d000048514ae1c4c5c45aabe565499163'}], 'is_playable': True, 'name': 'AM', 'release_date': '2013-09-09', 'release_date_precision': 'day', 'total_tracks': 12, 'type': 'album', 'uri': 'spotify:album:78bpIziExqiI9qztvNFlQu'}, 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/7Ln80lUS6He07XvHI8qqHH'}, 'href': 'https://api.spotify.com/v1/artists/7Ln80lUS6He07XvHI8qqHH', 'id': '7Ln80lUS6He07XvHI8qqHH', 'name': 'Arctic Monkeys', 'type': 'artist', 'uri': 'spotify:artist:7Ln80lUS6He07XvHI8qqHH'}], 'disc_number': 1, 'duration_ms': 183956, 'explicit': False, 'external_ids': {'isrc': 'GBCEL1300373'}, 'external_urls': {'spotify': 'https://open.spotify.com/track/5XeFesFbtLpXzIVDNQP22n'}, 'href': 'https://api.spotify.com/v1/tracks/5XeFesFbtLpXzIVDNQP22n', 'id': '5XeFesFbtLpXzIVDNQP22n', 'is_local': False, 'is_playable': True, 'name': 'I Wanna Be Yours', 'track_number': 12, 'type': 'track', 'uri': 'spotify:track:5XeFesFbtLpXzIVDNQP22n'}, {'album': {'album_type': 'album', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/7Ln80lUS6He07XvHI8qqHH'}, 'href': 'https://api.spotify.com/v1/artists/7Ln80lUS6He07XvHI8qqHH', 'id': '7Ln80lUS6He07XvHI8qqHH', 'name': 'Arctic Monkeys', 'type': 'artist', 'uri': 'spotify:artist:7Ln80lUS6He07XvHI8qqHH'}], 'external_urls': {'spotify': 'https://open.spotify.com/album/1XkGORuUX2QGOEIL4EbJKm'}, 'href': 'https://api.spotify.com/v1/albums/1XkGORuUX2QGOEIL4EbJKm', 'id': '1XkGORuUX2QGOEIL4EbJKm', 'images': [{'height': 640, 'width': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b273b1f8da74f225fa1225cdface'}, {'height': 300, 'width': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e02b1f8da74f225fa1225cdface'}, {'height': 64, 'width': 64, 'url': 'https://i.scdn.co/image/ab67616d00004851b1f8da74f225fa1225cdface'}], 'is_playable': True, 'name': 'Favourite Worst Nightmare', 'release_date': '2007-04-22', 'release_date_precision': 'day', 'total_tracks': 12, 'type': 'album', 'uri': 'spotify:album:1XkGORuUX2QGOEIL4EbJKm'}, 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/7Ln80lUS6He07XvHI8qqHH'}, 'href': 'https://api.spotify.com/v1/artists/7Ln80lUS6He07XvHI8qqHH', 'id': '7Ln80lUS6He07XvHI8qqHH', 'name': 'Arctic Monkeys', 'type': 'artist', 'uri': 'spotify:artist:7Ln80lUS6He07XvHI8qqHH'}], 'disc_number': 1, 'duration_ms': 253586, 'explicit': False, 'external_ids': {'isrc': 'GBCEL0700074'}, 'external_urls': {'spotify': 'https://open.spotify.com/track/0BxE4FqsDD1Ot4YuBXwAPp'}, 'href': 'https://api.spotify.com/v1/tracks/0BxE4FqsDD1Ot4YuBXwAPp', 'id': '0BxE4FqsDD1Ot4YuBXwAPp', 'is_local': False, 'is_playable': True, 'name': '505', 'track_number': 12, 'type': 'track', 'uri': 'spotify:track:0BxE4FqsDD1Ot4YuBXwAPp'}, {'album': {'album_type': 'album', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/7Ln80lUS6He07XvHI8qqHH'}, 'href': 'https://api.spotify.com/v1/artists/7Ln80lUS6He07XvHI8qqHH', 'id': '7Ln80lUS6He07XvHI8qqHH', 'name': 'Arctic Monkeys', 'type': 'artist', 'uri': 'spotify:artist:7Ln80lUS6He07XvHI8qqHH'}], 'external_urls': {'spotify': 'https://open.spotify.com/album/78bpIziExqiI9qztvNFlQu'}, 'href': 'https://api.spotify.com/v1/albums/78bpIziExqiI9qztvNFlQu', 'id': '78bpIziExqiI9qztvNFlQu', 'images': [{'height': 640, 'width': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b2734ae1c4c5c45aabe565499163'}, {'height': 300, 'width': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e024ae1c4c5c45aabe565499163'}, {'height': 64, 'width': 64, 'url': 'https://i.scdn.co/image/ab67616d000048514ae1c4c5c45aabe565499163'}], 'is_playable': True, 'name': 'AM', 'release_date': '2013-09-09', 'release_date_precision': 'day', 'total_tracks': 12, 'type': 'album', 'uri': 'spotify:album:78bpIziExqiI9qztvNFlQu'}, 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/7Ln80lUS6He07XvHI8qqHH'}, 'href': 'https://api.spotify.com/v1/artists/7Ln80lUS6He07XvHI8qqHH', 'id': '7Ln80lUS6He07XvHI8qqHH', 'name': 'Arctic Monkeys', 'type': 'artist', 'uri': 'spotify:artist:7Ln80lUS6He07XvHI8qqHH'}], 'disc_number': 1, 'duration_ms': 201726, 'explicit': False, 'external_ids': {'isrc': 'GBCEL1300363'}, 'external_urls': {'spotify': 'https://open.spotify.com/track/2AT8iROs4FQueDv2c8q2KE'}, 'href': 'https://api.spotify.com/v1/tracks/2AT8iROs4FQueDv2c8q2KE', 'id': '2AT8iROs4FQueDv2c8q2KE', 'is_local': False, 'is_playable': True, 'name': 'R U Mine?', 'track_number': 2, 'type': 'track', 'uri': 'spotify:track:2AT8iROs4FQueDv2c8q2KE'}, {'album': {'album_type': 'album', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/7Ln80lUS6He07XvHI8qqHH'}, 'href': 'https://api.spotify.com/v1/artists/7Ln80lUS6He07XvHI8qqHH', 'id': '7Ln80lUS6He07XvHI8qqHH', 'name': 'Arctic Monkeys', 'type': 'artist', 'uri': 'spotify:artist:7Ln80lUS6He07XvHI8qqHH'}], 'external_urls': {'spotify': 'https://open.spotify.com/album/1XkGORuUX2QGOEIL4EbJKm'}, 'href': 'https://api.spotify.com/v1/albums/1XkGORuUX2QGOEIL4EbJKm', 'id': '1XkGORuUX2QGOEIL4EbJKm', 'images': [{'height': 640, 'width': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b273b1f8da74f225fa1225cdface'}, {'height': 300, 'width': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e02b1f8da74f225fa1225cdface'}, {'height': 64, 'width': 64, 'url': 'https://i.scdn.co/image/ab67616d00004851b1f8da74f225fa1225cdface'}], 'is_playable': True, 'name': 'Favourite Worst Nightmare', 'release_date': '2007-04-22', 'release_date_precision': 'day', 'total_tracks': 12, 'type': 'album', 'uri': 'spotify:album:1XkGORuUX2QGOEIL4EbJKm'}, 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/7Ln80lUS6He07XvHI8qqHH'}, 'href': 'https://api.spotify.com/v1/artists/7Ln80lUS6He07XvHI8qqHH', 'id': '7Ln80lUS6He07XvHI8qqHH', 'name': 'Arctic Monkeys', 'type': 'artist', 'uri': 'spotify:artist:7Ln80lUS6He07XvHI8qqHH'}], 'disc_number': 1, 'duration_ms': 183893, 'explicit': False, 'external_ids': {'isrc': 'GBCEL0700067'}, 'external_urls': {'spotify': 'https://open.spotify.com/track/2x8evxqUlF0eRabbW2JBJd'}, 'href': 'https://api.spotify.com/v1/tracks/2x8evxqUlF0eRabbW2JBJd', 'id': '2x8evxqUlF0eRabbW2JBJd', 'is_local': False, 'is_playable': True, 'name': 'Fluorescent Adolescent', 'track_number': 5, 'type': 'track', 'uri': 'spotify:track:2x8evxqUlF0eRabbW2JBJd'}]}}, 'Dillom': {'tracks': {'href': 'https://api.spotify.com/v1/search?offset=0&limit=5&query=Dillom&type=track', 'limit': 5, 'next': 'https://api.spotify.com/v1/search?offset=5&limit=5&query=Dillom&type=track', 'offset': 0, 'previous': None, 'total': 7, 'items': [{'album': {'album_type': 'single', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/716NhGYqD1jl2wI1Qkgq36'}, 'href': 'https://api.spotify.com/v1/artists/716NhGYqD1jl2wI1Qkgq36', 'id': '716NhGYqD1jl2wI1Qkgq36', 'name': 'Bizarrap', 'type': 'artist', 'uri': 'spotify:artist:716NhGYqD1jl2wI1Qkgq36'}, {'external_urls': {'spotify': 'https://open.spotify.com/artist/4cJD9t5QBFTUQcd3xfbOb2'}, 'href': 'https://api.spotify.com/v1/artists/4cJD9t5QBFTUQcd3xfbOb2', 'id': '4cJD9t5QBFTUQcd3xfbOb2', 'name': 'Dillom', 'type': 'artist', 'uri': 'spotify:artist:4cJD9t5QBFTUQcd3xfbOb2'}], 'external_urls': {'spotify': 'https://open.spotify.com/album/7EpZ3YjIPfaeB5MAzI5HnB'}, 'href': 'https://api.spotify.com/v1/albums/7EpZ3YjIPfaeB5MAzI5HnB', 'id': '7EpZ3YjIPfaeB5MAzI5HnB', 'images': [{'height': 640, 'width': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b27372513302fe1830d405f6b429'}, {'height': 300, 'width': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e0272513302fe1830d405f6b429'}, {'height': 64, 'width': 64, 'url': 'https://i.scdn.co/image/ab67616d0000485172513302fe1830d405f6b429'}], 'is_playable': True, 'name': 'Dillom: Bzrp Music Sessions, Vol. 9/66', 'release_date': '2019-07-11', 'release_date_precision': 'day', 'total_tracks': 1, 'type': 'album', 'uri': 'spotify:album:7EpZ3YjIPfaeB5MAzI5HnB'}, 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/716NhGYqD1jl2wI1Qkgq36'}, 'href': 'https://api.spotify.com/v1/artists/716NhGYqD1jl2wI1Qkgq36', 'id': '716NhGYqD1jl2wI1Qkgq36', 'name': 'Bizarrap', 'type': 'artist', 'uri': 'spotify:artist:716NhGYqD1jl2wI1Qkgq36'}, {'external_urls': {'spotify': 'https://open.spotify.com/artist/4cJD9t5QBFTUQcd3xfbOb2'}, 'href': 'https://api.spotify.com/v1/artists/4cJD9t5QBFTUQcd3xfbOb2', 'id': '4cJD9t5QBFTUQcd3xfbOb2', 'name': 'Dillom', 'type': 'artist', 'uri': 'spotify:artist:4cJD9t5QBFTUQcd3xfbOb2'}], 'disc_number': 1, 'duration_ms': 151843, 'explicit': True, 'external_ids': {'isrc': 'ushm21996102'}, 'external_urls': {'spotify': 'https://open.spotify.com/track/6Vwfjz5LsHKTYY5IzhKW2A'}, 'href': 'https://api.spotify.com/v1/tracks/6Vwfjz5LsHKTYY5IzhKW2A', 'id': '6Vwfjz5LsHKTYY5IzhKW2A', 'is_local': False, 'is_playable': True, 'name': 'Dillom: Bzrp Music Sessions, Vol. 9/66', 'track_number': 1, 'type': 'track', 'uri': 'spotify:track:6Vwfjz5LsHKTYY5IzhKW2A'}, {'album': {'album_type': 'album', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/4cJD9t5QBFTUQcd3xfbOb2'}, 'href': 'https://api.spotify.com/v1/artists/4cJD9t5QBFTUQcd3xfbOb2', 'id': '4cJD9t5QBFTUQcd3xfbOb2', 'name': 'Dillom', 'type': 'artist', 'uri': 'spotify:artist:4cJD9t5QBFTUQcd3xfbOb2'}], 'external_urls': {'spotify': 'https://open.spotify.com/album/633jS6fM44Zbr1gyI0eF19'}, 'href': 'https://api.spotify.com/v1/albums/633jS6fM44Zbr1gyI0eF19', 'id': '633jS6fM44Zbr1gyI0eF19', 'images': [{'height': 640, 'width': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b27378d066acf66eb772239cca78'}, {'height': 300, 'width': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e0278d066acf66eb772239cca78'}, {'height': 64, 'width': 64, 'url': 'https://i.scdn.co/image/ab67616d0000485178d066acf66eb772239cca78'}], 'is_playable': True, 'name': 'Por cesárea', 'release_date': '2024-04-26', 'release_date_precision': 'day', 'total_tracks': 12, 'type': 'album', 'uri': 'spotify:album:633jS6fM44Zbr1gyI0eF19'}, 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/4cJD9t5QBFTUQcd3xfbOb2'}, 'href': 'https://api.spotify.com/v1/artists/4cJD9t5QBFTUQcd3xfbOb2', 'id': '4cJD9t5QBFTUQcd3xfbOb2', 'name': 'Dillom', 'type': 'artist', 'uri': 'spotify:artist:4cJD9t5QBFTUQcd3xfbOb2'}], 'disc_number': 1, 'duration_ms': 216837, 'explicit': False, 'external_ids': {'isrc': 'ARR4B2400016'}, 'external_urls': {'spotify': 'https://open.spotify.com/track/0uFRDicafe9Gto0v2pk3kT'}, 'href': 'https://api.spotify.com/v1/tracks/0uFRDicafe9Gto0v2pk3kT', 'id': '0uFRDicafe9Gto0v2pk3kT', 'is_local': False, 'is_playable': True, 'name': 'Cirugía', 'track_number': 3, 'type': 'track', 'uri': 'spotify:track:0uFRDicafe9Gto0v2pk3kT'}, {'album': {'album_type': 'album', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/4cJD9t5QBFTUQcd3xfbOb2'}, 'href': 'https://api.spotify.com/v1/artists/4cJD9t5QBFTUQcd3xfbOb2', 'id': '4cJD9t5QBFTUQcd3xfbOb2', 'name': 'Dillom', 'type': 'artist', 'uri': 'spotify:artist:4cJD9t5QBFTUQcd3xfbOb2'}], 'external_urls': {'spotify': 'https://open.spotify.com/album/39g3CsFBc9YK9Z6AbvvkgF'}, 'href': 'https://api.spotify.com/v1/albums/39g3CsFBc9YK9Z6AbvvkgF', 'id': '39g3CsFBc9YK9Z6AbvvkgF', 'images': [{'height': 640, 'width': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b2730f9f5a5e9ed058b856ac42ab'}, {'height': 300, 'width': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e020f9f5a5e9ed058b856ac42ab'}, {'height': 64, 'width': 64, 'url': 'https://i.scdn.co/image/ab67616d000048510f9f5a5e9ed058b856ac42ab'}], 'is_playable': True, 'name': 'POST MORTEM', 'release_date': '2021-12-01', 'release_date_precision': 'day', 'total_tracks': 18, 'type': 'album', 'uri': 'spotify:album:39g3CsFBc9YK9Z6AbvvkgF'}, 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/4cJD9t5QBFTUQcd3xfbOb2'}, 'href': 'https://api.spotify.com/v1/artists/4cJD9t5QBFTUQcd3xfbOb2', 'id': '4cJD9t5QBFTUQcd3xfbOb2', 'name': 'Dillom', 'type': 'artist', 'uri': 'spotify:artist:4cJD9t5QBFTUQcd3xfbOb2'}], 'disc_number': 1, 'duration_ms': 169824, 'explicit': True, 'external_ids': {'isrc': 'ARR4B2100001'}, 'external_urls': {'spotify': 'https://open.spotify.com/track/2Z4FBa6hAEh7VTHYCqXy7P'}, 'href': 'https://api.spotify.com/v1/tracks/2Z4FBa6hAEh7VTHYCqXy7P', 'id': '2Z4FBa6hAEh7VTHYCqXy7P', 'is_local': False, 'is_playable': True, 'name': 'OPA', 'track_number': 12, 'type': 'track', 'uri': 'spotify:track:2Z4FBa6hAEh7VTHYCqXy7P'}, {'album': {'album_type': 'album', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/4cJD9t5QBFTUQcd3xfbOb2'}, 'href': 'https://api.spotify.com/v1/artists/4cJD9t5QBFTUQcd3xfbOb2', 'id': '4cJD9t5QBFTUQcd3xfbOb2', 'name': 'Dillom', 'type': 'artist', 'uri': 'spotify:artist:4cJD9t5QBFTUQcd3xfbOb2'}], 'external_urls': {'spotify': 'https://open.spotify.com/album/39g3CsFBc9YK9Z6AbvvkgF'}, 'href': 'https://api.spotify.com/v1/albums/39g3CsFBc9YK9Z6AbvvkgF', 'id': '39g3CsFBc9YK9Z6AbvvkgF', 'images': [{'height': 640, 'width': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b2730f9f5a5e9ed058b856ac42ab'}, {'height': 300, 'width': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e020f9f5a5e9ed058b856ac42ab'}, {'height': 64, 'width': 64, 'url': 'https://i.scdn.co/image/ab67616d000048510f9f5a5e9ed058b856ac42ab'}], 'is_playable': True, 'name': 'POST MORTEM', 'release_date': '2021-12-01', 'release_date_precision': 'day', 'total_tracks': 18, 'type': 'album', 'uri': 'spotify:album:39g3CsFBc9YK9Z6AbvvkgF'}, 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/4cJD9t5QBFTUQcd3xfbOb2'}, 'href': 'https://api.spotify.com/v1/artists/4cJD9t5QBFTUQcd3xfbOb2', 'id': '4cJD9t5QBFTUQcd3xfbOb2', 'name': 'Dillom', 'type': 'artist', 'uri': 'spotify:artist:4cJD9t5QBFTUQcd3xfbOb2'}], 'disc_number': 1, 'duration_ms': 176568, 'explicit': True, 'external_ids': {'isrc': 'ARR4B2100022'}, 'external_urls': {'spotify': 'https://open.spotify.com/track/6ZvsmvXknoN8uK2MSEGpwT'}, 'href': 'https://api.spotify.com/v1/tracks/6ZvsmvXknoN8uK2MSEGpwT', 'id': '6ZvsmvXknoN8uK2MSEGpwT', 'is_local': False, 'is_playable': True, 'name': '220', 'track_number': 14, 'type': 'track', 'uri': 'spotify:track:6ZvsmvXknoN8uK2MSEGpwT'}, {'album': {'album_type': 'single', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/29rvPhemBdOLYdLr2xI8dr'}, 'href': 'https://api.spotify.com/v1/artists/29rvPhemBdOLYdLr2xI8dr', 'id': '29rvPhemBdOLYdLr2xI8dr', 'name': 'Six Sex', 'type': 'artist', 'uri': 'spotify:artist:29rvPhemBdOLYdLr2xI8dr'}], 'external_urls': {'spotify': 'https://open.spotify.com/album/5FayNByW0emcrthHzDHihF'}, 'href': 'https://api.spotify.com/v1/albums/5FayNByW0emcrthHzDHihF', 'id': '5FayNByW0emcrthHzDHihF', 'images': [{'height': 640, 'width': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b273d400f3133207bec8010d66c9'}, {'height': 300, 'width': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e02d400f3133207bec8010d66c9'}, {'height': 64, 'width': 64, 'url': 'https://i.scdn.co/image/ab67616d00004851d400f3133207bec8010d66c9'}], 'is_playable': True, 'name': 'X-sex', 'release_date': '2025-03-06', 'release_date_precision': 'day', 'total_tracks': 6, 'type': 'album', 'uri': 'spotify:album:5FayNByW0emcrthHzDHihF'}, 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/29rvPhemBdOLYdLr2xI8dr'}, 'href': 'https://api.spotify.com/v1/artists/29rvPhemBdOLYdLr2xI8dr', 'id': '29rvPhemBdOLYdLr2xI8dr', 'name': 'Six Sex', 'type': 'artist', 'uri': 'spotify:artist:29rvPhemBdOLYdLr2xI8dr'}, {'external_urls': {'spotify': 'https://open.spotify.com/artist/3TnlUNMMrwW2IYrlBDTygL'}, 'href': 'https://api.spotify.com/v1/artists/3TnlUNMMrwW2IYrlBDTygL', 'id': '3TnlUNMMrwW2IYrlBDTygL', 'name': 'dj g2g', 'type': 'artist', 'uri': 'spotify:artist:3TnlUNMMrwW2IYrlBDTygL'}, {'external_urls': {'spotify': 'https://open.spotify.com/artist/69UVGTxhvI9zrl4tVafMgC'}, 'href': 'https://api.spotify.com/v1/artists/69UVGTxhvI9zrl4tVafMgC', 'id': '69UVGTxhvI9zrl4tVafMgC', 'name': 'DBBD', 'type': 'artist', 'uri': 'spotify:artist:69UVGTxhvI9zrl4tVafMgC'}, {'external_urls': {'spotify': 'https://open.spotify.com/artist/4cJD9t5QBFTUQcd3xfbOb2'}, 'href': 'https://api.spotify.com/v1/artists/4cJD9t5QBFTUQcd3xfbOb2', 'id': '4cJD9t5QBFTUQcd3xfbOb2', 'name': 'Dillom', 'type': 'artist', 'uri': 'spotify:artist:4cJD9t5QBFTUQcd3xfbOb2'}], 'disc_number': 1, 'duration_ms': 161119, 'explicit': True, 'external_ids': {'isrc': 'UYB282567181'}, 'external_urls': {'spotify': 'https://open.spotify.com/track/0hrrIKyJYc5BNLOn6zsCE6'}, 'href': 'https://api.spotify.com/v1/tracks/0hrrIKyJYc5BNLOn6zsCE6', 'id': '0hrrIKyJYc5BNLOn6zsCE6', 'is_local': False, 'is_playable': True, 'name': 'Tócame (feat. Dillom)', 'track_number': 4, 'type': 'track', 'uri': 'spotify:track:0hrrIKyJYc5BNLOn6zsCE6'}]}}}\n" + ] + } + ], + "source": [ + "artist_data = {}\n", + "for i in artists:\n", + " name = sp.search(q=i, limit=5)\n", + " artist_data[i] = name\n", + "\n", + "print (artist_data)" + ] + }, + { + "cell_type": "code", + "execution_count": 271, + "id": "4dcf5c58-775c-4d6d-ab17-ab5a4b5dc7c2", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "dict_keys(['tracks'])" + ] + }, + "execution_count": 271, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "the_strokes_data = artist_data[\"The strokes\"].keys()\n", + "the_strokes_data" + ] + }, + { + "cell_type": "code", + "execution_count": 272, + "id": "0426b9dd-6c07-48b4-81c3-01954f7f89da", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'album': {'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0epOFNiUfyON9EYx7Tpr6V'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0epOFNiUfyON9EYx7Tpr6V',\n", + " 'id': '0epOFNiUfyON9EYx7Tpr6V',\n", + " 'name': 'The Strokes',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0epOFNiUfyON9EYx7Tpr6V'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/2yNaksHgeMQM9Quse463b5'},\n", + " 'href': 'https://api.spotify.com/v1/albums/2yNaksHgeMQM9Quse463b5',\n", + " 'id': '2yNaksHgeMQM9Quse463b5',\n", + " 'images': [{'height': 640,\n", + " 'width': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273a388a3f20d1bf2123249cc79'},\n", + " {'height': 300,\n", + " 'width': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02a388a3f20d1bf2123249cc79'},\n", + " {'height': 64,\n", + " 'width': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851a388a3f20d1bf2123249cc79'}],\n", + " 'is_playable': True,\n", + " 'name': 'Is This It',\n", + " 'release_date': '2001-07-30',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 11,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:2yNaksHgeMQM9Quse463b5'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0epOFNiUfyON9EYx7Tpr6V'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0epOFNiUfyON9EYx7Tpr6V',\n", + " 'id': '0epOFNiUfyON9EYx7Tpr6V',\n", + " 'name': 'The Strokes',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0epOFNiUfyON9EYx7Tpr6V'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 193506,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'USRC10100765'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/7kzKAuUzOITUauHAhoMoxA'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/7kzKAuUzOITUauHAhoMoxA',\n", + " 'id': '7kzKAuUzOITUauHAhoMoxA',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Last Nite',\n", + " 'track_number': 7,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:7kzKAuUzOITUauHAhoMoxA'}" + ] + }, + "execution_count": 272, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "the_strokes_data_2 = artist_data[\"The strokes\"][\"tracks\"][\"items\"][0]\n", + "the_strokes_data_2" + ] + }, + { + "cell_type": "code", + "execution_count": 273, + "id": "e26e0467-0cde-46df-b9bf-18a5b4d707f5", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'0epOFNiUfyON9EYx7Tpr6V'" + ] + }, + "execution_count": 273, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "the_strokes_data_3 = artist_data[\"The strokes\"][\"tracks\"][\"items\"][0][\"artists\"][0][\"id\"]\n", + "the_strokes_data_3" + ] + }, + { + "cell_type": "code", + "execution_count": 274, + "id": "3a42944c-55bb-434c-bb0e-a65f228509bd", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'The strokes': {'id': '0epOFNiUfyON9EYx7Tpr6V'},\n", + " 'Arctic Monkeys': {'id': '7Ln80lUS6He07XvHI8qqHH'},\n", + " 'Dillom': {'id': '716NhGYqD1jl2wI1Qkgq36'}}" + ] + }, + "execution_count": 274, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "artist_dict = {}\n", + "for h in artists:\n", + " artist_id = artist_data[h][\"tracks\"][\"items\"][0][\"artists\"][0][\"id\"]\n", + " artist_dict[h] = {\"id\": artist_id}\n", + "\n", + "artist_dict" + ] + }, + { + "cell_type": "code", + "execution_count": 277, + "id": "ece43b44-acc0-46d5-b3aa-d3f520c266d1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'Reptilia'" + ] + }, + "execution_count": 277, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "the_strokes_song = artist_data[\"The strokes\"][\"tracks\"][\"items\"][2]['name']\n", + "the_strokes_song" + ] + }, + { + "cell_type": "code", + "execution_count": 278, + "id": "fbd8e61c-d6af-4800-a2f6-c913861e998c", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['Last Nite', 'The Adults Are Talking', 'Reptilia', 'You Only Live Once', 'Someday']\n" + ] + } + ], + "source": [ + "top_tracks_dummy = []\n", + "\n", + "for s in range(5):\n", + " the_strokes_song_2 = artist_data[\"The strokes\"][\"tracks\"][\"items\"][s]['name']\n", + " top_tracks_dummy.append(the_strokes_song_2)\n", + "\n", + "print (top_tracks_dummy)\n", + " \n" + ] + }, + { + "cell_type": "code", + "execution_count": 281, + "id": "c2fb7606-eb8c-436c-823e-45634cab79e8", + "metadata": {}, + "outputs": [], + "source": [ + "def get_top_tracks(artist):\n", + " top_tracks = []\n", + " \n", + " for s in range(5):\n", + " artist_song = artist_data[artist][\"tracks\"][\"items\"][s]['name']\n", + " top_tracks.append(artist_song)\n", + "\n", + " return(top_tracks)" + ] + }, + { + "cell_type": "code", + "execution_count": 283, + "id": "c271d844-bc12-4413-9581-58997188e3fe", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['Dillom: Bzrp Music Sessions, Vol. 9/66',\n", + " 'Cirugía',\n", + " 'OPA',\n", + " '220',\n", + " 'Tócame (feat. Dillom)']" + ] + }, + "execution_count": 283, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "get_top_tracks(\"Dillom\")" + ] + }, { "cell_type": "markdown", "id": "94ad5fdc-22e5-4521-8aa1-c6833eb7e949", @@ -558,7 +2136,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.13.9" } }, "nbformat": 4,