Fetching Amazon buyback (“trade-in”) price

心已入冬 提交于 2019-12-05 04:07:15

问题


Is there a way to get the Amazon buyback (aka "trade-in") prices for textbooks through an API? I've searched around for a while but can't find a clue how people are getting this for their websites..

Here is the Amazon BuyBack program: amazon.com/buyback

Here is an example buyback URL: http://www.amazon.com/gp/search/s/ref=tradeinavs?url=rh%3Dn%3A2205237011%26i%3Dtextbooks-tradein&field-keywords=978-0321614018&Go.x=10&Go.y=17

I'm aware that I could just fetch the pages and parse the HTML, but if there is some way to get it through an API or whatever, I'm sure Amazon would prefer that to just parsing the page (also it would be faster to query).


回答1:


The Product Advertising API has it in the ItemAttributes section when you do an ItemLookup search, as shown by this sample call (I believe this is perl, but just to show you a sample):

my $request = {
Service => 'AWSECommerceService',
Operation => 'ItemLookup',
Version=>'2010-11-01',
ItemId => $itemId,
ResponseGroup => 'ItemAttributes',
};

snip
'ASIN' => '0136100570',
'ItemAttributes' => {
'NumberOfItems' => '1',
'IsEligibleForTradeIn' => '1',
'TradeInValue' => {
'Amount' => '3550',
'CurrencyCode' => 'USD',
'FormattedPrice' => '$35.50'
},
'ListPrice' => {
'Amount' => '18900',
'CurrencyCode' => 'USD',
'FormattedPrice' => '$189.00'

Source: https://forums.aws.amazon.com/message.jspa?messageID=212679



来源:https://stackoverflow.com/questions/6054215/fetching-amazon-buyback-trade-in-price

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!