Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple product search API [closed]

Tags:

api

shopping

I'm trying to do something for a webapp I'm building:

  1. The user inputs a fuzzy product title, eg: Bob Dylan Blonde On Blonde
  2. The app presents a list of products matching that string sorted by relevance.

I've tried doing this through the Amazon ECS API. I realise that would lock me to Amazon but right now, I'm okay with that.

The problem with ECS is when the user searches, I don't know what the product band is, and there appears to be a limitation whereby the results come back in a really strange order, not relevance or popularity (if they're not the same thing). For example, searching ECS for "Bob Dylan" returns posters as the first two items, then a video, then a random CD and then more videos and posters.

What I really want is something like Amazon's real search. If you went to Amazon and fired in "Bob Dylan", you get back a load of CDs (as you should). Now I'm sure I'm technically able to scrape Amazon or Google Shopping... But I'm sure that's against some terms of service.

So my questions:

  1. Can you search and sort Amazon's ECS in the same way they do for their user-facing website?

  2. Is there a Google Product Search/Shopping API that I could use instead in a similar (completely behind the scenes - not on-the-page JS) way?

Edit for the bounty-seekers.

At the moment I'm doing this:

  1. Querying Google's AJAX search (this apparently works on the backend like their SOAP version did, just with AJAX, not sure if I'm allowed to or not) with site:amazon.co.uk and inurl:/dp/ along with the search string and this brings me back a list of products in a sensible popularity-sorted order.

  2. For each product, I extract the procuct code from the Google-given URL and I'm querying Amazon ECS for the product title, price, link, etc.

So for one search with five results, I'm doing 6 requests. It's pretty hideous. If somebody can find me a simplified way of doing this just through Amazon (or another API), I'd be really appreciative (to the tune of 525 reputation)

like image 288
Oli Avatar asked Oct 11 '10 13:10

Oli


2 Answers

Recently released: http://code.google.com/apis/shopping/search/

like image 99
Ali Afshar Avatar answered Sep 28 '22 18:09

Ali Afshar


you should be able to define sort order (e.g. by SalesRank) in product search, however it seems to be unavailable for category All.. it's difficult to say what is used for the sorting when no category is specified. however, you should also be able to get SalesRank value for each product item

like image 35
mykhal Avatar answered Sep 28 '22 18:09

mykhal