Amazon API - Instant Video results

喜夏-厌秋 提交于 2019-12-02 18:17:12

In order to get more details, you'll need to set the ResponseGroup parameter in your request. See the ResponseGroup section of the ItemLookup documentation to see the different Response Groups that you can use.

For example, setting the ResponseGroup parameter to Large or Medium or Small or even ItemAttributes will give you the description:

An unflattering look inside America's corporate controlled food industry.

for Food, Inc (B002VRZEYM) and the Title:

Top Banana

for Arrested Development season 1 episode 2 (B000N2VRJ8).

I had the same problem, while trying to query the Amazon API for Prime Instant Video content. Although this question is kinda old, there are probably some people like me who are interested in a detailed answer, especially for the second part (2.).

  1. Like Jonathan Spooner already said, you have to set a response group that returns the data you're interested in. Official documentation: Response Groups - Product Advertising API. In your case, I think, the ResponseGroup Small should do.

  2. If you want to get the title of a TV show, which contains a certain episode, you have to set the response group RelatedItems in your request, too (you can set multiple response groups in one request). You will also have to name a RelationshipType, otherwise the request will fail. For Episode -- Season - Relationships you choose Episode.

    With RelatedItems, the result will contain a node named <RelatedItems>. You will find the season item in there, which's title should be something like " Arrested Development - Season 1 [HD]".

Note: If you really just want the TV show title, you could either parse the season name for it or you could make another ItemLookup with the seasons ASIN: set the response group RelatedItems again, but this time with RelationshipType=Season. This will return Season - TV Series - Relationships. The related item will contain the TV Show in general. (But the title could have a suffix like [HD] anyway)

Here you have a list with all relationship types: Relationship Types - Product Advertising API

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