Amazon's Commerce API (Not For Me)

Mar 25, 2007

I wanted to build a simpler storefront for certain Amazon stores using their REST api, but it turned out to be way too limiting.

With the 1 call per second per IP limitation, an api designed only for limited and predictable uses, frustrating documentation and really odd results made it too much of a mess for what I wanted to do. As long as your needs are modest and you can live with the limitations it's OK, but they really don't want you to go too far.

One of the biggest problems from my perspective is that while all information is available, you can only access it via the API. This is a serious limitation if what you want is a list of products. Even a count of products in a particular catalog node is difficult to get. Their product lists are stored in separate search indexes, which you have to manually include in the parameters. Often it's not obvious which index goes with which node (and sometimes it may be multiple ones). For example the base node in Books combined with the Books index returns nothing. Just for fun I called each root catalog node (which is the main storefront page for that category, like DVDs or Books) with each search index and got all sorts of random results, many of which made no sense. Sometimes it was impossible to tell which index went with which category with all the clearly wrong numbers (like groceries in tools). I never did figure out where the books were hidden.

I used the REST api, which was at least sane to call. The Java based SDK is based on Apache Axis and called the SOAP api. After about 5 minutes of looking at its complexity I tossed it out completely.

Yesterday in talking with the iTunes folks I discovered that Linkshare has about 180 merchants which provide product data on a daily/weekly basis, all available via FTP in two formats (XML and delimited). This is way easier to work with (Amazon of course is not one of them) so I think my original idea will now be based on these (particularly iTunes but others are interesting as well).

Amazon's commerce api makes sense if you have a few things you want to sell, and you can grab the data on the fly (they don't allow you much caching ability at all). If you want to build a site around a whole list of products (combined with other information) or even build a price comparison site (depending on the licenses) it makes far more sense to work with a list and build an api around your own database.