Hacking eBay

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.

Auction Pages

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:

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=3128013703

Here, cgi.ebay.com is the name of the server, eBayISAPI.dll is the filename of the program, ViewItem is the command to execute, and item=3128013703 is a parameter. Any additional parameters are separated by ampersands (&).

In this case, 3128013703 is the auction number. Simply replace this with another valid auction
number, press Enter, and you'll see the corresponding auction page. This is
typically quicker and more convenient than using the Search page to open an
auction by its number.

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.

Search Pages

A typical search page URL looks something like this:

http://search.ebay.com/ws/search/SaleSearch?satitle=avocado+green

Here, I searched for "avocado green", which you can see in the parameter satitle=avocado+green. Most searches will probably have more parameters, some more self-descriptive than others.

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 sorecordsperpage option. Although you can choose this option
by going to Search → Advanced Search → Results Per Page, this can be cumbersome,
and you can't add it to an existing search you've already built. Instead, simply
type the following at the end of an existing search URL:

&sorecordsperpage=100

Note the required ampersand (&) to separate this parameter from the one that precedes
it. (In the old days, you could have up to 200 items on a page, but eBay has
since reduced the limit to 100; anything higher will simply be ignored.) Here
are some of the other parameters that are worth typing:

Parameter

Description

&sorecordsperpage=number

Number of search results to show per page, max=100

&sapricelo=price

Show only auctions above or equal to a certain price

&sapricehi=price

Show only auctions below or equal to a certain price

&sacategory=num+num+num

Restrict results to specified categories; see the next
section

&sacategoryex=num+num+num

Exclude results from specified categories

&sasaleclass=class

Show (1) auctions only or (2) Buy-It-Now listings only

&sapaypal=1

Show only listings that accept PayPal

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:

http://listings.ebay.com/aw/listings/list/category19116/index.html

Here, the category number is 19116. (You can also get
the number of any category by viewing the complete list at
listings.ebay.com/aw/plistings/list/categories.html.) To convert a standard
search to a category-specific search, simply type the following at the end of
the search URL:

&sacategory=19116

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.

Selling with eBay's New Auction Page -- In July 2003, eBay completely redesigned its standard auction page, the page that shows the details of any particular sale item. For sellers, these changes may have repercussions that ultimately affect their bottom line. In this article, David Karp, author of eBay Hacks, discusses several approaches eBayers can implement right away to help them communicate more effectively to customers about their auctions, and bring in the cash.

By default, only current auctions are shown here, but you can change the since parameter from -1 to any number up to 30 to view past auctions up to 30 days old. You can
also change the rows parameter to specify how many auctions to show on a page; the maximum is 200.

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.

See Also

See Hack #30 for a way to change the nationality of most eBay pages.

See Hack #16 to keep from having to reconstruct the same searches again and again.

See Hack #13 for another way to use search URLs.

Hack #43. Overriding eBay's Fonts and Styles

Use Cascading Style Sheets to change the look of more
than just the description.

The <font> tag, introduced in Hack #40, allows you to set the font for any block of text.
But it won't have any effect on text outside the <font></font> structure, which means you can
never control the appearance of any text outside the description area (e.g., the rest of the auction page). Instead, you'll have to use Cascading Style Sheets (CSS) if you want to apply your styles to the entire page.

The following code, for instance, will turn all text on the page green:

Here's how it works. First, the <style></style> structure &callout1; sets
apart our CSS definitions, which will take effect regardless of where the code
is placed on the page. Next, a single CSS definition &callout2; lists the
HTML tags to modify with our new styles. In this case, we are applying our
styles to all <body> text, as well as to any text inside <font></font> tags, <td></td> tags (used for tables), and <a></a> tags (used for links). If you don't want to modify link colors, for instance, just remove ,a from line &callout2;.

The actual styles applied are listed between the curly braces { }, separated one per line for clarity. This includes the font size, the typeface, and, of course, our glorious green color
&callout3;. The !important keywords ensure that our
styles override any other styles defined elsewhere in the page, which is why
even the section headers and the light gray text in the "Time left" section are
overpowered by our choice.

If you feel that making all text the same color is a little drastic, you can
customize it further:

This sets all ordinary text blue, except for links, which will appear orange
(this will look pretty awful, by the way). Note the absence of font-size style, which will ensure that the original size of all text is preserved.

TIP: For a complete list of all the CSS styles you can use, you'll need dedicated CSS documentation such as Cascading Style Sheets: The Definitive Guide (O'Reilly), or the official W3C CSS specification (www.w3.org/Style/CSS/).

You can also use this technique to alter other aspects of the page. Don't
like the blue shading section headers? Well, you can do something like this:

<style>
td { background-color: white !important; }
</style>

You may find this particular solution somewhat extreme, since it removes the
shading used in every table on the page. But it will give you a taste of the
power of CSS.

See Hack #41 for further auction-page hacking.

Override Other Sellers' Hacks

You'll eventually encounter an auction that has been hacked up pretty well,
possibly by a seller with even worse taste than you. Fortunately, you may still
have some control over the pages you view with your own browser.

TIP: Have you ever opened a page with a text/background combination that rendered the page nearly impossible to read? Here's a quick fix: just press Ctrl-A to highlight all text on the page. This will make all text appear white on a dark blue background, which will likely be a significant improvement.

You can set your browser preferences to favor your own color choices over
those made by web site designers, but this can be a pain to turn on and off as
needed. Instead, you may wish to set up a user stylesheet, a set of carefully
constructed preferences and rules that will trump any crazy code like the stuff
at the beginning of this hack. User stylesheets are supported by Netscape 6.x/Mozilla 1.x and later,
and Internet Explorer 5.x and later.

See Also

Probably the best source for information about user stylesheets is Eric Meyer's CSS Anarchist's Cookbook. There, you'll find ways to "wreck" tables, disable banner ads, and render font coding
pretty much useless, all worthwhile pursuits for the anarchist in each of us.

Hack #52. Let's Make a Deal

How to handle impatient bidders without losing customers and without getting kicked off eBay.

From time to time, bidders will contact you with special
requests, such as those suggested in Hack #26 and Hack #27. How you respond to
such requests and how you decide to conduct business is entirely up to you, but
you'll want to be careful about some of the steps you take. As a seller on eBay,
you'll have to walk a fine line between protecting yourself from dishonest
bidders, not upsetting your honest bidders, not violating eBay policy, and not
wasting large amounts of your time.

TIP: See who you're dealing with by taking a moment to look at their feedback and investigate their history, a process explained in Hack #53. That way, you'll know whether you should trust the bidder or add the bidder to your Blocked Bidder list (see Hack #54).

For instance, an impatient bidder might want to use Buy-It-Now on one of your
auctions, even though the item has received bids and the option has disappeared
from the page. The following are a few different approaches to dealing with this
type of request, each with its own advantages and disadvantages:

Assuming you know the value of your item (see Hack #33), you should be able
to look at the current bids - as well as the relative success of your
competition - and predict how much you're ultimately going to get for your
item. Your auction may indeed be on track to fetch a higher amount than your
original Buy-It-Now price, in which case you'll want to politely tell the
bidder that you prefer to let the auction run its course. Naturally, you'll
run the risk of not getting as much as the bidder is offering, or, at the very
least, driving the bidder away by making him wait.

If you cancel all bids on an auction, the Buy-It-Now price will reappear,
and the bidder in question can buy the item. Unfortunately, this approach is
not without risks. First, you'll need to get the timing right; if the bidder
isn't quick enough, someone else may place a bid and the Buy-It-Now price will
once again disappear. But what's worse is the possible flight risk; if the
bidder doesn't end up using Buy-It-Now, you've essentially canceled a bunch of
honest bids on your item for no reason.

You can also make an under-the-table deal with the bidder, agreeing to end
the auction early for a certain dollar amount. But this, too, is fraught with peril. First, eBay may consider this to be a violation of their "fee avoidance" policy, and as a result may suspend your account. Second, since it is an off-eBay transaction, it won't be covered by eBay's fraud protection policies, and neither you nor the bidder will be able to leave feedback.

WARNING: As a seller, you should never solicit an off-eBay transaction from your bidders, either in your auction descriptions or in any eBay-related emails. There are several reasons for this, not least of which is that it's a common practice by scammers and spammers (see Hack #20) and may unsettle otherwise interested customers. It would also violate several eBay policies put in place to protect bidders. This doesn't mean that you can't agree to such requests from bidders, only that you should be careful about how you proceed.

Probably the safest approach is to create a second listing, identical to
the first. When it's ready, send the URL to the bidder and instruct him or her
to use the Buy-It-Now option promptly (before anyone else bids). Only when
that auction has closed successfully should you cancel bids on the original
auction and end it early. This way, you and the bidder can complete the
transaction officially and enjoy the protection of eBay's buying and selling
policies. And if the bidder backs out, you can simply end the superfluous
listing or modify it to accommodate a different item.

Although the preceding example is the most common request of this sort, it's
not the only one you'll receive. Bidders often contact sellers to ask for
alternative colors, versions, etc., as well as related items and accessories,
and a cooperative seller can stand to make quite a bit of extra money. Just be
careful about how much you reach out to bidders.

If you're selling shoes, for example, it's generally acceptable to mention
that you have other sizes and colors, either in other auctions (see Hack #47) or
for sale in your online store. But this is different from posting a "dummy"
auction whose purpose is to simply direct customers to your off-eBay store.
Bidders won't buy it, and eBay won't tolerate it.

David A. Karp
is the author of the bestselling Windows Annoyances series of books and the founder of Annoyances.org. He writes for PC Magazine and his latest books include eBay Hacks and the eBay: The Missing Manual.