How do I use the search API for iTunes

From IPhone Dev FAQ

Jump to: navigation, search

The iTunes Search API is documented in this PDF Affiliates Search 2.1. Unfortunately the documentation is old and incomplete.

Here are some things I've found out so far.

Contents

iTunes Search

There are 2 types of search available - wsSearch and wsLookup. wsLookup is used for searching by ID (artistId, collectionId, etc) and wsSearch is used for keyword searches.

All results are returned in JSON making parsing quick and easy. (JSON-Framework is a great project for using JSON in your apps.)

wsSearch

To get the complete syntax for wsSearch pass it a url with an unrecognized parameter such as : http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/wsSearch?term=%@&country=US&media=music&entity=musicTrack&attribute=unrecognized (that looks a whole lot better when it's formatted so check it out at iTunesSyntax).

Example: Getting all apps by a developer


http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/wsSearch?term=john+fricker+software&attribute=softwareDeveloper&entity=software


The attribute identifies the term. And the entity identifies what you like to get back.

There are far more attributes and entities available than there are documented in the pdf.

Enough information is returned to duplicate the basic functionality of App Store. Links to the apps can be generated and using LinkShare you can drive sales and collect 5% of the revenue.

wsLookup

If you know the id of the item you want you can use wsLookup.

Example: Getting information about a developer

http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/wsLookup?id=296430281

Personal tools