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

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

The search form on the lefthand side of the Amazon home page is the most widely used way to find items. A couple of keywords can get you surprisingly close to what you're looking for. But if you'd like to do more sophisticated searches, you'll have to use the Advanced Search form or learn Amazon's Power Search syntax.

Advanced Search

Amazon offers an Advanced Book Search form on their web site at http://amazon.com/exec/obidos/ats-query-page. This form allows you to search for a specific title, author, subject, ISBN, or publisher. And you can narrow your search by format, reader age, language, or publication date.

The query in will return all books by O'Reilly with the word "Mac" in the title.

Figure 1. Amazon Advanced Search page

Power Search

Beyond Advanced Search, there's a way to perform even more finely tuned searches of the product database: Power Search. A Power Search uses a special query syntax to define what you're looking for. The syntax consists of field/value pairs that are put together with connecting words like "or" or "and." To perform the same query, we'd include the publisher and title fields with the appropriate values:

publisher:O'Reilly and title:Mac

To run the search, paste this into the Power Search form at the bottom of the Advanced Search page at http://amazon.com/exec/obidos/ats-query-page#powersearch.

There are several fields available to help narrow your search:

pubdate - [before, during, after] date

With all of these options, you can see how queries could quickly become very specific. Let's say we wanted to find not only O'Reilly's books with the subject "Mac," but also all O'Reilly books where the title starts with "Mac":

publisher:O'Reilly and (subject:Mac or title-begins:Mac)

Grouping sections of the queries with parentheses and specifying "and" or "or" allows you to do much more than is possible through the standard Advanced Search form. Just having access to the keywords field is a big advantage. Let's say you're interested in more than just the books about Macs that O'Reilly publishes—you're interested in any book remotely related to Macs. That's a perfect use for keywords:

publisher:O'Reilly and keywords:Mac

Or, just to show how specific you can get, here's another query:

publisher:O'Reilly and keywords:Mac and pubdate:before 2003 and not [RETURN]
title-begins:Mac and not subject:Mac

If you're getting the hang of Power Searches, you'll see that this query searches for all O'Reilly books with the keyword "Mac" published before 2003, where the title doesn't actually start with "Mac" and the book isn't directly about the subject "Mac".

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.