O'Reilly Hacks
oreilly.comO'Reilly NetworkSafari BookshelfConferences Sign In/My Account | View Cart   
Book List Learning Lab PDFs O'Reilly Gear Newsletters Press Room Jobs  


 
Buy the book!
Amazon Hacks
By Paul Bausch
August 2003
More Info

How do these hacks stand up? Comment on a hack from the book by choosing the associated "Discuss" link below. You can also view the code from any of the hacks by clicking on the "Listing" or "Code" links. A number of hacks have been selected to be featured online in their entirety; you may view those hacks by clicking on the hack titles that are linked.

You can also download all the scripts and other files for this book here.

Jump to: Browsing and Searching  | Controlling Your Information  | Participating in the Amazon Community  | Selling Through Amazon  | Associates Program  | Amazon Web Services

Browsing and Searching

HACK
#1

Find a Product's ASIN
Many hacks and features depend on knowing a product's Amazon ASIN; here are a few ways to track it down
[Discuss (0) | Link to this hack]

HACK
#2

Find a CD's ASIN with the UPC
Instead of searching by Title or Artist, you can find an ASIN for a CD by using the UPC
The Code
[Discuss (4) | Link to this hack]

HACK
#3

Jump to a Product Using Its ASIN
Once you have a product's ASIN, you can jump straight to its product detail page
[Discuss (0) | Link to this hack]

HACK
#4

Create Shorter URLs
Shortening a long Amazon URL is just a matter of knowing where to put the ASIN
[Discuss (12) | Link to this hack]

HACK
#5

Link Directly to Product Images
Just as product detail URLs follow a certain pattern, image URLs are just as predictable
[Discuss (0) | Link to this hack]

HACK
#6

Switch to a Text-Only Amazon
Make the Amazon.com web site leaner and meaner by taking away the images
[Discuss (0) | Link to this hack]

HACK
#7

Take Amazon Anywhere
Amazon.com is just as on-the-move as you are, and you can access Amazon on your cell phone or PDA if you know where to look
[Discuss (1) | Link to this hack]

HACK
#8

Browse and Search Categories with Browse Nodes
Use browse node IDs to find books based on categories
[Discuss (0) | Link to this hack]

HACK
#9

Power-Search for Books
Fine-tune your book searches with the Advanced Search form and Power Search queries
[Discuss (2) | Link to this hack]

HACK
#10

Search Amazon from the IE Address Bar
A fast way to search Amazon via your Windows Internet Explorer address bar
[Discuss (0) | Link to this hack]

HACK
#11

Search Amazon from Any Web Page in IE
Searching Amazon from any web page can be as simple as highlighting and clicking with an Internet Explorer context menu
The Code
[Discuss (4) | Link to this hack]

HACK
#12

Add an Amazon Sidebar Search to Mozilla
Mozilla's built-in search engine sidebar provides a unique way to organize search results from several sources. Using Amazon's API you can add Amazon as a source with a few quick steps
The Code
[Discuss (0) | Link to this hack]

Controlling Your Information

HACK
#13

Understand Identity at Amazon
Amazon user accounts provide a consistent, personalized experience. Understanding how, when, and why you should log in and out of your Amazon account will help you control that experience
[Discuss (0) | Link to this hack]

HACK
#14

Fine-Tune Your Recommendations
As Amazon gets to know your tastes, it makes recommendations about products you might like. A few quick steps can ensure that your recommendations are on target
[Discuss (0) | Link to this hack]

HACK
#15

Enable 1-Click Buying
Zip through the checkout process and indulge the impulse buyer within by setting up push-button buying
[Discuss (0) | Link to this hack]

HACK
#16

Set Up a Group Account
Amazon's Corporate Account feature lets a business provide a single point of billing for its employees. You can use this same system to organize the purchases of everyone in your family
[Discuss (0) | Link to this hack]

HACK
#17

Create an "About You" Area
By letting other Amazon customers know a little bit about you, you'll add some context and personality to your lists or reviews
[Discuss (0) | Link to this hack]

HACK
#18

Create a Wish List
Amazon's catalog is your oyster! Save those items you want in once place and let everyone know what you really want
[Discuss (0) | Link to this hack]

HACK
#19

Add Items to a Wish List Remotely
A simple HTML form allows your visitors to add items you mention to their own wish lists
[Discuss (0) | Link to this hack]

HACK
#20

Add Multiple Items to a Wish List at Once
Speed up the process of adding items to your wish list with a bit of scripting
The Code
[Discuss (0) | Link to this hack]

HACK
#21

Organize Your Wish List by Priority
Amazon provides a few ways to sort your wish list, but missed an important one: sorting by which items you want most
[Discuss (0) | Link to this hack]

HACK
#22

Set Email and Messages Preferences
You can decide how often Amazon contacts you by setting your preferences
[Discuss (0) | Link to this hack]

HACK
#23

Get Movie Showtimes
You can use Amazon to plan your evening by finding out when, where, and what movies are playing in your local theaters
[Discuss (1) | Link to this hack]

HACK
#24

Create an Amazon Event Reminder
Don't miss another birthday or anniversary! Let Amazon remind you of important dates via email with their event reminder service
[Discuss (0) | Link to this hack]

HACK
#25

Create Several Birthday Reminders at Once
You probably have dozens of birthdays to track. You can speed up the process of adding Amazon event reminders with a script
The Code
[Discuss (0) | Link to this hack]

HACK
#26

Best Practices for Your Amazon Account
Eight steps you can take to personalize, control, and secure your Amazon account
[Discuss (0) | Link to this hack]

Participating in the Amazon Community

HACK
#27

Write a Review
Everyone has an opinion. You can give other Amazon customers your insights about a product by posting a review
[Discuss (0) | Link to this hack]

HACK
#28

Link Directly to Reviews of a Product
With a little URL hacking, you can link directly to any product's reviews from another web site
[Discuss (0) | Link to this hack]

HACK
#29

Post a Review from a Remote Site
To integrate adding Amazon reviews into a web publishing system or web site, examine the way Amazon posts information and create a remote copy
The Code
[Discuss (1) | Link to this hack]

HACK
#30

Add Pop-up Amazon Reviews to Your Web Site
With a few lines of JavaScript, you can add Amazon customer reviews to your web site
The Code
[Discuss (1) | Link to this hack]

HACK
#31

Send an Email Alert if a Review Is Added to a Product
This script keeps an eye on Amazon and notifies you when a new review is posted
The Code
[Discuss (0) | Link to this hack]

HACK
#32

Sort Books by Average Customer Rating
Use customer ratings as a guide to which books you should be looking at
[Discuss (0) | Link to this hack]

HACK
#33

Sort Your Recommendations by Average Customer Rating
Find the highest rated items among your Amazon product recommendations
The Code
[Discuss (1) | Link to this hack]

HACK
#34

Scrape Product Reviews
Amazon has made some reviews available through their Web Services API, but most are available only at the Amazon.com web site, requiring a little screen scraping to grab
The Code
[Discuss (0) | Link to this hack]

HACK
#35

Publish Your Amazon Reviews on Your Site
With a little screen scraping, you can gather all the reviews you've posted to Amazon and publish them on your own web site
The Code
[Discuss (0) | Link to this hack]

HACK
#36

Share the Love (and Savings!) with Your Friends
Amazon's Share the Love program lets you and your friends save money by buying the same products. Here's a way to keep track of who wants what
The Code
[Discuss (0) | Link to this hack]

HACK
#37

Create a Guide
Share your expert knowledge with the world by creating a tutorial that shows up on product detail pages
[Discuss (0) | Link to this hack]

HACK
#38

Post a Guide Remotely
Customize the guide-writing experience with a remote posting form
The Code
[Discuss (0) | Link to this hack]

HACK
#39

Add Product Advice Remotely
Allow your site's visitors to add product buying advice directly to Amazon
The Code
[Discuss (0) | Link to this hack]

HACK
#40

Scrape Customer Advice
Screen scraping can give you access to community features not yet implemented through the API—like customer buying advice
The Code
[Discuss (1) | Link to this hack]

HACK
#41

Create a Listmania! List
Show other Amazon customers your unique way of combining products with a list
[Discuss (0) | Link to this hack]

HACK
#42

Gather Your Friends on Amazon
Track your friends' Amazon activities by adding them to your Friends list
[Discuss (0) | Link to this hack]

HACK
#43

Gather Your Friends' Amazon IDs
Linking directly to someone's community activities requires finding their Amazon ID
The Code
[Discuss (0) | Link to this hack]

HACK
#44

Get Purchase Circle Products with Screen Scraping
Purchase Circles provide a unique look at sales patterns. You can access them programmatically only with screen scraping
The Code
[Discuss (0) | Link to this hack]

HACK
#45

Find Purchase Circles by Zip Code
Combining two different Web Services can create a new feature
The Code
[Discuss (1) | Link to this hack]

HACK
#46

Track the Ranks of Books Over Time
Knowing an item's sales rank gives an indication of how it's selling right now. Tracking that rank over time gives an indication of how its sales are changing
[Discuss (0) | Link to this hack]

HACK
#47

Group Conversations About Books
You can get insight into loosely connected conversations about books at All Consuming
[Discuss (0) | Link to this hack]

HACK
#48

Add a "Currently Reading" List to Your Web Site
With a single line of code, you can give visitors an instant glimpse into what you're reading
The Code
[Discuss (0) | Link to this hack]

Selling Through Amazon

HACK
#49

Sell a Book with Amazon Marketplace
Amazon will list your used items alongside the new version of the same item in their catalog. You can become your own book vendor in a few steps
[Discuss (0) | Link to this hack]

HACK
#50

Speed Up the Listing Process
If you have more than two or three items to list in Marketplace, you'll want to speed up the process of listing them for sale
[Discuss (0) | Link to this hack]

HACK
#51

List Several Items for Sale at Once
If you're ready to do serious business through Amazon, a Pro-Merchant subscription allows you to list hundreds or even thousands of items in one fell swoop
The Code
[Discuss (0) | Link to this hack]

HACK
#52

Sell What People Want
Looking for the "buyer waiting" status can help you figure out which books are in high demand
The Code
[Discuss (2) | Link to this hack]

HACK
#53

Scope Out the Marketplace Competition
A little market research into what used items are currently selling for will help you price your items before listing them
The Code
[Discuss (0) | Link to this hack]

HACK
#54

List Your Items for Sale on Your Web Site
If you have your own web site, you can mirror your Amazon listings there so you can reach your audience as well
The Code
[Discuss (0) | Link to this hack]

HACK
#55

Put an Item Up for Bid at Amazon Auctions
If the value of the item you'd like to sell is variable, or if the item could appeal to collectors, you may want to sell it through an auction
[Discuss (0) | Link to this hack]

HACK
#56

Get (and Keep!) a Good Seller Rating
A positive or negative seller rating can affect your Marketplace bottom line. Here are a few tips that can help keep your rating positive
[Discuss (0) | Link to this hack]

HACK
#57

Collect Donations from Your Web Site with the Honor System
You work hard contributing to the Web, and you provide a valuable service. Amazon lets you put out a tip jar
[Discuss (0) | Link to this hack]

HACK
#58

Show the Progress of Your Honor System Fund on Your Site
You can let Amazon calculate the progress of a fund drive by scraping the graph that appears on your PayPage
The Code
[Discuss (0) | Link to this hack]

Associates Program

HACK
#59

Build Associate Links
The key to earning money through the Associates Program is linking to Amazon the right way
[Discuss (1) | Link to this hack]

HACK
#60

Sell Items from Your Site
Listing individual items on your site is a start, but you can increase the chances of making a sale by letting customers add items directly to their Amazon shopping cart
[Discuss (0) | Link to this hack]

HACK
#61

Sell Items with Pop-up Windows
Amazon Quick-Click Buying pop-ups are as close as you can get to 1-Click buying on your site
The Code
[Discuss (0) | Link to this hack]

HACK
#62

Create Banner Ads for Your Site
Amazon banner ads and product recommendation ads are a quick way to link into the associates program
[Discuss (0) | Link to this hack]

HACK
#63

Rotate Through Several Keyword Banners on Your Site
Keyword banners provide some rotation as people visit your site, but to do cross-promotion with several keywords across categories, you'll have to script a rotation solution
The Code
[Discuss (4) | Link to this hack]

HACK
#64

Add an Amazon Search Box to Your Site
Send your visitors to Amazon by letting them search for things they're already interested in
The Code
[Discuss (0) | Link to this hack]

HACK
#65

Show Amazon Search Results on Your Site
You can have the best of both worlds: allow people to find what they're interested in at Amazon, while still keeping them on your site
The Code
[Discuss (0) | Link to this hack]

HACK
#66

Create an Online Store
Don't have time to build your own web site? AssociatesShop.com can build a site with Amazon associate links for you!
[Discuss (0) | Link to this hack]

HACK
#67

Donate to Charities Through Associate Links
You can donate to some good causes simply by buying products through Amazon associate links
[Discuss (2) | Link to this hack]

HACK
#68

Format a Review for Your Site
You supply the words, and this script handles generating a formatted book review for your site
[Discuss (0) | Link to this hack]

HACK
#69

Create Amazon Associate Links on Your Movable Type Weblog
Integrate Amazon and Movable Type, and you'll be posting about books to your weblog in no time
[Discuss (0) | Link to this hack]

HACK
#70

Simplify Amazon Associate Links in Your Blosxom Weblog
Create an easier way to link to Amazon products with the ASIN plug-in for the Blosxom weblog application
The Code
[Discuss (0) | Link to this hack]

HACK
#71

Add an Amazon Box to Your Site
Add a quick list of products to your site based on a category or keyword
The Code
[Discuss (1) | Link to this hack]

HACK
#72

Deep Linking to Amazon's Mobile Device Pages
If you're developing an application for a mobile device, you can easily integrate with Amazon and collect referral fees in the process
[Discuss (0) | Link to this hack]

HACK
#73

Measure Your Associate Sales
Find out when, where, and how your visitors are arriving at Amazon from your site
[Discuss (0) | Link to this hack]

HACK
#74

Publish Your Associate Sales Statistics on Your Site
Share some insider knowledge with your site's audience
The Code
[Discuss (1) | Link to this hack]

HACK
#75

Associates Program Best Practices
Five tips that could improve your referral fees
[Discuss (0) | Link to this hack]

Amazon Web Services

HACK
#76

View XML Responses in a Browser
Here's a quick way of testing XML/HTTP responses to make sure you're getting the data you need
[Discuss (0) | Link to this hack]

HACK
#77

Embed Product Details into a Web Page with PHP
A simple way to display product data with existing PHP functions
The Code
[Discuss (1) | Link to this hack]

HACK
#78

Program AWS with PHP
Parsing XML with the built-in PHP XML parser can be tricky. But once you see how it's done, you'll be parsing Amazon XML in no time
The Code
[Discuss (1) | Link to this hack]

HACK
#79

Program AWS with Python
Use existing Python functions to handle Amazon requests for you
The Code
[Discuss (0) | Link to this hack]

HACK
#80

Program AWS with Perl
A lightweight XML parser is all you need to work with Amazon's data in Perl scripts
The Code
[Discuss (1) | Link to this hack]

HACK
#81

Loop Around the 10-Result Limit
When 10 products just aren't enough, it's time to get loopy
The Code
[Discuss (0) | Link to this hack]

HACK
#82

Program XML/HTTP with VBScript
Accessing Amazon within Windows is a job for VBScript
The Code
[Discuss (0) | Link to this hack]

HACK
#83

Transform AWS Results to HTML with XSLT
Amazon's XSLT service performs transformations on their servers, which can save you coding time
The Code
[Discuss (0) | Link to this hack]

HACK
#84

Work Around Products Without Images
Those few items that don't have images can be pesky if your application depends on them. The key to weeding out the bad ones is byte size
The Code
[Discuss (0) | Link to this hack]

HACK
#85

Syndicate a List of Books with RSS
Someday all data will be available as RSS. Get a head start by syndicating Amazon search results
The Code
[Discuss (0) | Link to this hack]

HACK
#86

Import Data Directly into Excel
Manipulate data the old-fashioned way—with a spreadsheet
The Code
[Discuss (0) | Link to this hack]

HACK
#87

Program AWS with SOAP and VB.NET
VB.NET was made for Web Services. With some WSDL magic, much of the code is generated for you
The Code
[Discuss (0) | Link to this hack]

HACK
#88

Program AWS with SOAP::Lite and Perl
Use a standard Perl SOAP module to make requests and work with the responses
The Code
[Discuss (0) | Link to this hack]

HACK
#89

Program AWS with NuSOAP and PHP
PHP's standard SOAP module NuSOAP makes SOAP simple
The Code
[Discuss (0) | Link to this hack]

HACK
#90

Create a Wireless Wish List
Take your Wish List wherever you go with AWS, XSLT, and WAP!
The Code
[Discuss (0) | Link to this hack]

HACK
#91

Make Product Titles Shorter
There are tools for cutting and slicing strings in every programming environment. Here are some quick examples of cutting book titles down to size
The Code
[Discuss (0) | Link to this hack]

HACK
#92

Encode Text for URLs
Make sure the text in XML/HTTP queries is valid for URLs
The Code
[Discuss (1) | Link to this hack]

HACK
#93

Cache Amazon Images Locally
Caching product images locally can save your users several trips to the Amazon server and speed up your applications
The Code
[Discuss (1) | Link to this hack]

HACK
#94

Cache AWS Responses Locally
You can improve application performance by saving Amazon data locally and updating it on a regular schedule
[Discuss (0) | Link to this hack]

HACK
#95

Create an Amazon AIM Bot
Chat with some Perl code to get book prices via AOL Instant Messenger
The Code
[Discuss (14) | Link to this hack]

HACK
#96

Compare International Sales
Find out what products are hot on either side of the pond with Amazon locale-based queries
The Code
[Discuss (0) | Link to this hack]

HACK
#97

Program AWS with Mozilla
Mozilla provides all the tools you need to build applications that integrate with Amazon's Web Services
The Code
[Discuss (1) | Link to this hack]

HACK
#98

Search or Browse Amazon with Watson
You can use Watson's interface to find items at Amazon or integrate Amazon's data into other Mac applications
[Discuss (0) | Link to this hack]

HACK
#99

Add Cover Art to Your Digital Music Collection
Add cover art back into your music experience with MP3 Piranha
[Discuss (0) | Link to this hack]

HACK
#100

Using All Consuming's SOAP and REST Interfaces
You can retrieve a list of the most-mentioned books in the weblog community, as well as personal book lists and recommendations, through either of All Consuming's two Web Service APIs
[Discuss (0) | Link to this hack]


O'Reilly Home | Privacy Policy

© 2007 O'Reilly Media, Inc.
Website: | Customer Service: | Book issues:

All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.