简单的产品搜索API [英] Simple product search API
问题描述
我想为web应用程序我建立做一些事情:
I'm trying to do something for a webapp I'm building:
- 用户输入一个模糊的产品名称,例如:
鲍勃·迪伦金发金发上
- 的应用程序presents产品匹配该字符串按相关性排序列表。
我试着通过亚马逊API ECS这样做。我意识到这将我锁到亚马逊,但现在,我很好这一点。
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.
与ECS问题是,当用户搜索,我不知道该产品带是什么,似乎有一个限制,由此,结果回来的真奇怪秩序,没有相关性或知名度(如果他们'再不是一回事)。例如,对于鲍勃·迪伦搜索ECS返回海报作为前两个项目,然后视频,然后随机光盘,然后更多的视频和海报。
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.
我真正想要的是像亚马逊的真正的搜索。如果你去亚马逊和鲍勃·迪伦炒鱿鱼,你回来的CD的负载(如你应该)。现在,我敢肯定,我在技术上能够刮亚马逊或谷歌购物......但我敢肯定,这是对服务的一些术语。
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.
所以我的问题:
-
可以在他们为他们的面向用户的网站做同样的方式搜索和排序亚马逊的ECS?
Can you search and sort Amazon's ECS in the same way they do for their user-facing website?
有一个谷歌产品搜索/购物API,我可以改用类似的?(完全在幕后 - 而不是在页式JS)的方式
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?
目前,我这样做:
-
与
查询谷歌的AJAX搜索(这显然是工作在后台像他们SOAP版本中那样,只需用AJAX,不知道如果我允许与否)的网站:amazon.co .UK
和inurl这样:/ DP /
随着搜索字符串,这使我回的产品在一个合理的人气排序顺序列表。
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
andinurl:/dp/
along with the search string and this brings me back a list of products in a sensible popularity-sorted order.
对于每个产品,我从中提取谷歌,定URL目前产品有code和我查询亚马逊ECS的产品名称,价格,链接,等等。
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.
因此,对于五个结果一个搜索,我做6请求。这是pretty狰狞。如果有人能找到我只是通过亚马逊(或其他API)这样做的一种简化的方式,我会非常AP preciative(525美誉的曲调)
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)
推荐答案
近日公布:的 HTTP://$c$c.google.com/apis/shopping/search/
这篇关于简单的产品搜索API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!