Product Advertising API
Getting Started Guide (API Version 2011-08-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Submitting Your First Request

To submit your first request to Product Advertising API

  1. Open the Product Advertising API Signed Requests Helper.

  2. Enter your AWS Access Key ID and your AWS Secret Access Key.

    Product Advertising API Signed Requests Helper's AWS access identifiers
  3. In the Unsigned URL text box, enter the following, replacing YourAssociateTagHere with your own Associate tag:

    http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
    &Version=2011-08-01
    &Operation=ItemSearch
    &SearchIndex=Books
    &Keywords=harry+potter
    &AssociateTag=YourAssociateTagHere
    
  4. Click the Display Signed URL button.

  5. Copy the text in the Signed URL text box.

    Product Advertising API Signed Requests Helper's AWS access identifiers
    [Note]Note

    For your request to succeed, the Timestamp parameter can be no older than 15 minutes.

  6. In a new browser window or tab, paste the signed url into the address line, and press the Enter button on your keyboard.

    Product Advertising API Signed Requests Helper's AWS access identifiers

Congratulations! You just made your first Product Advertising API request.

From this example, you can see that a REST request is a URL. Everything before the question mark (?) specifies the destination of the request. This destination is the same for every Product Advertising API request (sent to the same locale). Everything after the question mark is a parameter in the request. This request searches (Operation=ItemSearch) for all books (SearchIndex=Books) that have "Harry Potter" in the title (Title=Harry%20Potter).

[Tip]Tip

Product Advertising API has a number of locales, including the US, JP (Japan), FR (France), DE (Germany), United Kingdom (UK), and Canada (CA). Each locale has a slightly different endpoint. For example, the JP endpoint is http://ecs.amazonaws.jp. You can send requests to any locale. But typically you send requests to the locale in which your customers' reside. For a list of all locales and endpoints, go to the Product Advertising API Developer Guide.

Product Advertising API responds to the request by returning an XML document. The following is a snippet of the response to the foregoing example.

  <TotalResults>2427</TotalResults>
  <TotalPages>243</TotalPages>
  <Item>
    <ASIN>0545139708</ASIN>
    <DetailPageURL>http://www.amazon.com/Harry-Potter-Deathly-Hallows-Rowling/dp/0545139708%3FSubscriptionId
      %3D1GPD3QT81GH6YJ5AV5G2%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative
      %3D165953%26creativeASIN%3D0545139708</DetailPageURL>
    <ItemLinks>
      <ItemLink>
        <Description>Technical Details</Description>
        <URL>http://www.amazon.com/Harry-Potter-Deathly-Hallows-Rowling/dp/tech-data/0545139708%3FSubscriptionId
          %3D1GPD3QT81GH6YJ5AV5G2%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative
          %3D386001%26creativeASIN%3D0545139708</URL>
      </ItemLink>
      <ItemLink>
        <Description>Add To Baby Registry</Description>
        <URL>http://www.amazon.com/gp/registry/baby/add-item.html%3Fasin.0%3D0545139708%26SubscriptionId
          %3D1GPD3QT81GH6YJ5AV5G2%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative
          %3D386001%26creativeASIN%3D0545139708</URL>
      </ItemLink>
      <ItemLink>
        <Description>Add To Wedding Registry</Description>
        <URL>http://www.amazon.com/gp/registry/wedding/add-item.html%3Fasin.0%3D0545139708%26SubscriptionId
          %3D1GPD3QT81GH6YJ5AV5G2%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative
          %3D386001%26creativeASIN%3D0545139708</URL>
      </ItemLink>
      <ItemLink>
        <Description>Add To Wishlist</Description>
        <URL>http://www.amazon.com/gp/registry/wishlist/add-item.html%3Fasin.0%3D0545139708%26SubscriptionId
          %3D1GPD3QT81GH6YJ5AV5G2%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative
          %3D386001%26creativeASIN%3D0545139708</URL>
      </ItemLink>
      <ItemLink>
        <Description>Tell A Friend</Description>
        <URL>http://www.amazon.com/gp/pdp/taf/0545139708%3FSubscriptionId%3D1GPD3QT81GH6YJ5AV5G2
          %26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN
          %3D0545139708</URL>
      </ItemLink>
      <ItemLink>
        <Description>All Customer Reviews</Description>
        <URL>http://www.amazon.com/review/product/0545139708%3FSubscriptionId
          %3D1GPD3QT81GH6YJ5AV5G2%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025
          %26creative%3D386001%26creativeASIN%3D0545139708</URL>
      </ItemLink>
      <ItemLink>
        <Description>All Offers</Description>
        <URL>http://www.amazon.com/gp/offer-listing/0545139708%3FSubscriptionId
          %3D1GPD3QT81GH6YJ5AV5G2%26tag%3Dws%26linkCode%3Dxm2%26camp
          %3D2025%26creative%3D386001%26creativeASIN%3D0545139708</URL>
      </ItemLink>
    </ItemLinks>
    <ItemAttributes>
      <Author>J.K. Rowling</Author>
      <Manufacturer>Arthur A. Levine Books</Manufacturer>
      <ProductGroup>Book</ProductGroup>
      <Title>Harry Potter And The Deathly Hallows</Title>
    </ItemAttributes>

This snippet shows that 2427 items match the search criteria. The first item returned is, "Harry Potter and the Deathly Hallows." Many details about the book are returned, including the name of the author, illustrator, book manufacturer, and product identifier (ASIN). If you copy the DetailPageURL into a browser, a web page about this book is displayed.

[Tip]Tip

An ASIN (Amazon Standard Item Number) is an alphanumeric token that uniquely identifies items for sale on Amazon.

Submitting URLs in a browser provides a good demonstration of how Product Advertising API requests and responses work. This practice, however, is not appropriate for customer applications. The remainder of this section describes how to issue Product Advertising API requests programmatically. The next section describes how to process the responses programmatically.