This used to be easy, as there was a findCompletedItems() function in the Finding API. The Finding API just requires a developer program account, which most anyone can get. They removed the above mentioned function from it last year, and this functionality is only available (in API form) in the Marketplace Insights API, access to which is heavily restricted.
Unless you can convince ebay to give you Marketplace Insights access, which you almost certainly can't, then you would need to be scraping this data. Old school would probably work (plain HTTP requests), doesn't seem to be much JS going on in the search results page, new school using automated testing tools I would advise against, ebay would likely detect it and block you (my advice against is not because you would then be blocked, but rather that you would be wasting your time).