Skip to main content

PyGenius

Want to use data from rap songs in your Python scripts but bummed that there’s no API to do so? Well guess what? NOW U CAN, DAWG.

Welcome to PyGenius.


To import:

from pygenius import songs, artists, wordsearch


Functions currently available:

artists.albumList(artist, arg) Returns a list of albums that the specified artist has recorded. If second argument is set as ‘links’, the links to the albums will be returned.

artists.getDates(artist) Returns a list of albums recorded by a specific artist, as well as the release year.

artists.getAlbumData(artist, album) Returns the metadata about an album: description, track numbers, and track names.

artists.getArtistBio(artist) Returns an artist’s bio.

artists.getPopularSongs(artist, arg) Returns the most popular songs by a specified artist. If the optional second argument is ‘link’, will return links to songs that can be passed in to other functions.

wordsearch.searchWords(keyword, arg) Returns results for a key word search. Default return is artist and song name, but if the optional second argument is set to ‘link’, a link to the song is returned.

songs.searchSong(artist, title, arg) Returns lyrics for a specified song title. If the optional third argument is set to ‘lyrics’, only the lyrics will be returned; if it’s ‘link’, only links to each lyric’s annotations are returned (and can be passed into the searchAnnotations function); otherwise, both are returned by default.

songs.searchAnnotations(query) Will return content of a specified annotation link, including HTML links to pictures, videos and GIFs, as well as links to external sites referenced.

songs.findAllSongs(artist, arg) Will return all songs attributed to the specified artist. If second argument is specified as ‘links’, will return the links to the songs; if ‘titles’, will return the song titles; otherwise, will return both by default.

Metadata

Release files for pygenius 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pygenius 1.0
File Size Uploaded Provenance Actions
pygenius-1.0.tar.gz 4.6 kB Without provenance Details for pygenius-1.0.tar.gz

Release files / pygenius-1.0.tar.gz

Download URL pygenius-1.0.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2729b899729abe538a6c6b244b472eeb2d1699f8b6e40c09be0a6b105d1addbf
BLAKE2b-256 checksum
How to use checksums
e36d8fdd9819e98d7cddfbaab00a04d2203169fd79ef59a5311e99fbf2b4c76e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pygenius 1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page