Sell What People Want

Looking for the “buyer waiting” status can help you figure out which books are in high demand.

At the time of this writing, John Grisham’s novel A Painted House has 362 sellers offering it in Amazon’s Marketplace. There’s probably some demand for the book, but listing your copy for sale alongside 362 others is a bit of a crapshoot. We can safely say that the supply has been met for the demand.

Wouldn’t it be nice if Amazon could just tell you which of your books are in high demand? Well, they do—it just takes a bit of digging. The trick is to find “buyer waiting” statuses for your books.

If someone’s on a product detail page and there are no Marketplace listings for the item, they’ll have the option to “Order it used.” Clicking this link doesn’t really order the item from anyone, it just lets Amazon know that someone is interested in buying that product used. (They’re then notified via email when someone offers the book used.) Amazon, in turn, lets everyone else know that someone’s interested by including a “buyer waiting” message, like the one in Figure 4-7, right on the product detail page.

“Buyer waiting” message on the product detail page

Figure 4-7. “Buyer waiting” message on the product detail page

You could visit the product detail page for every item you own and see if any are in immediate demand, but if you own more than five or six books or CDs, that’s going to be a time-consuming process. Instead, you can kick-start the process by visiting the Sell Your Collection page. To get there, go to the Your Store page ( and click “Sell Your Collection” under the “More to Explore” heading on the lefthand side of the page.

The Sell Your Collection page lists all of the items you’ve purchased through Amazon and any items you’ve told Amazon that you own [Hack #14]. As you go through the list you’ll see yellow “Sell Yours Here” buttons that begin the process of listing the item for sale [Hack #49]. What you’re really looking for, though, are those items that show a “buyer waiting” message under those buttons. By paging through your collection and scanning the list, you can compile a list of the items that will probably sell quickly.


The Sell Your Collection page also features Amazon’s guess at what your entire purchase history is worth. It uses 70% of the item’s current price to calculate the estimate, which might be high depending on the condition and the competition.

If you haven’t purchased all of your potential sale items through Amazon, there’s another way to speed up the process of finding wanted books: Google. If you have the ASIN for your products (ISBN number for books), you can use to search Amazon for the “buyer waiting!” text on that item’s product detail page. The Google query to accomplish this looks something like this:

            insert ASIN "buyer waiting!"

This tells Google to search only for pages that contain the ASIN you provide and the phrase “buyer waiting!” If you get a result, you know the item is in demand. No result means the product detail page for that ASIN doesn’t have a “buyer waiting” status the last time Google visited the page.

Doing this search is only marginally faster than visiting each product detail page directly—which is what we’re trying to avoid. Google, like Amazon, has released a Web Services API, which means developers can script searches and format the results quickly. That’s exactly what the following code does.

The Code

To run this code you’ll need a Google developer’s key. A key is free and easy to obtain at This code accepts the location of a text file on the command line. It should contain a list of the ASINs you want to query Google for. Add the following code to a file called

# A script to check Google/Amazon for waiting buyers.
# Usage: perl <asin file>

#Your Google API developer's key
my $google_key='insert Google developer key';

#Location of the GoogleSearch WSDL file
my $google_wdsl = "";

#Your Amazon Developer's token
my $dev_token = 'insert Amazon developer token';

#Your Aassociates Tag
my $af_code = 'insert associates tag';

use strict;

#Set the necessary Perl modules
use SOAP::Lite;
use XML::Simple;
use LWP::Simple;

#Take the query from the command-line
my $asinfile = shift @ARGV or die "Usage:perl [RETURN]
<asin file>\n";

#Create a new SOAP::Lite instance,feeding it GoogleSearch.wsdl
my $google_search = SOAP::Lite->service($google_wdsl);

#Set a counter for the results
my $i = 0;

#Loop through the ASINs, performing a query for each
open(ASINFILE, "<".$asinfile);
while(<ASINFILE>) {
    my($asin) = $_;
    #Build Google Query
    my $query = $asin . " \"buyer waiting!\"";
    #Send Query Google Request
    my $results = $google_search ->doGoogleSearch($google_key,[RETURN]
    #Loop through any results
    foreach my $result (@{$results->{resultElements}}){
        #Get Title from Amazon
        my $url = "" . $af_code . 
                  "&dev-t=" . $dev_token .
                  "&type=lite&f=xml&" .
                  "AsinSearch=" . $asin;
        my $content = get($url);
        die "Could not retrieve info for $asin" unless $content;
        my $xmlsimple = XML::Simple->new(  );
        my $response = $xmlsimple->XMLin($content);
        my $title = $response->{Details}->{ProductName};
        #Print out the tile
        print "A buyer is waiting for " . $title .
        " [" . $asin . "]\n";
if ($i == 0) {print "No buyers waiting for these items.\n"};

Running the Hack

This code requires a text file filled with ASINs. Simply create a file called asins.txt and include one ASIN on each line.

Once you have the ASINs file, you can run this script from a command prompt, like so:

               perl <insert asin text file location>

Google will be contacted through its API for each ASIN. If “buyer waiting” is found on the appropriate Amazon page, the script will query Amazon’s API for the book title. Depending on how eclectic your collection is, a list of 20 ASINs should turn up some with buyers waiting. Each match will be printed out along with the ASIN like this:

A buyer is waiting for Amazon Hacks! [0596005423]
A buyer is waiting for Google Hacks! [0596004478]

Now that you know exactly what people are looking for, you can concentrate your efforts there.

Get Amazon Hacks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.