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):

The output of the command above will look like:

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 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)

8 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.

Leave a Reply

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


Get every new post on this blog delivered to your Inbox.

Join other followers: