My *nix world

Query eBay purchase history

eBay is great except that they don't want to show you how much you have spent over a period of time. Maybe this is a strategic feature, I don't know and I don't care. I just need it!

Lately I've started working on some projects that requires cheap parts (in order to keep the project cost low). eBay is happening to be a good market for those Chinese cheap parts (let's face it: almost everything is made in China, nowadays), so I began to trade on eBay quite a lot. The platform is great but some important feature is still (intentionally) missing: the summary of your purchases. So the today's question is: how to query eBay purchase history in order to your purchases summary?

This can be accomplished quite easy if you save the HTML page on disk and then parse its content with the help of some data extraction utility (eg. awk).

My solution is using this approach, so I have two scripts for this:

Now all I have to do is to save the eBay purchase history to a file on local disk and then call the ebay_total script that will list all items and the total summary (expressed in original currency and also converted to EUR/my local currency):

ebay_total -f /tmp/My_eBay_Purchase_History.htm

The output of the command above will look like:

Nr     Date          Shipped date     Price     Item description
1     04/09/13     04/10/13     $2.75     35g Soldering Solder Paste Flux Cream Welding Paste NT
2     04/08/13     04/08/13     $1.59     1m Power Supply Multimeter Alligator Testing Cord Lead Clip to Banana Plug cable
3     04/08/13     04/09/13     $1.56     2 Pcs Fuse Holder FH043 10A 250V for 5x20mm Fuse NEW
26     03/16/13     03/18/13    $1.05     2.5FT 2.0MM Desoldering Braid Solder Remover Wick Cable
TOTAL: 26 items => 54.38 USD (~ 41.57 EUR ; 182.18 RON)

Note: one can use a software to connect to his/her eBay account and to watch bidding/purchase history. I don't like this approach, especially when we are talking about an eBay account!

As of March 2017 (and probably earlier) the above script doesn’t work anymore due to eBay Order list layout change. However, I wrote a Firefox|Chrome|Opera Web Extension which does a better job.

Just click the Add to Firefox or, if you are using Chrome then click the ADD TO CHROME button which automatically will add it to your browser.

If you prefer a certain version then go to the dist folder and choose whatever version you like.

To test it for the first time open your eBay purchase history (My Ebay -> Purchase History) and click the Quick Report add-on's button shown right here:

Query eBay purchase history

It will open a new tab containing a compact and user-friendly HTML report of your purchase history:

Query eBay purchase history

Furthermore it allows sorting its data columns, grouping, opening directly the item's detail or seller's page on a new tab by just clicking the respective item. If you want to process these data in your system/application then you could use its export option (see top-left) which exports its raw data to a CSV, JSON or XML file. I wish something like this existed by default by since it doesn't exist, here we go:

Now, if you think that this article was interesting don't forget to rate it. It shows me that you care and thus I will continue write about these things.

The following two tabs change content below.
Query eBay purchase history

Eugen Mihailescu

Founder/programmer/one-man-show at Cubique Software
Always looking to learn more about *nix world, about the fundamental concepts of math, physics, electronics. I am also passionate about programming, database and systems administration. 16+ yrs experience in software development, designing enterprise systems, IT support and troubleshooting.
Query eBay purchase history

Latest posts by Eugen Mihailescu (see all)

11 thoughts on “Query eBay purchase history

    1. Eugen Mihailescu Post author

      I assume you are working on a *nix system (eg. Linux). If you are on Windows then I'm afraid you need the cygwin installed because my script is a BASH script which normally can be handled only on *nix-alike systems.

      I assume you have downloaded the script somewhere on your local disk (let's assume it is in the /tmp directory). So it is on /tmp/ebay_total

      To run this script (or any other script while on Linux) just open a terminal and type the script name with its full path:
      /tmp/ebay_total + enter

      Of course you should specify also the .html page as mentioned in my article such that the script will parse the .html page and then will print-out that summary.

  1. Pamela Wesson

    To install the add-on I have successfully dragged the .zip file into the "install" area. It installs as an add-on in Chrome, but no yellow "Generate Report" button shows up. I have quit eBay and Chrome and opened but does not help.
    Suggestion? It would be a HUGE help.

Leave a Reply

Your email address will not be published. Required fields are marked *