{"id":1304,"date":"2020-05-02T11:54:27","date_gmt":"2020-05-02T02:54:27","guid":{"rendered":"https:\/\/ts-engine.net\/?p=1304"},"modified":"2020-05-02T11:54:27","modified_gmt":"2020-05-02T02:54:27","slug":"amazon-partner-api%e3%81%a7%e3%82%a2%e3%83%9e%e3%82%be%e3%83%b3%e3%81%ae%e5%95%86%e5%93%81%e6%83%85%e5%a0%b1%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"http:\/\/ts-engine.net\/?p=1304","title":{"rendered":"amazon Partner API\u3067\u30a2\u30de\u30be\u30f3\u306e\u5546\u54c1\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b"},"content":{"rendered":"<p>\n\u30a2\u30de\u30be\u30f3\u306e\u5546\u54c1\u3092\u7d39\u4ecb\u3059\u308b\u3068\u304d\u306f\u3001\u30a2\u30de\u30be\u30f3\u30a2\u30bd\u30b7\u30a8\u30a4\u30c8\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u306e\u3060\u304c\u3001<br \/>\n\u30a2\u30de\u30be\u30f3\u516c\u5f0f\u306e\u30c4\u30fc\u30eb\u3067\u5546\u54c1\u3092\u7d39\u4ecb\u3059\u308b\u5834\u5408\u3001\u3069\u3046\u3057\u3066\u30c7\u30b6\u30a4\u30f3\u3060\u3063\u305f\u3089\u6b32\u3057\u3044\u60c5\u5831\u304c\u306a\u3044\u5834\u5408\u304c\u3042\u308b\u3002\n<\/p>\n<p>\n\u81ea\u5206\u72ec\u81ea\u306e\u60c5\u5831\u304c\u3060\u305b\u308b\u3088\u3046\u306b\u3001amazon\u306eAPI\u3092\u4f7f\u3063\u3066\u5546\u54c1\u3092\u7d39\u4ecb\u3059\u308b\u306b\u3042\u305f\u308a\u5fc5\u8981\u306a\u60c5\u5831\u3092\u81ea\u52d5\u7684\u306b\u3068\u308c\u308b\u3088\u3046\u306b\u3057\u305f\u3002<br \/>\n\u4f5c\u308a\u306b\u3042\u305f\u3063\u3066\u306f\u7d50\u69cb\u3064\u307e\u305a\u304f\u3068\u3053\u308d\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u4ee5\u4e0b\u306b\u7d39\u4ecb\u3002\n<\/p>\n<p><!--more--><!--more--><\/p>\n<h2>\nTooManyRequests\u306e\u30a8\u30e9\u30fc\u304c\u3067\u307e\u304f\u308b<br \/>\n<\/h2>\n<p>\n<em>TooManyRequests<br \/>\nThe request was denied due to request throttling. Please verify the number of requests made per second to the Amazon Product Advertising API.<br \/>\n<\/em>\n<\/p>\n<p>\nAPI\u30ad\u30fc\u3092\u53d6\u5f97\u3057\u3066\u3001\u4e00\u56de\u76ee\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u3053\u308c\u304c\u51fa\u305f\u3002\u4e00\u56de\u76ee\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3059\u304e\u3001\u3068\u3044\u3046\u306e\u306f\u7d0d\u5f97\u3067\u304d\u306a\u3044\u3002\n<\/p>\n<h2>\n\u7d50\u5c40\u6570\u65e5\u305f\u3063\u305f\u3089\u81ea\u52d5\u3067\u5fa9\u65e7\u3057\u305f<br \/>\n<\/h2>\n<p>\n\u65e5\u672c\u306e\u30b5\u30a4\u30c8\u3067\u306f\u307e\u3060Partner API version4\u4ee5\u524d\u3092\u4f7f\u3063\u3066\u3044\u308b\u4eba\u304c\u591a\u304f\u3001Version5\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u4eba\u306f\u5c11\u306a\u3044\u306e\u3067\u3001<br \/>\n\u82f1\u8a9e\u306e\u60c5\u5831\u3092\u4e2d\u5fc3\u306b\u63a2\u3057\u3066\u307f\u305f\u304c\u3001\u82f1\u8a9e\u306e\u30b5\u30a4\u30c8\u3067\u3082\u540c\u69d8\u306e\u4e8b\u8c61\u306b\u906d\u9047\u3057\u3066\u3044\u308b\u4eba\u304c\u591a\u304b\u3063\u305f\u3002\n<\/p>\n<h2>\nAPI\u306fpython\u3092\u4f7f\u3046\u306e\u3067\u3042\u308c\u3070\u3001python-amazon-paapi\u304c\u304a\u3059\u3059\u3081<br \/>\n<\/h2>\n<p>\n<a href=\"https:\/\/pypi.org\/project\/python-amazon-paapi\/\">\u30e9\u30a4\u30d6\u30e9\u30ea<\/a>\u306e\u4f7f\u3044\u65b9\u306f\u3053\u3061\u3089\u306b\u3042\u308a\u307e\u3057\u305f\u3002\n<\/p>\n<p>\n\u79c1\u306f\u3044\u304b\u306e\u3088\u3046\u306a\u304b\u305f\u3061\u3067\u3001URL,\u753b\u50cf,\u30e9\u30f3\u30ad\u30f3\u30b0\u60c5\u5831\u306a\u3069\u3092\u3068\u308a\u307e\u3057\u305f\u3002\n<\/p>\n<p>[python]<br \/>\ndef main(asin):<br \/>\n   amazon = AmazonAPI(KEY, SECRET, TAG, COUNTRY, throttling=1)<br \/>\n    products = amazon.get_items(item_ids=[asin])<br \/>\n    product = products[&#8216;data&#8217;][asin]<br \/>\n    data = {}<br \/>\n    data[&#8220;url&#8221;]=product.detail_page_url<br \/>\n    data[&#8220;image&#8221;]=product.images.primary.medium.url<br \/>\n    data[&#8220;author&#8221;]=product.item_info.by_line_info.contributors[0].name<br \/>\n    data[&#8220;company&#8221;]=product.item_info.by_line_info.manufacturer.display_value<br \/>\n    data[&#8220;title&#8221;]=product.item_info.title.display_value<br \/>\n    data[&#8220;ranking&#8221;]=product.browse_node_info.browse_nodes[-1].sales_rank<br \/>\n[\/python]<\/p>\n<p>\n\u6700\u8fd1Python\u4f7f\u3063\u3066\u3066\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u306a\u3044\u3053\u3068\u306f\u307b\u3068\u3093\u3069\u306a\u3044\u306e\u3067\u3001\uff11\uff10\u5e74\u524d\u3068\u6bd4\u3079\u3066\u3082Python\u306f\u672c\u5f53\u306b\u4fbf\u5229\u306b\u306a\u3063\u305f\u3002\n<\/p>\n<div class=\"engine-box\" style=\"margin-bottom:0px;\">\n<div class=\"engine-image\" style=\"float:left;margin:0px 12px 1px 0px;\"> <a href='https:\/\/www.amazon.co.jp\/dp\/4873117380?tag=benkyonavi-22&#038;linkCode=ogi&#038;th=1&#038;psc=1' name=\"enginelink\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"> <img decoding=\"async\" src=\"https:\/\/m.media-amazon.com\/images\/I\/51n-c-YErvL._SL160_.jpg\" alt='\u5165\u9580 Python 3' style=\"border: none;\" \/> <\/a> <\/div>\n<div class=\"engine-info\" style=\"line-height:120%; margin-bottom: 10px\">\n<div class=\"engine-name\" style=\"margin-bottom:10px;line-height:120%\"> <a href='https:\/\/www.amazon.co.jp\/dp\/4873117380?tag=benkyonavi-22&#038;linkCode=ogi&#038;th=1&#038;psc=1' name=\"enginelink\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">\u5165\u9580 Python 3 <\/a> <\/p>\n<div class=\"engine-powered\" style=\"font-size:80%;margin-top:5px;line-height:120%\">posted with <a href=\"https:\/\/ts-engine.net\/\" target=\"_blank\" rel=\"noopener noreferrer\">owntool <\/a> <\/div>\n<\/p><\/div>\n<div class=\"engine-detail\">Bill Lubanovic \u30aa\u30e9\u30a4\u30ea\u30fc\u30b8\u30e3\u30d1\u30f3<br \/>\u58f2\u308a\u4e0a\u3052\u30e9\u30f3\u30ad\u30f3\u30b0: 22 <\/div>\n<div class=\"engine-sub-info\" style=\"float: left;\">\n<div class=\"engine-link\" style=\"margin-top: 5px\"> <a href='https:\/\/www.amazon.co.jp\/dp\/4873117380?tag=benkyonavi-22&#038;linkCode=ogi&#038;th=1&#038;psc=1' rel=\"nofollow noopener noreferrer\" target=\"_blank\">Amazon.co.jp\u3067\u8a73\u7d30\u3092\u898b\u308b <\/a> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div class=\"engine-footer\" style=\"clear: left\"> <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u30a2\u30de\u30be\u30f3\u306e\u5546\u54c1\u3092\u7d39\u4ecb\u3059\u308b\u3068\u304d\u306f\u3001\u30a2\u30de\u30be\u30f3\u30a2\u30bd\u30b7\u30a8\u30a4\u30c8\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u306e\u3060\u304c\u3001 \u30a2\u30de\u30be\u30f3\u516c\u5f0f\u306e\u30c4\u30fc\u30eb\u3067\u5546\u54c1\u3092\u7d39\u4ecb\u3059\u308b\u5834\u5408\u3001\u3069\u3046\u3057\u3066\u30c7\u30b6\u30a4\u30f3\u3060\u3063\u305f\u3089\u6b32\u3057\u3044\u60c5\u5831\u304c\u306a\u3044\u5834\u5408\u304c\u3042\u308b\u3002 \u81ea\u5206\u72ec\u81ea\u306e\u60c5\u5831\u304c\u3060\u305b\u308b\u3088\u3046\u306b\u3001amazon\u306eAPI\u3092\u4f7f\u3063\u3066\u5546\u54c1\u3092\u7d39\u4ecb\u3059\u308b\u306b\u3042\u305f\u308a\u5fc5\u8981\u306a\u60c5\u5831\u3092\u81ea\u52d5\u7684\u306b\u3068\u308c\u308b\u3088\u3046\u306b\u3057\u305f\u3002 \u4f5c\u308a\u306b\u3042\u305f\u3063\u3066\u306f\u7d50\u69cb\u3064\u307e\u305a\u304f\u3068\u3053\u308d\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u4ee5\u4e0b\u306b\u7d39\u4ecb\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,7],"tags":[],"class_list":["post-1304","post","type-post","status-publish","format-standard","hentry","category-20","category-7"],"_links":{"self":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/posts\/1304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1304"}],"version-history":[{"count":0,"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/posts\/1304\/revisions"}],"wp:attachment":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1304"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}