I am struggling to find out how to get a product's most relevant category path through Amazon's Product Advertising API. It seems that this information is not returned directly and needs to be determined by some client side logic?
Example:
http://ift.tt/1xHcctr
Category path displayed one the website:
Spielzeug › Sport & Outdoor › Tischbillard
Browse nodes returned from the api:
{
"Ancestors": {
"BrowseNode": {
"Ancestors": {
"BrowseNode": {
"Ancestors": {
"BrowseNode": {
"BrowseNodeId": "12950651",
"Name": "Spielzeug"
}
},
"BrowseNodeId": "12950661",
"IsCategoryRoot": "1",
"Name": "Kategorien"
}
},
"BrowseNodeId": "360565031",
"Name": "Sport & Outdoor"
}
},
"BrowseNodeId": "2872727031",
"Name": "Tischbillard"
},
{
"Name": "Kategorien",
"Ancestors": {
"BrowseNode": {
"BrowseNodeId": "16435051",
"Name": "Sport & Freizeit"
}
},
"Children": {
"BrowseNode": [
{
"BrowseNodeId": "3772226031",
"Name": "Sportbekleidung"
},
{
"BrowseNodeId": "5143479031",
"Name": "Sportschuhe"
},
{
"BrowseNodeId": "190534011",
"Name": "Sportelektronik"
},
{
"BrowseNodeId": "190416011",
"Name": "American Football"
},
{
"BrowseNodeId": "16435131",
"Name": "Angeln"
},
{
"BrowseNodeId": "190423011",
"Name": "Badminton"
},
{
"BrowseNodeId": "190417011",
"Name": "Baseball"
},
{
"BrowseNodeId": "190418011",
"Name": "Basketball"
},
{
"BrowseNodeId": "190424011",
"Name": "Billard"
},
{
"BrowseNodeId": "248376011",
"Name": "Bogenschießen & Waffensport"
},
{
"BrowseNodeId": "248406011",
"Name": "Bowling & Kegeln"
},
{
"BrowseNodeId": "190425011",
"Name": "Boxen"
},
{
"BrowseNodeId": "16435151",
"Name": "Camping & Outdoor"
},
{
"BrowseNodeId": "451555031",
"Name": "Cheerleading"
},
{
"BrowseNodeId": "451582031",
"Name": "Cricket"
},
{
"BrowseNodeId": "190426011",
"Name": "Darts"
},
{
"BrowseNodeId": "189731031",
"Name": "Event- & Reisegutscheine"
},
{
"BrowseNodeId": "4256280031",
"Name": "Fan-Shop"
},
{
"BrowseNodeId": "451767031",
"Name": "Fechten"
},
{
"BrowseNodeId": "235141011",
"Name": "Feldhockey"
},
{
"BrowseNodeId": "16435171",
"Name": "Fitness"
},
{
"BrowseNodeId": "190432011",
"Name": "Fun-Sportarten"
},
{
"BrowseNodeId": "5143318031",
"Name": "Futsal"
},
{
"BrowseNodeId": "16435181",
"Name": "Fußball"
},
{
"BrowseNodeId": "16435191",
"Name": "Golf"
},
{
"BrowseNodeId": "190419011",
"Name": "Handball"
},
{
"BrowseNodeId": "451796031",
"Name": "Inline-Skates & Rollschuhe"
},
{
"BrowseNodeId": "248474011",
"Name": "Jagd"
},
{
"BrowseNodeId": "452697031",
"Name": "Kampfsport"
},
{
"BrowseNodeId": "451560031",
"Name": "Klettern"
},
{
"BrowseNodeId": "452680031",
"Name": "Lacrosse"
},
{
"BrowseNodeId": "190428011",
"Name": "Leichtathletik"
},
{
"BrowseNodeId": "5144499031",
"Name": "Padel-Tennis"
},
{
"BrowseNodeId": "451811031",
"Name": "Paintball"
},
{
"BrowseNodeId": "16435211",
"Name": "Radsport"
},
{
"BrowseNodeId": "16435221",
"Name": "Reitsport"
},
{
"BrowseNodeId": "452159031",
"Name": "Rollhockey"
},
{
"BrowseNodeId": "511836031",
"Name": "Rucksäcke & Taschen"
},
{
"BrowseNodeId": "452168031",
"Name": "Rugby"
},
{
"BrowseNodeId": "16435231",
"Name": "Running"
},
{
"BrowseNodeId": "452171031",
"Name": "Scooter & Zubehör"
},
{
"BrowseNodeId": "190608011",
"Name": "Skateboarding"
},
{
"BrowseNodeId": "460965031",
"Name": "Snooker"
},
{
"BrowseNodeId": "4543004031",
"Name": "Sportbrillen"
},
{
"BrowseNodeId": "190429011",
"Name": "Squash"
},
{
"BrowseNodeId": "451595031",
"Name": "Tanzsport"
},
{
"BrowseNodeId": "16435271",
"Name": "Tennis"
},
{
"BrowseNodeId": "190430011",
"Name": "Tischtennis"
},
{
"BrowseNodeId": "451774031",
"Name": "Turnen"
},
{
"BrowseNodeId": "190420011",
"Name": "Volleyball"
},
{
"BrowseNodeId": "3959757031",
"Name": "Wassersport"
},
{
"BrowseNodeId": "3024257031",
"Name": "Wintersport"
}
]
},
"IsCategoryRoot": "1",
"BrowseNodeId": "16435121"
}
I can query the api and receive a collection/tree of browse nodes, which seems to contain the correct path (as [sometimes?] displayed on amazon's website).
But how do I determine the correct path?
I could not yet find any field in the API's response groups which would contain this information.
Can anyony give some hints?
Thx!
Aucun commentaire:
Enregistrer un commentaire