The RESTful Way: XML/HTTP

Amazon refers to its REST implementation as the XML/HTTP method. XML data using this method is simply a matter of hacking variables in a URL. The base URL always starts like this:

http://xml.amazon.com/onca/xml3?t=your associates ID

The URL points at a server specifically for serving up XML (xml.amazon.com), lets Amazon know which Web Services version you’re requesting (xml3), and passes along your Amazon Associates ID Section 5.2 as a variable (t= yourassociatesID). There are also several other variables that can be (or must be) appended to this request as described in the following sections.

Required Variables

Each request requires these four variables:

t

As mentioned above, this is always set to your associates ID. It lets Amazon track purchases made through your applications and enables you to earn affiliate fees.

dev-t

This is set to your developer’s token.

type

The only possible values for type are lite and heavy. It describes which XML format to return.

f

This is the format the data should be returned in, usually xml. It can also be set to the URL of an XSL stylesheet to return formatted HTML.

Search Variables

Beyond the four required variables, you can also choose variables from the list below to get the exact data you’re looking for.

Product Searches

KeywordSearch

Searches for products by subject.

BrowseNodeSearch

Browses product area by code.

AsinSearch (+ offer, + offerpage)

Returns a specific product detail.

UpcSearch

Searches for UPC numbers. ...

Get Amazon Hacks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.