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;
     ProductsList.DataBind();
 }

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

Views: 4313

Related

ECommerce APIsAmazon.com, ebay, paypal API usage samples, tutprials and more.Connect to Amazon.com web service using WCFHow to connect to web services using WCF client. connect to amazon.com web service ucing WCF clientOnline DNN API HelpOnline DNN Core API HelpTwitter Daily Trends Using Tweetersharp APIHow to get twitter daily trends programmatically using REST APIHow to consume Amazon.com web service asynchronously using WCFIn my previous post I described with code sample how to consume Amazon.com web service using WCF cli...

Powered by BlogEngine.NET 1.5.1.7
Theme by Naveen Kohli