I decided I have been going through too many loops every time I need a simple Associate link for an Amazon product:

- I have to go look at another page where I have a link on a website, and get the amazon Associate ID

- Get the ASIN for the book

- Copy the entire link from the first step and put in the correct ASIN in its spot.

My solution:

A python script using pyAWS.

All I need to do is call on the command line

createAmazLink.py

What I get back:

A menu of possible products listed, and each of them numbered:

I just choose the best match, i.e. the book that I actually want, and python calls Window’s notepad and there is the complete URL to copy into the clipboard ( I chose to do it this way, in case I already have something in the clipboard - plus you can change the link text if you need to, before copying into clipboard )

To install,

1. get Python 2.4 at least.

2. download and install module pyAWS

3. download createAmazLink.zip here

4. open createAmazLink.py and change to:
- your Associate ID (If you don’t have)
- your API KEY (If you don’t have)
- Also an optional constant variable that decides how many results are just too many
The variable is called maxResults and is currently set to 30.

5. To run: Run your DOS command line (linux should work too but you’ll have to edit the py script to take out the call to notepad), and the command is:

/pathto/yourpython/python createAmazLink.py some search terms

Some additional Recommended steps below

  • Download slickrun (i posted about this previously)
  • Set up a “slickrun command” that calls createAmazLink and prompts you for the keywords to search Amazon for


A Possibly Major Caveat: It only works for Amazon books, not the other stuff like music, DVDs, etc… I’m working on this, and you can go to the contact page (link on top menu) to be notified.


If you know of anyone looking for a Python developer (or even php), please click the Contact link above.