Amazon API

Using the Amazon Product API with AS3 – #FreeCodeSunday

Sunday, July 11th, 2010 | #FreeCodeSunday, Actionscript 3, Affiliate Marketing | 1 Comment

This is really an update to an earlier post on how to use the Amazon Product API search and retrive products, all tied to your Amazon account. Using this information you can present information about each product, and drive traffic to the product page on Amazon. If the user then purchases the Product then you recieve a small amount of commission.

The problem with the old post was that Amazon changed their API requiring the request be signed and have a timestamp, so really the main new part is the included .php file, which you will of course need to edit to include your Amazon secret api key. To get one and see their documentation click here…

So if you can intergrate this information into a fun game or app and drive engagement through to the Product on Amazon in a way that is useful enough to your users that they then purchase the product, then you can make a few pennys. Well… maybe enough to buy lunch.


The source code goes into how to change the filter to search dvds instead of music, and there’s full API code to parse the XML for each Product into a Class instance to code against.

Credit for how to intergrate the Amazon signature methodology must go to www.ilovebonnie.net

Tags: ,

Using Amazon Products API and Flash

Monday, January 12th, 2009 | Actionscript 3, Affiliate Marketing | No Comments

Update:Due to the Amazon API changes requiring Signature and Timestamps which breaks this post, i have created a new post which updates this process here….

EDIT:There was a bug with the demo when showing a product with no customer review as i’m using that as the flavour text in this demo. Fixed in demo and source code.

Continuing the theme of Affiliate marketing, here’s a free source code demo of how to use Amazon products in flash. It uses similar process’s I’ve demoed before, signing up for the API, creating a php page to receive the keywords then search the Amazon API, and then return the data in XML format to the Flash front end.

To get started yourself, register for Amazon associates account – http://aws.amazon.com/associates/, then download the example code, change my code for yours so you receive the percentage, and play away.


Here I’ve just parsed the response xml for the products into instances of my AmazonProductData.as Class. This makes it easy to code against, and be confident in the ability to retrieve basic data about each product without spelling or case mistakes. As long as you’re using FlashDevelop, FDT or FlexBuilder that is.

I will make a full scale tutorial on how to use the API, parse the data and create a simple front end like this when i get a chance and finish creating LearnToFlash.com .

Tags: ,

Search