GetBrowseNodes

Description

Given a BrowseNodeId, GetBrowseNodes operation returns the specified browse node’s information like name, children and ancestors depending on the resources specified in the request. The names and browse node IDs of the children and ancestor browse nodes are also returned. GetBrowseNodes enables you to traverse the browse node hierarchy to find a browse node. Refer Organization of Items on Amazon and Browse Nodes Guide for more information.

GetBrowseNodes Operation returns Id, DisplayName, ContextFreeName and SalesRank response elements by default. For other response elements associated, with GetBrowseNodes supports the following high-level resources:

Availability

All locales.

Request Parameters

Check Common Request Parameters for more information on common input parameters. For detailed information on how to create and send a request, refer Sending a Request. All SearchItems input parameters are listed below:

Name Description Required
BrowseNodeIds List of BrowseNodeIds. A BrowseNodeId is a unique ID assigned by Amazon that identifies a product category/sub-category. The BrowseNodeId is a positive Long having max value upto Long.MAX_VALUE i.e. 9223372036854775807 (inclusive).
  • Type: List of Strings (Positive Long only) (up to 10)
  • Default Value: None
  • Usage: {"BrowseNodeIds": ["3040", "3045"]
Yes
LanguagesOfPreference Languages of preference in which the information should be returned in response. By default the information is returned in the default language of the marketplace. Expected locale format is the ISO 639 language code followed by underscore followed by the ISO 3166 country code (i.e. en_US, fr_CA etc.). For information on default language and valid languages for a marketplace, refer Locale Reference. Currently only single language of preference is supported.
  • Type: List of Strings (Non-Empty)
  • Default Value: None
  • Usage: {"LanguagesOfPreference":["en_US"]}
No
Marketplace Target Amazon Locale. For more information, refer Common Request Parameters.
  • Type: String
  • Default Value: None
  • Usage: {"Marketplace":"www.amazon.com"}
No
PartnerTag Unique ID for a partner. For more information, refer Common Request Parameters.
  • Type: String (Non-Empty)
  • Default Value: None
  • Usage: {"PartnerTag":"xyz-20"}
Yes
PartnerType The type of Amazon program. For more information and valid values, refer Common Request Parameters.
  • Type: String
  • Default Value: None
  • Usage: {"PartnerType":"Associates"}
Yes
Resources Specifies the types of values to return. You can specify multiple resources in one request. For list of valid Resources for SearchItems operation, refer Resources Parameter.
  • Type: List of String
  • Default Value: ItemInfo.Title
  • Usage: {"Resources":["BrowseNodes.Ancestor", "BrowseNodes.Children"]
No

Resources Parameter

Resource Value Description
BrowseNodes.Ancestor Returns ancestry ladder of the requested BrowseNodeId upto root node i.e. the last Browse Node in the ancestry ladder will be the root node. For more information, refer BrowseNodes Resources
BrowseNodes.Children Returns list of children of the requested BrowseNodeId. For more information, refer BrowseNodes Resources

Response Elements

The following are common response elements returned:

Name Description
Errors List of errors.
BrowseNodesResult The container for GetBrowseNodes response. It consists of resultant BrowseNodes for the GetBrowseNodes request.
BrowseNodes Container for BrowseNode information which includes BrowseNodeId, Name, Ancestor, Children, SalesRank associated, etc.
Ancestor Container for BrowseNode Ancestor information which includes BrowseNodeId, DisplayName, ContextFreeName and Ancestor information if one exists. The container is a ladder containing ancestor information up-to root browse node. That is, the last node in the ladder will be Root Node. Note that a root BrowseNode will not have any ancestor.
Children List of BrowseNode Children for a particular BrowseNode. Each BrowseNode Child contains BrowseNodeId, DisplayName and ContextFreeName information associated with the BrowseNode Child. Note that a leaf browse node won't have any children.
ContextFreeName Indicates a displayable name for a BrowseNode that is fully context free. For e.g. DisplayName of BrowseNodeId: 3060 in US marketplace is Orphans & Foster Homes. One can not infer which root category this browse node belongs to unless we have the ancestry ladder for this browse node i.e. it requires a "context" for being intuitive. However, the ContextFreeName of this browse node is Children's Orphans & Foster Homes Books. Note that, for a BrowseNode whose DisplayName is already context free will have the same ContextFreeName as DisplayName.
DisplayName The display name of the BrowseNode as visible on the Amazon retail website.
Id Indicates the unique identifier of the BrowseNode
IsRoot Indicates if the current BrowseNode is a root category.

When requested BrowseNodeIds are invalid, they'll show up under the Errors container in the GetBrowseNodesResponse. As a result, the order of BrowseNodeIds in the response can change. Hence, it is recommended to fetch the requested BrowseNodeId's information by checking the Id value for the BrowseNode.

Example Use Cases

Example 1

Get all browse node information for list of valid browse nodes

Request Payload

{
   "PartnerTag": "xyz-20",
   "PartnerType": "Associates",
   "BrowseNodeIds": ["283155", "3040"]
   "Resources": ["BrowseNodes.Ancestor", "BrowseNodes.Children"]
}

Response

{
  "BrowseNodesResult": {
    "BrowseNodes": [
      {
        "Ancestor": {
          "Ancestor": {
            "Ancestor": {
              "Ancestor": {
                "Ancestor": {
                  "ContextFreeName": "Books",
                  "DisplayName": "Books",
                  "Id": "283155"
                },
                "ContextFreeName": "Subjects",
                "DisplayName": "Subjects",
                "Id": "1000"
              },
              "ContextFreeName": "Children's Books",
              "DisplayName": "Children's Books",
              "Id": "4"
            },
            "ContextFreeName": "Children's Geography & Cultures Books",
            "DisplayName": "Geography & Cultures",
            "Id": "3344091011"
          },
          "ContextFreeName": "Children's Explore the World Books",
          "DisplayName": "Explore the World",
          "Id": "3023"
        },
        "ContextFreeName": "Children's Mexico Books",
        "DisplayName": "Mexico",
        "Id": "3040",
        "IsRoot": false
      },
      {
        "Children": [
          {
            "ContextFreeName": "Subjects",
            "DisplayName": "Subjects",
            "Id": "1000"
          },
          {
            "ContextFreeName": "Books Featured Categories",
            "DisplayName": "Books Featured Categories",
            "Id": "51546011"
          },
          {
            "ContextFreeName": "Specialty Boutique",
            "DisplayName": "Specialty Boutique",
            "Id": "2349030011"
          }
        ],
        "ContextFreeName": "Books",
        "DisplayName": "Books",
        "Id": "283155",
        "IsRoot": true
      }
    ]
  }
}

Example 2

Example use case when list of BrowseNodeIds contains an invalid browse node id.

Request Payload

{
   "PartnerTag": "xyz-20",
   "PartnerType": "Associates",
   "BrowseNodeIds": ["283155", "0"],
   "Resources": ["BrowseNodes.Ancestor", "BrowseNodes.Children"]
}

Response

{
  "BrowseNodesResult": {
    "BrowseNodes": [
      {
        "Children": [
          {
            "ContextFreeName": "Subjects",
            "DisplayName": "Subjects",
            "Id": "1000"
          },
          {
            "ContextFreeName": "Books Featured Categories",
            "DisplayName": "Books Featured Categories",
            "Id": "51546011"
          },
          {
            "ContextFreeName": "Specialty Boutique",
            "DisplayName": "Specialty Boutique",
            "Id": "2349030011"
          }
        ],
        "ContextFreeName": "Books",
        "DisplayName": "Books",
        "Id": "283155",
        "IsRoot": true
      }
    ]
  },
  "Errors": [
    {
      "__type": "com.amazon.paapi5#ErrorData",
      "Code": "InvalidParameterValue",
      "Message": "The BrowseNodeId 0 provided in the request is invalid."
    }
  ]
}

results matching ""

    No results matching ""