{"id":13653848,"url":"https://github.com/sleepyfran/itunespy","last_synced_at":"2025-12-12T01:00:39.384Z","repository":{"id":60722471,"uuid":"39341087","full_name":"sleepyfran/itunespy","owner":"sleepyfran","description":":snake: A simple library to fetch data from the iTunes Store API made for Python \u003e= 3.5","archived":false,"fork":false,"pushed_at":"2024-07-12T12:22:36.000Z","size":104,"stargazers_count":64,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-11-07T17:12:36.395Z","etag":null,"topics":["itunes","itunes-api","pypi","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sleepyfran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-19T16:49:08.000Z","updated_at":"2025-08-31T15:43:57.000Z","dependencies_parsed_at":"2024-10-25T17:29:10.421Z","dependency_job_id":"25a48f8e-02b2-4be2-8a65-fd623d38d4bd","html_url":"https://github.com/sleepyfran/itunespy","commit_stats":{"total_commits":84,"total_committers":5,"mean_commits":16.8,"dds":0.1785714285714286,"last_synced_commit":"4ae6fc1780284510a4072d70cc6254668a395566"},"previous_names":["spaceisstrange/itunespy"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/sleepyfran/itunespy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleepyfran%2Fitunespy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleepyfran%2Fitunespy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleepyfran%2Fitunespy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleepyfran%2Fitunespy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sleepyfran","download_url":"https://codeload.github.com/sleepyfran/itunespy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleepyfran%2Fitunespy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27620799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-09T02:00:09.185Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["itunes","itunes-api","pypi","python"],"created_at":"2024-08-02T02:01:19.002Z","updated_at":"2025-12-12T01:00:39.222Z","avatar_url":"https://github.com/sleepyfran.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://stand-with-ukraine.pp.ua)\n# itunespy [![PyPI version](https://badge.fury.io/py/itunespy.svg)](http://badge.fury.io/py/itunespy)\n\nitunespy is a simple library to fetch data from the iTunes Store API made for Python 3.5 and beyond.\n\n## Installing\nYou can install it from *pip*:\n    \n    pip install itunespy\n\nOr you can simply clone this project anywhere in your computer:\n\n    git clone https://github.com/sleepyfran/itunespy.git\n\nAnd then enter the cloned repo and execute:\n\n    python setup.py install\n## Dependencies\n\nitunespy requires [Requests](https://github.com/kennethreitz/requests) and [pycountry](https://github.com/flyingcircusio/pycountry) installed.\n\n## Examples and information\nSearch an artist and show all its album's names:\n\n```python\nimport itunespy\n\nartist = itunespy.search_artist('Steven Wilson')  # Returns a list\nalbums = artist[0].get_albums()  # Get albums from the first result\n\nfor album in albums:\n    print(album.collection_name)\n```\n\nOr search an album and show all its song's names and length, and finally the album length:\n\n```python\nimport itunespy\n\nalbum = itunespy.search_album('One Hour By The Concrete Lake')  # Returns a list\ntracks = album[0].get_tracks()  # Get tracks from the first result\n\nfor track in tracks:\n    print(track.artist_name + ': ' + track.track_name + str(track.get_track_time_minutes()))\nprint('Total playing time: ' + str(album[0].get_album_time()))\n```\n\nOr search for a track:\n\n```python\nimport itunespy\n\ntrack = itunespy.search_track('Iter Impius')  # Returns a list\nprint(track[0].artist_name + ': ' + track[0].track_name + ' | Length: ' + str(track[0].get_track_time_minutes())) # Get info from the first result\n```\n\nOr ebook authors:\n\n```python    \nimport itunespy\n\nauthor = itunespy.search_book_author('Fyodor Dostoevsky')  # Search for Dostoevsky\n\nbooks = author[0].get_books()  # Get books from the firs result\n\nfor book in books:\n    print(book.track_name)  # Show each book's name\n```\n\nOr software:\n```python    \nimport itunespy\n\ntelegram = itunespy.search_software('Telegram')\n\nprint(telegram[0].track_name)  # Prints 'Telegram Messenger'\n```\n\nBasically, every *search_* method is just an alias for a general search with certain parameters to make your life easier.\n\nI made the basic ones, if you miss any, make an issue and provide information about the type you want added.\n\nYou can also perform a lookup:\n\n```python\nimport itunespy\n\nlookup = itunespy.lookup(upc=720642462928) # Lookup for the Weezer's album 'Weezer'\n\nfor item in lookup:\n    print(item.artist_name + ': ' + item.collection_name)\n```\n\nSince every search or lookup can return more than one object type, every object in the returned list has a 'type' property, so you can check if it's an artist, album or track like this:\n```python\nimport itunespy\n\nlookup = itunespy.lookup(id=428011728)  # Steven Wilson's ID\n\nfor l in lookup:\n    if l.type == 'artist':\n        print('Artist!')\n        print(l.artist_type)  # Since it's an artist, you can also check its artist type\n```\n\nFor a complete list, take a look at the *wrapperType* and *kind* documentation in the iTunes API's site.\n\nEach request has some parameters that you need to know. Searches has these:\n    \n    term: The URL-encoded text string you want to search for. Example: Steven Wilson.\n            The function will take care of spaces so you don't have to.\n    country: The two-letter country code for the store you want to search.\n            For a full list of the codes: http://en.wikipedia.org/wiki/%20ISO_3166-1_alpha-2\n    media: The media type you want to search for. Since this module is made for music I recommend leaving it blank.\n    entity: The type of results you want returned, relative to the specified media type. Example: musicArtist.\n            Full list: musicArtist, musicTrack, album, musicVideo, mix, song\n    attribute: The attribute you want to search for in the stores, relative to the specified media type.\n    limit: The number of search results you want the iTunes Store to return.\n    \n**Note**: Only the *term* is obligatory, the other ones have default values that will be used in case you don't provide any.\n**Note 2**: In specific searches, like *search_artist* or *search_album*, etc, don't change entity, since it's configured inside the function to retrieve an specific entity.\n\nFor lookups, the same parameters apply except for *term*, which changes to a couple of id fields:\n    \n    id: iTunes ID of the artist/album/track\n    artist_amg_id: All Music Guide ID of the artist\n    upc: UPCs/EANs\n\nEvery search and lookup will **always** return a list of *result_item* instances, except if it's an artist, album, movie artist or an ebook author, which inheritates from *result_item* but has extra methods, like *get_albums* in *music_artist*. Each object has their own variables, following the iTunes API names adapted to Python syntax.\n\nTo take a look at all of this simply go to the [item_result](https://github.com/sleepyfran/itunespy/blob/master/itunespy/result_item.py) class.\n\n## Contributing\nI'm accepting any pull request to improve or fix anything in the library, just fork the project and hack it!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleepyfran%2Fitunespy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsleepyfran%2Fitunespy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleepyfran%2Fitunespy/lists"}