07.09.2015 - Spotify has an API that can tell you the genre of a piece of music. In this Python API tutorial we'll be using Python 3.4 for all of our examples. to access an API (we'll talk about authentication in a later post). response = requests.get("http://api.open-notify.org/iss-pass.json") print(response.status_code).