1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search-music",
10 "keywords": ["classical music"],
11 "trackUrls": ["https://open.spotify.com/track/2xizRhme7pYeITbH1NLLGt"],
12 "albumUrls": ["https://open.spotify.com/album/7dVA06E7AP7P7VzPyNxQVO"],
13 "artistUrls": ["https://open.spotify.com/artist/5yxyJsFanEAuwSM5kOuZKc"],
14 "playlistUrls": ["https://open.spotify.com/playlist/37i9dQZF1DX4UtSsGT1Sbe"],
15 "podcastUrls": ["https://open.spotify.com/show/5NT0kUEUIdS5FxotBPJvMX"],
16 "maxItems": 10,
17}
18
19
20run = client.actor("icoe-man/spotify-music-scraper").call(run_input=run_input)
21
22
23print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
24for item in client.dataset(run.default_dataset_id).iterate_items():
25 print(item)
26
27