|MySQL Conference and Expo April 14-17, 2008, Santa Clara, CA|
O'Reilly Book Excerpts: eBay Hacks
Editor's note: This week we're showcasing excerpts from the recently released eBay Hacks. These three hacks have a common thread--they all deal in some manner with hacking the view of eBay from your browser. In the first hack, tap into eBay's massive database right from your own address bar; in the second, learn how to use Cascading Style Sheets to change the look of your eBay page; and in the third, find out how to control the view of other eBayers' pages with your own browser. If you enjoyed these hacks, you'll find 97 more such tips and tricks in the book.
Hack #12. Tweaking Search URLs
Tap into eBay's massive database right from your own address bar.
eBay is essentially a massive database. Every time you view an auction page, you're just looking at a single database record. Every time you search, you're performing a query. But even if you're not familiar with DB lingo, you can play with eBay's URLs to tweak what you see.
Many pages on eBay use a standard CGI (Common Gateway Interface) format, which is nothing more than a program name followed by a command and one or more parameters:
In this case,
TIP: Some sellers reference other auctions by simply including the auction number in their descriptions, usually because they don't know how to make links (see Hack #40). To view the auction by its number, simply copy and paste the number into the URL, replacing the one that's there.
A typical search page URL looks something like this:
Here, I searched for "avocado green", which you can see in the parameter
The real value in tweaking the URL is the ability to add or change options
otherwise unavailable or inconveniently located in the search interface. One of
the most useful of these is the self-evident
Note the required ampersand (
Searching in Categories
Although there's no way to specify a category directly in the search field, there is a quick way to convert a standard search to a category-specific search without having to drill down through layers of category links. (See Hack #11 for the long way.)
eBay has thousands of categories (more than 15,000 at the time of this writing), each identified by a unique category number. Although there's no obvious rhyme or reason to the numbering scheme, you may eventually learn the numbers of your favorite categories. The category number is easily found in the URL of the category listing; for example:
Here, the category number is
You can specify multiple category numbers by separating them with plus signs, something you can't do by clicking links on search pages.
TIP: Categories are typically restricted to a single nationality. For example, a given category number at ebay.com won't be recognized at ebay.de, even though ebay.de may have an equivalent category that goes by a different number. See Hack #15 for details.
View a Seller's Other Items
If you click "View seller's other items" on any auction page, you'll see a listing of all current auctions by that seller. Although you'll find even fewer options here than on the average search page, there are two important URL options you can tweak.
A seller's auction listing URL looks something like this:
By default, only current auctions are shown here, but you can change the
It shouldn't take long to discover that typing either of these parameters into the URL is far quicker and more convenient than going to Search → By Seller, typing the seller's name, specifying the age and number of auctions to show, and clicking Search. But you probably saw that coming.