Get Genre of Song #179
-
Hi, Is there anyway to get the genre of a song? I look in the documentation and all I could find related to genre was charts. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi. Genius doesn't provide genres (or tags as Genius likes to call them) through their official API. However, you can get them through the public/user API. Here's how you can do it: from lyricsgenius import PublicAPI
song_id = 1 # the song you want tags for
public_api = PublicAPI()
song = public_api.song(song_id)['song']
print(song['tags']) Note: You must be using v3.0 for this to work.
|
Beta Was this translation helpful? Give feedback.
-
@allerter, it is for this reason that I'd like to minimize use of the user/web API going forward, prioritizing the token-authorized API whenever possible. |
Beta Was this translation helpful? Give feedback.
-
@johnwmillr I agree with you, but it's apparent that Genius has abandoned the developers API for years now and they have no intention of moving the functionality from the web API to the developers API. They abandoned it so early that even for something as simple as getting the genres of a song we have to resort to the web API. |
Beta Was this translation helpful? Give feedback.
Hi. Genius doesn't provide genres (or tags as Genius likes to call them) through their official API. However, you can get them through the public/user API. Here's how you can do it:
Note: You must be using v3.0 for this to work.
Warning: Personally, I haven't had any problems so far using the user/web API, but here's what one of the staff at Genius said about it: