Title: Amazon API
Last modified: August 18, 2016

---

# Amazon API

 *  [rayne](https://wordpress.org/support/users/rayne/)
 * (@rayne)
 * [23 years, 4 months ago](https://wordpress.org/support/topic/amazon-api/)
 * I’d love a section where I can set my amazon associate id, then add ISBN #s and
   have the Title/Author automatically be displayed and a link generated for the
   book. This would be great in building a list of books read or to be read.

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Anonymous
 * [23 years, 4 months ago](https://wordpress.org/support/topic/amazon-api/#post-21845)
 * Why don’t you use allconsuming.net?
    Ricardo
 *  Thread Starter [rayne](https://wordpress.org/support/users/rayne/)
 * (@rayne)
 * [23 years, 4 months ago](https://wordpress.org/support/topic/amazon-api/#post-21857)
 * I’m looking at that site, but it’s not quite what I’m looking for. I’m refering
   to something similar to the MT plugin for Amazon. Something that i could incorporate
   into the site.
 *  Moderator [Matt Mullenweg](https://wordpress.org/support/users/matt/)
 * (@matt)
 * [23 years, 4 months ago](https://wordpress.org/support/topic/amazon-api/#post-21861)
 * Yes that would be a very interesting hack.
 *  [Michael Heilemann](https://wordpress.org/support/users/michael/)
 * (@michael)
 * [23 years, 4 months ago](https://wordpress.org/support/topic/amazon-api/#post-21872)
 * What is this again? How does it work?
 *  Moderator [Matt Mullenweg](https://wordpress.org/support/users/matt/)
 * (@matt)
 * [23 years, 4 months ago](https://wordpress.org/support/topic/amazon-api/#post-21874)
 * Links to check out:
    [http://mtamazon.sourceforge.net/](http://mtamazon.sourceforge.net/)
   [http://mt-plugins.org/archives/entry/mtamazon.php](http://mt-plugins.org/archives/entry/mtamazon.php)
   [http://www.amazon.com/gp/aws/landing.html](http://www.amazon.com/gp/aws/landing.html)
   [http://scripts.incutio.com/amazon/](http://scripts.incutio.com/amazon/) [http://erikbenson.com/index.cgi?node=Amazon+API](http://erikbenson.com/index.cgi?node=Amazon+API)
 *  [Dougal Campbell](https://wordpress.org/support/users/dougal/)
 * (@dougal)
 * [23 years, 4 months ago](https://wordpress.org/support/topic/amazon-api/#post-21884)
 * If nobody beats me to it, maybe I can look into making an Amazon API plugin for
   WordPress after I finish adding MetaWeblog and MovableType API support to the
   xmlrpc interface.
    The [Technorati](http://www.technorati.com/) [API](http://www.sifry.com/alerts/archives/000288.html)
   will be fun to play with, too.
 *  Moderator [Matt Mullenweg](https://wordpress.org/support/users/matt/)
 * (@matt)
 * [23 years, 4 months ago](https://wordpress.org/support/topic/amazon-api/#post-21885)
 * We need something for the hacks and utilities section anyway, it’s pretty anemic
   now.
 *  [Kitta](https://wordpress.org/support/users/kitta/)
 * (@kitta)
 * [22 years, 8 months ago](https://wordpress.org/support/topic/amazon-api/#post-22176)
 * I’d like to see the same thing. It’s a pain having to add all the details by 
   hand to my book list section.
 *  [denyerec](https://wordpress.org/support/users/denyerec/)
 * (@denyerec)
 * [22 years, 7 months ago](https://wordpress.org/support/topic/amazon-api/#post-22183)
 * I am *nearly* finished with a WP media collating widget. Should be done within
   24 hrs.
    It’ll sit in the admin section of WP and on the toolbar once I’ve shoe-
   horned it in. Enter ISBN/ASIN and *pop*, data and image link retrieved from Amazon
   by parsing their HTML output. This is then stored in a DB table. (Creation/Installation
   of relevant files is what I’m working on at the moment.) No associate ID’s required
   if you don’t have one, if you do, feel free hack that support in yourself. I 
   didn’t know about the associate ID thing before I started coding, so d’oh. As
   for output, I don’t know what is par for the course so I’ll use a couple of “
   template style” calls to dump info to the user like most of the existing WP functions.
   So far it’ll print the most recent X books in your list, based on the parameter
   passed to the output function, though I may extend it to allow for users to choose
   what they display with a little more finesse. Oh, it also handles all EBooks,
   Music and DVD’s, so you can display “What I’m Reading”, “What I’m Listening to”
   and “What I just Watched” if you want. It does not make tea. Demo will be available
   on my site ASAP, please get back to me with ideas/suggestions. Regards, Denyerec
   [Denyerec.co.uk](http://www.denyerec.co.uk)
 *  [davidchait](https://wordpress.org/support/users/davidchait/)
 * (@davidchait)
 * [22 years, 7 months ago](https://wordpress.org/support/topic/amazon-api/#post-22184)
 * I have had amazon stuff up on my site for the past two months — [http://www.chait.net.](http://www.chait.net.)
   Both in sidebars and inlined lookups in certain articles (as float items).
    It
   is based off of the AmazonSearch.php library, and another sample. I’ve extended
   it at this point to take single or array ASINs for products, extended the lookup-
   cache system, allowed image-size as a parameter, parameter for the div to outer-
   wrap an item, divs and spans around the content to allow for css styling, parameter
   for whether to show a ‘buy at amazon’ button, etc., etc. I’d have to see what
   dependencies I’ve embedded and remove them, and the associates-tag and developer-
   tokens would (optionally) want to change for others — I mean, if you want to 
   use my associates tag, that’s cool! 😉 An example of how simple it is to use 
   this system is something like: ` $ASIN_codes = array('B00008VFCU', // rca lyra'
   B0000TNZEE', // archos a/v 'B0001A99MO', // Apple iPod mini 'B0000DFZ6F', // 
   Creative Rhomba ); echo get_amazon_product($ASIN_codes, 'cache_file', $imageSize);
   I could probably make the associates-ID (and dev token) a global that you set
   prior to including the amazon.php module, and if it isn’t set I just fall back
   to mine. That’d be easy, and then people wouldn’t need to modify the files at
   all. Is there enough interest here for me to put effort towards pulling this 
   together, cleaning it up, etc? Do people have lists of features they are looking
   for? I’d also probably want to break out sample CSS for styling things… Check
   out chait.net for the base examples, but I use the same functions, with some 
   added CSS tricks, for the Reviews that have a right-float Amazon product pop..-
   d
 *  [tcervo](https://wordpress.org/support/users/tcervo/)
 * (@tcervo)
 * [22 years, 7 months ago](https://wordpress.org/support/topic/amazon-api/#post-22185)
 * David,
    That looks pretty nice, but I have a few ?’s: 1) Is there an easy option
   for including alt text for the images? I noticed all your amazon images have 
   alt=” 2) Not sure why you’re coding your images as <img src=…></img> instead 
   of <img src=… /> Just wondering…probably an easy fix. 3) I think I know the answer
   to this, but just want to confirm: can you pass the ASIN(s) as a parameter, or
   is it hard coded into the function? This looks like something I would be interested
   for my upcoming Movies section. I’ve experimented with simply plugging the ASIN
   into the dynamic link code from Amazon’s “build a link” section. It works ok,
   but there’s no caching or anything. It fetches the info on every page view. Basically
   I just created a snippet of sorts and change the ASIN as needed for each product:
   <iframe marginwidth=”0″ marginheight=”0″ width=”120″ height=”240″ scrolling=”
   no” frameborder=”0″ src=”[http://rcm.amazon.com/e/cm?o=1&l=as1&f=ifr&t=tcervocom-20&p=8&asins=B00005JKQZ&IS2=1&lt1=_blank”></iframe&gt](http://rcm.amazon.com/e/cm?o=1&l=as1&f=ifr&t=tcervocom-20&p=8&asins=B00005JKQZ&IS2=1&lt1=_blank”></iframe&gt);
   Not as slick as yours, but it works 😉 -Tony I insert
 *  [tcervo](https://wordpress.org/support/users/tcervo/)
 * (@tcervo)
 * [22 years, 7 months ago](https://wordpress.org/support/topic/amazon-api/#post-22186)
 * David,
    Ok, thanks. I think adding the product name/title as alt text would be
   helpful…for accessibility reasons. The title attribute is great for visual browsers,
   but alt is good for others. I’d love to get a copy of this… -Tony
 *  [davidchait](https://wordpress.org/support/users/davidchait/)
 * (@davidchait)
 * [22 years, 7 months ago](https://wordpress.org/support/topic/amazon-api/#post-22187)
 * Just to close this out, since there’s another thread in the Hacks section, I 
   figured I’d post updates on my Amazon stuff there rather than here… 😉
    -d [http://www.chait.net](http://www.chait.net)

Viewing 13 replies - 1 through 13 (of 13 total)

 The topic ‘Amazon API’ is closed to new replies.

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 13 replies
 * 9 participants
 * Last reply from: [davidchait](https://wordpress.org/support/users/davidchait/)
 * Last activity: [22 years, 7 months ago](https://wordpress.org/support/topic/amazon-api/#post-22187)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
