https://itunes.apple.com/search?parameterkeyvalue
key1=value1
. To create a string of parameter key and value pairs, you must concatenate each pair using an ampersand (&). For example:key1=value1&key2=value2&key3=value3
<script src='https://../search?parameterkeyvalue&callback='{name of JavaScript function in webpage}'/>
Parameter Key | Description | Required | Values | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
term | The URL-encoded text string you want to search for. For example: jack+johnson. | Y | Any URL-encoded text string. Note: URL encoding replaces spaces with the plus (+) character and all characters except the following are encoded: letters, numbers, periods (.), dashes (-), underscores (_), and asterisks (*). | ||||||||||||||||||||
country | The two-letter country code for the store you want to search. The search uses the default store front for the specified country. For example: US. The default is US. | Y | See http://en.wikipedia.org/wiki/ ISO_3166-1_alpha-2 for a list of ISO Country Codes. | ||||||||||||||||||||
media | The media type you want to search for. For example: movie. The default is all. | N | movie, podcast, music, musicVideo, audiobook, shortFilm, tvShow, software, ebook, all | ||||||||||||||||||||
entity | The type of results you want returned, relative to the specified media type. For example: movieArtist for a movie media type search. The default is the track entity associated with the specified media type. | N | The following entities are available for each media type:
| ||||||||||||||||||||
attribute | The attribute you want to search for in the stores, relative to the specified media type. For example, if you want to search for an artist by name specify entity=allArtist&attribute=allArtistTerm. In this example, if you search for term=maroon, iTunes returns “Maroon 5” in the search results, instead of all artists who have ever recorded a song with the word “maroon” in the title. The default is all attributes associated with the specified media type. | N | The following attributes are available for each media type:
| ||||||||||||||||||||
callback | The name of the Javascript callback function you want to use when returning search results to your website. For example: wsSearchCB. | Y, for cross-site searches | wsSearchCB | ||||||||||||||||||||
limit | The number of search results you want the iTunes Store to return. For example: 25.The default is 50. | N | 1 to 200 | ||||||||||||||||||||
lang | The language, English or Japanese, you want to use when returning search results. Specify the language using the five-letter codename. For example: en_us.The default is en_us (English). | N | en_us, ja_jp | ||||||||||||||||||||
version | The search result key version you want to receive back from your search.The default is 2. | N | 1, 2 | ||||||||||||||||||||
explicit | A flag indicating whether or not you want to include explicit content in your search results.The default is Yes. | N | Yes, No |
Result Key | Description | Returned | Return Values and Examples |
---|---|---|---|
wrapperType | The name of the object returned by the search request. | Y | track, collection, artistFor example: track. |
*explicitness | The Recording Industry Association of America (RIAA) parental advisory for the content returned by the search request.For more information, see http://itunes.apple.com/WebObjects/MZStore.woa/wa/parentalAdvisory. | Y | explicit (explicit lyrics, possibly explicit album cover), cleaned (explicit lyrics “bleeped out”), notExplicit (no explicit lyrics)For example: “trackExplicitness”:”notExplicit”. |
kind | The kind of content returned by the search request. | Y | book, album, coached-audio, feature-movie, interactive- booklet, music-video, pdf podcast, podcast-episode, software-package, song, tv- episode, artistFor example: song. |
trackName | The name of the track, song, video, TV episode, and so on returned by the search request. | Y | For example: “Banana Pancakes”. |
artistName | The name of the artist returned by the search request. | Y | For example: Jack Johnson. |
collectionName | The name of the album, TV season, audiobook, and so on returned by the search request. | Y | For example: “In Between Dreams”. |
*censoredName | The name of the album, TV season, audiobook, and so on returned by the search request, with objectionable words *’d out.Note: Artist names are never censored. | Y | For example: “S**t Happens”. |
artworkUrl100, artworkUrl60 | A URL for the artwork associated with the returned media type, sized to 100×100 pixels or 60×60 pixels. | Only returned when artwork is available | For example: “http:// a1.itunes.apple.com/jp/r10/Music/ y2005/m06/d03/h05/ s05.oazjtxkw.100×100-75.jpg”. |
*viewURL | A URL for the content associated with the returned media type. You can click the URL to view the content in the iTunes Store. | Y | For example: “http:// itunes.apple.com/WebObjects/ MZStore.woa/wa/viewAlbum? i=68615807&id=68615813&s=1434 62”. |
previewUrl | A URL referencing the 30-second preview file for the content associated with the returned media type. . | Only returned when media type is track | For example: “http:// a392.itunes.apple.com/jp/r10/ Music/y2005/m06/d03/h05/s05.zdzqlufu.p.m4p”. |
trackTimeMillis | The returned track’s time in milliseconds. | Only returned when media type is track |