Skip to content

Product Advertising API

timkay edited this page Jan 6, 2013 · 1 revision

To access the Product Advertising API, provide your AWS keys in ~/.awssecret (or via one of the other mechanisms) as well as your Associate Tag, which you get from the Amazon Affiliates program. (The API seems to work with an arbitrary Associate Tag, in case you don't have one yet.)

The Product Advertising API is not compatible with IAM, so you must use your master keys. You might consider creating a separate account, so you get a separate set of master keys.

Currently, "aws" implements only ItemLookup:

$ aws lookup B00540PAUQ -a wiggy -r SalesRank
<?xml version="1.0" ?>
<ItemLookupResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2011-08-01">
    <OperationRequest>
            <HTTPHeaders>
                    <Header Name="UserAgent" Value="curl/7.24.0 (x86_64-unknown-linux-gnu) libcurl/7.24.0 OpenSSL/1.0.0 zlib/1.2.3 c-ares/1.7.0 libidn/1.18 libssh2/1.2.2"></Header>
            </HTTPHeaders>
            <RequestId>911a6caf-13e5-4619-83fb-de2a692b1ae3</RequestId>
            <Arguments>
                    <Argument Name="Operation" Value="ItemLookup"></Argument>
                    <Argument Name="Service" Value="AWSECommerceService"></Argument>
                    <Argument Name="Signature" Value="edfWP8+91ZGox6xqbCfugDlq+1hw4/2da2UNAdxJRDA="></Argument>
                    <Argument Name="AssociateTag" Value="wiggy"></Argument>
                    <Argument Name="Version" Value="2009-01-06"></Argument>
                    <Argument Name="ItemId" Value="B00540PAUQ"></Argument>
                    <Argument Name="SignatureMethod" Value="HmacSHA256"></Argument>
                    <Argument Name="AWSAccessKeyId" Value="AKIAI3IO5YCXDXECIEKQ"></Argument>
                    <Argument Name="Timestamp" Value="2013-01-06T21:04:49Z"></Argument>
                    <Argument Name="ResponseGroup" Value="SalesRank"></Argument>
                    <Argument Name="SignatureVersion" Value="2"></Argument>
            </Arguments>
            <RequestProcessingTime>0.0102330000000000</RequestProcessingTime>
    </OperationRequest>
    <Items>
            <Request>
                    <IsValid>True</IsValid>
                    <ItemLookupRequest>
                            <IdType>ASIN</IdType>
                            <ItemId>B00540PAUQ</ItemId>
                            <ResponseGroup>SalesRank</ResponseGroup>
                            <VariationPage>All</VariationPage>
                    </ItemLookupRequest>
            </Request>
            <Item>
                    <ASIN>B00540PAUQ</ASIN>
                    <SalesRank>311479</SalesRank>
            </Item>
    </Items>
</ItemLookupResponse>