iTunes API is a Java client library providing easy programmatic access to four different iTunes APIs.
Search for 15 podcasts with CBS Radio as author in the Canadian iTunes store:
Response response = new Search("cbs radio")
.setCountry(Country.CANADA)
.setAttribute(Attribute.AUTHOR_TERM)
.setMedia(Media.PODCAST)
.setLimit(15)
.execute();
See also Search API page on apple.com
Lookup Bruce Springsteen albums by his iTunes artist id, 178834:
Response response = new Lookup()
.addId("178834")
.setEntity(Entity.ALBUM)
.execute();
See also Lookup API page on apple.com
The purpose of the Feed Generator API is to create custom RSS feeds of specific iTunes Store content, such as charts and new entries.
This library allows creating feed URLs programmatically. It also allows retrieving the feed content directly.
For example, create a feed URL for the top 10 hot albums for Apple Music in France:
String url = new FeedGenerator()
.setCountry(Country.FRANCE)
.setMediaType(MediaType.APPLE_MUSIC)
.setFeedType(FeedType.HOT_ALBUMS)
.setResultsLimit(10)
.getUrl();
To retrieve the feed content directly:
Feed feed = new FeedGenerator()
.setAllowExplicit(true)
.setCountry(Country.FRANCE)
.setMediaType(MediaType.APPLE_MUSIC)
.setFeedType(FeedType.HOT_ALBUMS)
.setResultsLimit(10)
.execute();
See also Feed Generator page on apple.com
Get the full genre hierarchy for the iTunes store, along with relevant links for each genre.
GenreIdsResponse response = new GenreIdsAppendix().getGenres();
See also Genre ID page on apple.com
To reduce external dependencies, iTunes API has a default HTTP implementation relying on java.net.URLConnection
. However, using your preferred way to make HTTP requests can be done by implementing the be.ceau.itunesapi.http.Connector
interface and passing an instance to the relevant API entry point:
be.ceau.itunesapi.Search.execute(Connector)
be.ceau.itunesapi.Lookup.execute(Connector)
be.ceau.itunesapi.FeedGenerator.execute(Connector)
be.ceau.itunesapi.GenreIdsAppendix.execute(Connector)
This library requires Java 7 or higher.
Include this project directly from Maven Central
<dependency>
<groupId>be.ceau</groupId>
<artifactId>itunes-api</artifactId>
<version>${project.version}</version>
</dependency>
iTunes API is an evolution of the iTunes Search library. The new name iTunes API reflects the fact multiple APIs are implemented by the library.
Verify signature files with my GnuPG public key.
View javadoc for current release at javadoc.io.
Licensed under the Apache 2.0 license.
iTunes is a trademark of Apple Inc., registered in the U.S. and other countries.
This library has not been authorized, sponsored, or otherwise approved by Apple Inc.