C# API For Amazon.com Webservice

Download AmazonAPI.zip (92.92 kb)


As part of a Pwershell project that I am working on, one requirement was to build an API around Amazon.com web services to search products in different categories. So I created a separate data access project that connects with Amazon.com web service and gets results based on the search query parameters specified by the user. This is very preliminary version of the API. It only implements search in the following categories.

  • Book
  • DVDs
  • Digital Music

In next few days I will complete this API and publish full API. But for you to get started, I have published the current version of API here. It is very simple to use. Here are steps that you will need to follow:

  • Preliminary requirement to search Amazon.com web service is to have AssociateTag and AccessKey supplied by Amazon.com. You can apply for these keys at . Without these two parameters you will not be able to send request to Amazon.com web service.
  • Download the source for this API and compile it.
  • Add reference to this API in your project.

Sample Code

Here is sample code from this web site that I use to perform book searches.

using ByteBlocks.AmazonAPI;

 private void DoBookSearch()
     BookSearch client = new BookSearch();
     BookSearchParameters searchParams = new BookSearchParameters();
     client.AccessKeyId = "xxxxxxxxxxxxxx";
     client.AssociateTag = "xxxxxxxxxxxxx";
     searchParams.Keywords = "cisco";
     searchParams.MaxResults = 20;

     List items = client.Search(searchParams);
     ProductsList.DataSource = items;

Try It

Following page demonstrates how this API is used to get list of products for 3 categories implemented in this API so ar.

Amazon.com Products Using C# API




Monthly Posts