【问题标题】:How to retrieve all book categories from Amazon by ASIN?如何通过 ASIN 从亚马逊检索所有书籍类别?
【发布时间】:2020-03-18 16:00:50
【问题描述】:

谁能告诉如何从 ASIN 的书中检索类别列表,例如this website does

【问题讨论】:

    标签: amazon-product-api


    【解决方案1】:

    为此使用亚马逊产品广告 API v5。使用 ASIN(例如 1641521198)作为 ItemsId 创建一个 GetItems 请求,并请求 BrowserNoteInfo.BrowserNodes 和 BrowserNoteInfo.BrowserNodes.Ancestor 作为 ressources

    响应将如下所示:

    {
     "ItemsResult": {
      "Items": [
       {
        "ASIN": "1641521198",
        "BrowseNodeInfo": {
         "BrowseNodes": [
          {
           "Ancestor": {
            "Ancestor": {
             "Ancestor": {
              "Ancestor": {
               "ContextFreeName": "Books",
               "DisplayName": "Books",
               "Id": "283155"
              },
              "ContextFreeName": "Subjects",
              "DisplayName": "Subjects",
              "Id": "1000"
             },
             "ContextFreeName": "Cookbooks, Food & Wine",
             "DisplayName": "Cookbooks, Food & Wine",
             "Id": "6"
            },
            "ContextFreeName": "Baking",
            "DisplayName": "Baking",
            "Id": "4196"
           },
           "ContextFreeName": "Bread Baking",
           "DisplayName": "Bread",
           "Id": "4197",
           "IsRoot": false
          },
          {
           "Ancestor": {
            "Ancestor": {
             "Ancestor": {
              "Ancestor": {
               "ContextFreeName": "Books",
               "DisplayName": "Books",
               "Id": "283155"
              },
              "ContextFreeName": "Subjects",
              "DisplayName": "Subjects",
              "Id": "1000"
             },
             "ContextFreeName": "Cookbooks, Food & Wine",
             "DisplayName": "Cookbooks, Food & Wine",
             "Id": "6"
            },
            "ContextFreeName": "Cooking by Ingredient",
            "DisplayName": "Cooking by Ingredient",
            "Id": "4208"
           },
           "ContextFreeName": "Natural Food Cooking",
           "DisplayName": "Natural Foods",
           "Id": "4340",
           "IsRoot": false
          },
          {
           "Ancestor": {
            "Ancestor": {
             "Ancestor": {
              "Ancestor": {
               "ContextFreeName": "Books",
               "DisplayName": "Books",
               "Id": "283155"
              },
              "ContextFreeName": "Subjects",
              "DisplayName": "Subjects",
              "Id": "1000"
             },
             "ContextFreeName": "Cookbooks, Food & Wine",
             "DisplayName": "Cookbooks, Food & Wine",
             "Id": "6"
            },
            "ContextFreeName": "Main Courses & Side Dishes",
            "DisplayName": "Main Courses & Side Dishes",
            "Id": "4234"
           },
           "ContextFreeName": "Garnishing Meals",
           "DisplayName": "Garnishes",
           "Id": "7696136011",
           "IsRoot": false
          }
         ]
        },
        "DetailPageURL": "https://www.amazon.com/dp/1641521198?tag=getabstractcom&linkCode=ogi&th=1&psc=1"
       }
      ]
     }
    }
    

    使用这些数据,您应该能够确定类别,例如 书籍 » 烹饪书、美食与美酒 » 烘焙 » 面包烘焙 或者 书籍 » 食谱、美食和美酒 » 主菜和配菜 » 配菜

    您可以在here 找到有关 PAAPI5 的更多信息。还有一些针对不同编程语言的 SDK,例如 Java、PHP、Node 或 Python。

    【讨论】:

      猜你喜欢
      • 2013-01-18
      • 1970-01-01
      • 2012-09-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-26
      • 1970-01-01
      相关资源
      最近更新 更多