Bienvenue sur le site API Best Buy Developer! Que vous soyez un API pro, un développeur débutant ou un partenaire Best Buy, notre catalogue complet d’API attend votre imagination. Notre suite API vous permet d'interroger des produits, des magasins et bien plus encore. Venez explorer nos données, parcourir les descriptions des attributs disponibles et voir des exemples de demandes en cours et de réponses.
Si vous utilisez nos API pour la première fois, veuillez consulter notre guide de démarrage. Si vous avez déjà votre clé API, nos formats de recherche et de réponse peuvent vous aider à affiner vos résultats.
REMARQUE: à compter de début 2017, JSONP sera désactivé afin de protéger la confidentialité des utilisateurs. Cela empêchera les développeurs de faire des appels d'API du côté client et d'exposer ainsi les clés d'API au grand public. Si vous avez des questions ou des idées sur ce sujet, veuillez nous contacter à l'adresse developer@bestbuy.com.
Format de réponse
Les réponses peuvent être retournées soit dans JSON ou XML.
S'applique à: API de produits • API de magasins • API de catégories
Pour demander un seul élément, tel qu'un produit spécifique, indiquez le format de réponse souhaité avec l’extension ajoutée après l’identificateur de l’article. Par exemple, /products/8880044.json
.
Pour demander une collection d'articles, tels que tous les produits de notre catalogue, le format de réponse souhaité est spécifié dans format
paramètre de requête. Un exemple de ceci peut être vu dans la section Récupération de collections. Si aucun format n'est spécifié, xml sera renvoyé.
S'applique à: API de recommandations
Lors de l'utilisation de l'un des points de terminaison dans l'API Recommandations, le format de réponse renvoyé sera json. le XML Le format n'est pas pris en charge pour les points de terminaison de l'API Recommandations. Vous pouvez spécifier le format en utilisant /6534009/alsoViewed.json
ou ne pas spécifier un format comme / 6534009 / aussi vu
.
S'applique à: API de produits
En acceptant les conditions d'utilisation de Best Buy, vous acceptez également de ne mettre aucun contenu en cache, sauf de manière temporaire. En tant que tel, nos liens de réponse expireront au bout de sept jours. Voici plusieurs exemples d’URL de réponse correctement formatées:
url: https://api.bestbuy.com/click/5592e2b895800000/12345678/pdp
mobileUrl: https://api.bestbuy.com/click/5592e2b895800000/12345678/pdp
addToCartUrl: https://api.bestbuy.com/click/5592e2b895800000/12345678/cart
Attributs retournés
boucle "https://api.bestbuy.com/v1/products/8880044.json?show=sku,name,salePrice&apiKey=YourAPIKey"
var bby = exiger('meilleur achat') ('YourAPIKey')
bby.des produits(8880044spectacle:'sku, name, salePrice').puis(une fonction(Les données)
console.bûche(Les données)
);
Ne retourne que le
sku
,prénom
etprix de vente
attributs pour les produits.
"sku": 8880044,
"prénom": "Batman Begins (disque Blu-ray)",
"prix de vente": 7.99
S'applique à: API de produits • API de magasins • API de catégories
le spectacle
attribut vous permet de contrôler quels attributs sont retournés. Vous pouvez retourner des attributs spécifiques en suivant la syntaxe ci-dessous. Pour renvoyer tous les attributs, utilisez montrer = tous
.
Si vous avez essayé l'exemple de requête dans la section Mise en route, vous avez probablement remarqué que notre API Produits renvoie de nombreux attributs pour chaque produit. Pour plus de commodité, nous fournissons un spectacle
paramètre de requête qui vous permet de spécifier uniquement les attributs que vous souhaitez renvoyer dans la réponse.
Montre tout
S'applique à: API de produits • API de magasins
Afin de rendre les réponses de l'API plus faciles à gérer, nous ne renvoyons pas tous les attributs disponibles pour les éléments qui en contiennent beaucoup (par exemple, Produits et Magasins). Si vous souhaitez obtenir tous ces attributs cachés, vous pouvez définir montrer = tous
dans les paramètres de requête pour l'API
Par exemple, l’API de magasins ne renvoie pas le détailléHeures
attribut par défaut. En mettant montrer = tous
vous allez recevoir détailléHeures
dans la réponse.
Trier
boucle 'https://api.bestbuy.com/v1/products(categoryPath.name="All%20Flat-Panel%20TVs")?format=json&show=sku,name,salePrice&sort=salesRankMediumTerm.asc&apiKey=YourAPIKey'
var bby = exiger('meilleur achat') ('YourAPIKey')
bby.des produits('categoryPath.name = "Tous les téléviseurs à écran plat"'spectacle:'sku, name, salePrice',Trier:'salesRankMediumTerm.asc').puis(une fonction(Les données)
console.bûche(Les données)
);
Répertorie tous les téléviseurs à écran plat avec les prix et les triés selon les produits les plus vendus au cours de la dernière semaine.
{
"de": 1,
"à": dix,
"total": 307,
"page actuelle": 1,
"pages totales": 31,
"temps de requête": "0,005",
"temps total": "0.035",
"partiel": faux,
"canonicalUrl": "/v1/products(categoryPath.name=Tous les téléviseurs à écran plat)? show = nom, nom, prix de vente & sort = salesRankMediumTerm & format = json & apiKey = YourAPIKey",
"des produits": [[[[
"sku": 3356036,
"prénom": "Insignia ™ - Classe 32 " (31-1 / 2 "Diag.) - LED - 720p - 60Hz - HDTV",
"prix de vente": 179.99
,
"sku": 2563138,
"prénom": "Insignia ™ - Classe 48 " (47-5 / 8 "Diag.) - DEL - 1080p - 60Hz - HDTV",
"prix de vente": 399.99
S'applique à: API de produits • API de magasins • API de catégories
Vous pouvez spécifier la manière dont vous souhaitez que les résultats soient triés selon une ou plusieurs valeurs d'attribut.
sort = attribut.asc
– Trier les résultats par ordre croissant de l'attribut spécifiésort = attribut.dsc
– Trier les résultats dans l'ordre décroissant de l'attribut spécifiésort = attribut.desc
– Trier les résultats dans l'ordre décroissant de l'attribut spécifié
Trier par plusieurs attributs
Pour trier selon plusieurs attributs, séparez les termes de tri par des virgules. Les résultats seront initialement triés en fonction du premier attribut dans la direction spécifiée. Ensuite, les résultats dans chaque ensemble seront triés par le deuxième attribut.
sort = attribut1.asc, attribut2.dsc
– Trier par attribut 1 en ordre croissant, puis par attribut 2 en ordre décroissant
Limitation du tri des attributs enfants
Le texte après la période dans le paramètre de tri est interprété comme le sens du tri. Par conséquent, vous ne pouvez pas trier sur un attribut enfant, car celui-ci inclut un point dans son nom.
Facettes
boucle 'https://api.bestbuy.com/v1/products(categoryPath.name="All%20Flat-Panel%20TVs")?format=json&show=sku,name,salePrice&facet=manufacturer,5&apiKey=YourAPIKey'
var bby = exiger('meilleur achat') ('YourAPIKey')
bby.des produits('categoryPath.name = "Tous les téléviseurs à écran plat"'spectacle:'sku, name, salePrice',facette:'fabricant, 5').puis(une fonction(Les données)
console.bûche(Les données)
);
Montrez les 5 fabricants pour lesquels nous avons le plus grand nombre de téléviseurs à écran plat.
"des produits": [[[[
],
"facettes":
"fabricant":
"samsung": 96,
"lg": 46,
"tranchant": 24,
"vizio": 23,
"insigne ™": 18
S'applique à: API de produits • API de magasins • API de catégories
Vous pouvez récupérer des informations récapitulatives sur les éléments renvoyés par votre requête en utilisant le facettes
paramètre de requête.
boucle "https://api.bestbuy.com/v1/products(type=Movie )?format=json&show=sku,name,salePrice&pageSize=3&pagei10&apiKey=YourAPIKey"
var bby = exiger('meilleur achat') ('YourAPIKey')
bby.des produits('type = film'spectacle:'sku, name, salePrice',page:dix,taille de la page:3).puis(une fonction(Les données)
console.bûche(Les données)
);
Dans cet exemple, nous demandons que la 10ème page de résultats et que chaque page ne contienne que 3 produits.
{
"de": 28,
"à": 30,
"total": 101727,
"page actuelle": 1000,
"pages totales": 33909,
"temps de requête": "0.039",
"temps total": "0.048",
"partiel": faux,
"canonicalUrl": "/ v1 / products (type = " Movie ")? show = nom, nom, prix de vente et format = json & pageSize = 3 & page = 10 & apiKey = YourAPIKey",
"des produits": [[[[
"sku": 17215997,
"prénom": "AC / DC: Rock Power (DVD)",
"prix de vente": 11.99
,
"sku": 23003222,
"prénom": "AC / DC: Rocks Detroit (DVD)",
"prix de vente": 10,99
S'applique à: API de produits • API de magasins • API de catégories • API de recommandations • API d'options d'achat
Même si vous avez réduit le nombre de produits renvoyés à l'aide de la recherche, bon nombre de nos API ont le potentiel de générer de nombreux résultats. Pour faciliter la gestion de ces grandes réponses, nous les divisons en pages. Par défaut, nous incluons 10 résultats par page, mais vous pouvez demander jusqu’à 100 par page en utilisant le taille de la page
paramètre. Utilisez le page
paramètre permettant de choisir la page de résultats à renvoyer.
Remarque: Si votre jeu de résultats compte plus de 10 pages, vous devez utiliser le Curseur
paramètre pour parcourir vos résultats. Voir Marques de curseur pour plus d'informations.
Voici une explication des métadonnées lorsque plusieurs pages sont disponibles:
prénom | La description | Détails supplémentaires |
---|---|---|
canonicalURL | la partie non serveur de la requête | |
page actuelle | la page étant retournée | appelé «page.current» pour les API Recommandations et options d'achat |
de | l'index du premier élément retourné sur la page en cours | non disponible sur les API Recommandations et options d'achat |
Taille | le nombre de résultats renvoyés par page | disponible uniquement sur les API Recommandations et options d'achat |
à | l'index du dernier élément retourné sur la page en cours | non disponible sur les API Recommandations et options d'achat |
total | le nombre total d'éléments renvoyés par la requête | appelé «resultSet.count» pour les API Recommandations et options d'achat |
pages totales | le nombre de pages nécessaires pour répertorier tous les éléments | appelé «page.total» pour les API Recommandations et options d'achat |
Marques de curseur
curl -G "https://api.bestbuy.com/v1/products(type=HardGood )?format=json&show=sku,name,salePrice&pageSize=100&apiKey=YourAPIKey" --data-urlencode "cursorMark = *"
var bby = exiger('meilleur achat') ('YourAPIKey')
bby.des produits('type = HardGood'spectacle:'sku, name, salePrice',taille de la page:100,Curseur= *).puis(une fonction(Les données)
console.bûche(Les données)
);
Dans cet exemple, nous demandons que la première page de résultats contienne 100 produits.
{
"nextCursorMark": "AoNeDQhAhoq2MnByb2R1Y3RfMTE0NjYzNV91cw ==",
"total": 49911,
"pages totales": 500,
"temps de requête": "0.037",
"temps total": "0.362",
"partiel": faux,
"canonicalUrl": "/ v1 / products (type = " HardGood ")? show = nom du sku, name, salePrice & pageSize = 100 & cursorMark = * & format = json & apiKey = YourAPIKey",
"des produits": [[[[
"sku": 5477500,
"prénom": "Amazon - Clé USB Fire avec télécommande Alexa Voice - Noir",
"prix de vente": 39.99
,
"sku": 4397400,
"prénom": "Google - Chromecast - Noir",
"prix de vente": 35
,
S'applique à: API de produits • API de magasins • API de catégories
Avec des ensembles de résultats volumineux – par exemple, des ensembles de requêtes de plus de 10 pages de résultats – nous vous recommandons d’utiliser le Curseur
paramètre pour parcourir vos résultats. Vous pouvez utiliser Curseur
pour parcourir le catalogue complet du produit ou du magasin, les deltas depuis la dernière interrogation pour des produits actifs ou tout autre résultat de requête. le Curseur
fonctionne beaucoup comme un signet, en gardant une trace du sous-ensemble d'éléments actuellement affiché dans votre jeu de résultats et de la manière d'atteindre le prochain sous-ensemble d'éléments.
Pour utiliser le Curseur
avec votre jeu de résultats, ajoutez CurseurMark = *
aux paramètres de votre requête. UNE nextCursorMark
Ce paramètre sera inclus dans les métadonnées que vous utiliserez pour parcourir l’ensemble des résultats. Après le résultat initial, remplacez l'astérisque *
avec le nextCursorMark
valeur notée dans les métadonnées actuelles pour passer au sous-ensemble de résultats suivant. Pour chaque sous-ensemble, une nouvelle valeur de hachage sera présentée. Pour éviter les erreurs, veuillez urlencoder le hash retourné lors de son envoi en tant que Curseur
paramètre de requête dans les requêtes suivantes. Lorsque vous atteignez la fin des marques de curseur, vous obtenez un résultat vide.
Pointe: Pour rechercher des mises à jour ou des deltas depuis le dernier passage dans le jeu de résultats, vous pouvez utiliser le itemUpdateDate
attribut. Pour vous assurer que les résultats de votre requête incluent les modifications apportées au statut actif / inactif d'un produit, ajoutez actif = *
aux paramètres de votre requête. Par exemple: ... / v1 / products (itemUpdateDate> 2017-02-06T16: 00: 00 & active = *)? format = json & pageSize = 100 & cursorMark = * & apiKey = YOUR_API_KEY
Voici une explication des métadonnées lorsque plusieurs sous-ensembles sont disponibles:
prénom | La description | Détails supplémentaires |
---|---|---|
canonicalURL | la partie non serveur de la requête | |
Curseur | un hachage indiquant l'emplacement actuel dans l'ensemble de résultats | ajouter CurseurMark = * à votre requête pour obtenir le premier sous-ensemble de résultats |
nextCursorMark | un hachage indiquant le début du prochain sous-ensemble d'éléments de votre jeu de résultats | nous vous recommandons d’avancer dans vos jeux de résultats en utilisant Curseur |
total | le nombre total d'éléments renvoyés par la requête | |
pages totales | le nombre de sous-ensembles d'éléments dans le résultat de la requête complète | peut être utilisé comme une approximation du nombre de marques de curseur que vous devrez parcourir pour parcourir le résultat de la requête en entier |
Récupération de collections
S'applique à: API de produits • API de magasins • API de catégories
Pour récupérer plusieurs éléments à la fois (par exemple, tous les produits de notre catalogue), utilisez l’une des requêtes suivantes. Par défaut, la taille maximale de page est 100 (ce qui signifie 100 résultats uniques). Voir Pagination pour plus d'informations sur le retour des résultats supérieurs à 100.
La description | Question | Résultat |
---|---|---|
récupérer tous les produits | https://api.bestbuy.com/v1/products?apiKey=YourAPIKey | retourne une collection de produits |
récupérer tous les magasins | https://api.bestbuy.com/v1/stores?apiKey=YourAPIKey | retourne une collection de magasins |
récupérer toutes les catégories | https://api.bestbuy.com/v1/categories?apiKey=YourAPIKey | retourne une collection de catégories |
D'autres sections de cette documentation expliquent comment modifier ces requêtes pour extraire uniquement les informations dont vous avez besoin.
- Pagination: décrit comment les résultats consistant en plusieurs pages sont renvoyés.
- Rechercher: décrit comment effectuer des opérations de recherche.
- Trier: décrit comment spécifier les critères de tri pour les collections
- Facettes: décrit comment demander des informations résumées sur les collections
Lorsqu'une requête aboutit à une collection, la réponse comprend un en-tête d'informations contenant les attributs suivants:
prénom | La description |
---|---|
article | le type d'articles retournés et comptés |
page actuelle | la page étant retournée |
pages totales | le nombre de pages nécessaires pour répertorier tous les éléments |
de | l'index du premier élément retourné sur la page en cours |
à | l'index du dernier élément retourné sur la page en cours |
total | le nombre total d'éléments renvoyés par la requête |
queryTime | le temps nécessaire pour rechercher dans la base de données |
temps total | le temps requis pour analyser, rechercher, formater et renvoyer les résultats |
canonicalURL | la partie non serveur de l'URL de requête |
partiel | drapeau indiquant si la requête n'a retourné que des résultats partiels (en cas d'expiration du délai) |
les erreurs
S'applique à: API de produits • API de magasins • API de catégories • API de recommandations
Best Buy utilise des codes de réponse HTTP standard pour indiquer le succès ou l'échec d'une demande d'API. En général, les codes dans la plage 2xx indiquent le succès, les codes dans la plage 4xx indiquent une erreur résultant des informations fournies (par exemple, un paramètre requis était manquant) et les codes dans la plage 5xx indiquent une erreur avec les serveurs de Best Buy.
Code de statut | Explication |
---|---|
200 | Tout va bien. |
400 | La demande manque des informations de clé ou est mal formée. |
403 | La clé API n'est pas valide ou la limite d'appels alloués a été dépassée. |
404 | L'élément demandé est introuvable. |
405 | Méthode particulière non autorisée (une erreur sera renvoyée pour des méthodes comme un POST). |
500, 501, 503 | Il y a une erreur de serveur du côté du meilleur achat. |
Facteur
Voici un ensemble d’exemples de requêtes dans Postman qui vous aideront à maîtriser plus rapidement nos API.
Notes IMPORTANTES
- Vous devez définir
clé API
au sein d'un environnement. - Certaines parties des paramètres de requête pour les API Best Buy sont incluses dans le chemin: (par exemple,
… / V1 /produits (categoryPath.id = pcmcat194000050022 & manufacturer = Apple)? apiKey = apiKey & format = json
). Vous devez mettre à jour les paramètres de chemin d'accès dans la barre grise de Postman qui affiche l'URL.- La v2 de l'API Best Buy déplacera ces paramètres hors du chemin et dans la chaîne de requête.
Obtenir une clé
Avant de pouvoir utiliser nos API, vous devez disposer d’une clé d’API. C'est facile. Il suffit de visiter Clé API GET et inscrivez-vous avec votre adresse email. Nous vous enverrons un courrier électronique avec les instructions pour activer votre nouvelle clé. Une fois que vous avez activé votre clé, vous êtes prêt à rouler.
Créez votre première requête
Après avoir activé votre clé, vous pouvez commencer à accéder aux données de Best Buy.
Essayez notre constructeur de requêtes
Cet outil facile à utiliser vous permettra d'exécuter des requêtes en un rien de temps. L'outil Générateur de requêtes vous guidera dans la création de requêtes personnalisées utilisant la plupart des API Best Buy. Vous pouvez utiliser ces requêtes comme base pour vos propres requêtes personnalisées ou les utiliser pour accéder aux données de l'API Best Buy. Vous pouvez accéder au Générateur de requêtes à partir de notre barre de menus supérieure ou en accédant à Générateur de requêtes.
boucle "https://api.bestbuy.com/v1/products/8880044.json?apiKey=YourAPIKey"
Retourne le document produit pour SKU 8880044.
"sku": 8880044,
"productId": 1484301,
"prénom": "Batman Begins (disque Blu-ray)"
...
Essayez d'accéder directement à l'une de nos API
Utilisez une requête GET de base pour obtenir les données de l'API. Par exemple, pour rechercher des informations sur un produit spécifique, vous pouvez interroger notre API Produits à l'aide du SKU correspondant à ce produit. Le SKU pour Batman Begins (disque Blu-ray) est 8880044, vous pouvez donc le récupérer comme indiqué ci-dessous. La réponse sera renvoyée sous forme de code JSON ou XML en fonction de l'extension spécifiée dans l'URI.
ASTUCE: n’oubliez pas de remplacer Votre APIKey avec la clé API que vous avez reçue de nous.
Rester connecté
Suivez les dernières modifications apportées à nos API via nos notes de publication et notre blog.
Amusez-vous et faites-nous savoir ce que vous pensez. Tirez-nous un email à developer@bestbuy.com, nous tweet à @BestBuyAPI ou visitez le forum de support StackOverflow et partagez vos idées sur la manière dont nous pouvons fournir le meilleur produit. Développons ensemble l’avenir du commerce de détail.
S'applique à: API de produits • API de magasins • API de catégories
La recherche consiste en un ou plusieurs termes qui incluent généralement un attribut, un opérateur et une valeur. Les termes sont combinés avec des esperluettes Et
ou des tuyaux |
. Les recherches sont implémentées dans le cadre d'une requête HTTP GET adressée à l'API Best Buy deisred. terme1 & terme2
– spécifie term1 AND term2 terme1 | terme2
– spécifie terme1 OU terme2.
Attribut des noms Sont sensibles à la casse; attribut valeurs ne sont pas.
Opérateurs disponibles
=
– attribut équivaut à une valeur spécifiée! =
– attribut n'est pas égal une valeur spécifiée>
– attribut plus grand que une valeur spécifiée<
– attribut moins que une valeur spécifiée> =
– attribut Plus grand ou égal à une valeur spécifiée<=
– attribut inférieur ou égal à une valeur spécifiéedans
– recherche basée sur un liste des valeurs d'attribut
Recherche par un seul attribut
boucle "https://api.bestbuy.com/v1/stores(region=ut)?format=json&show=storeId,city,region&apiKey=YourAPIKey"
var bby = exiger('meilleur achat') ('YourAPIKey')
bby.magasins('region = ut'spectacle:'storeId, ville, région').puis(une fonction(Les données)
console.bûche(Les données)
);
{
"de": 1,
"à": dix,
"total": dix,
"page actuelle": 1,
"pages totales": 1,
"temps de requête": "0.002",
"temps total": "0,007",
"partiel": faux,
"canonicalUrl": "/ v1 / stores (region = " ut ")? format = json & show = storeId, ville, région & apiKey = VotreAPIKey",
"magasins": [[[[
"storeId": 1402,
"ville": "Fourchette américaine",
"Région": "UTAH"
,
"storeId": 773,
"ville": "Orem",
"Région": "UTAH"
Nos API de produits, de magasins et de catégories peuvent être recherchées selon presque tous les attributs disponibles. Par exemple, pour rechercher uniquement les magasins situés dans l'Utah, vous pouvez utiliser la requête présentée à droite.
Rechercher par tous les attributs (AND)
boucle 'https://api.bestbuy.com/v1/products(manufacturer=canon&salePrice<1000)?format=json&show=sku,name,salePrice&apiKey=YourAPIKey'
var bby = exiger('meilleur achat') ('YourAPIKey')
bby.des produits('manufacturer = canon & salePrice <1000'spectacle:'sku, name, salePrice').puis(une fonction(Les données)
console.bûche(Les données)
);
{
"de": 1,
"à": dix,
"total": 210,
"page actuelle": 1,
"pages totales": 21,
"temps de requête": "0.095",
"temps total": "0,115",
"partiel": faux,
"canonicalUrl": "/ v1 / produits (fabricant = " canon "& salePrice <1000)? show = nom, nom, prix de vente & format = json & apiKey = YourAPIKey",
"des produits": [[[[
"sku": 6101087,
"prénom": "Canon - Objectif de téléobjectif 1.9x",
"prix de vente": 99.99
,
"sku": 8795075,
"prénom": "Canon - Paquet de 100 papier photo glacé 4" x 6 ",
"prix de vente": 17.49
Si vous devez rechercher les valeurs de plus d’un attribut et tout des attributs doivent être présents, combinez-les avec une esperluette Et
.
Recherche par tous les attributs (OU)
boucle "https://api.bestbuy.com/v1/products(wifiReady=true|wifiBuiltIn=true)?format=json&show=sku,name,salePrice&apiKey=YourAPIKey"
var bby = exiger('meilleur achat') ('YourAPIKey')
bby.des produits('wifiReady = true | wifiBuiltIn = true'spectacle:'sku, name, salePrice').puis(une fonction(Les données)
console.bûche(Les données)
);
{
"de": 1,
"à": dix,
"total": 500,
"page actuelle": 1,
"pages totales": 50,
"temps de requête": "0,005",
"temps total": "0.030",
"partiel": faux,
"canonicalUrl": "/ v1 / products (wifiReady = true | wifiBuiltIn = true)? show = nom, nom, prix de vente et format = json & apiKey = YourAPIKey",
"des produits": [[[[
"sku": 1012749,
"prénom": "Acer - Tablette Aspire 11,6 pouces avec 120 Go de mémoire",
"prix de vente": 661,98
,
"sku": 4255007,
"prénom": "Acer - B1-720 7 " Tablette Android - 16 Go - Gris Ferré ",
"prix de vente": 128,98
Si vous voulez des articles avec tout des attributs spécifiés, combinez-les avec un tuyau |
Recherches complexes
boucle "https://api.bestbuy.com/v1/products(platform=psp&(salePrice<=15|(salePrice<=20&inStorePickup=true))?format=json&show=sku,name,salePrix,inStorePick,inStorePickup,platform&apiKey=y "
var bby = exiger('meilleur achat') ('YourAPIKey')
bby.des produits('platform = psp & (salePrice <= 15 | (salePrice <= 20 & inStorePickup = true))'spectacle:'sku, name, salePrice, inStorePickup, plateforme').puis(une fonction(Les données)
console.bûche(Les données)
);
[[[[
"sku":8005115,
"prénom":"Lumines II - PSP",
"prix de vente":9,99,
"Ramassage en magasin":vrai,
"Plate-forme":"PSP"
,
"sku":8376027,
"prénom":"Quotient d'intelligence pratique 2 - PSP",
"prix de vente":14.99,
"Ramassage en magasin":vrai,
"Plate-forme":"PSP"
,
"sku":9335436,
"prénom":"Maître d'échecs: l'art d'apprendre - PSP",
"prix de vente":9,99,
"Ramassage en magasin":vrai,
"Plate-forme":"PSP"
]
Des recherches complexes peuvent être effectuées en combinant ET Et
et OU |
opérations avec des parenthèses. Par exemple, supposons que vous recherchiez un jeu vidéo Play Station Portable. (plateforme = psp)
. Vous ne voulez pas dépenser plus de 15 $ (salePrice <= 15)
. Cependant, étant donné que vous échangerez le jeu lorsque vous aurez terminé, vous pourriez dépenser jusqu’à 20 $. (salePrice <= 20)
. Vous voulez également vous assurer que le jeu est disponible pour l'achat en ligne et le ramassage en magasin (inStorePickup = true)
.
Les termes de recherche pour cet exemple peuvent être combinés comme suit:
platform = psp & (salePrice <= 15 | (salePrice <= 20 & inStorePickup = true))
Recherche par période
boucle "https://api.bestbuy.com/v1/products(releaseDate>=2014-02-01&releaseDate<=2014-02-28)?format=json&show=sku,name,salePrice&apiKey=YourAPIKey"
var bby = exiger('meilleur achat') ('YourAPIKey')
bby.des produits('releaseDate> = 2014-02-01 & releaseDate <= 2014-02-28'spectacle:'sku, name, salePrice').puis(une fonction(Les données)
console.bûche(Les données)
);
{
"de": 1,
"à": dix,
"total": 4407,
"page actuelle": 1,
"pages totales": 441,
"temps de requête": "0.064",
"temps total": "0,226",
"partiel": faux,
"canonicalUrl": "/ v1 / products (releaseDate> = 2014-02-01 & releaseDate <= 2014-02-28)? show = sku, name, salePrice & format = json & apiKey = YourAPIKey",
"des produits": [[[[
"sku": 24311154,
"prénom": "# lovestrock-CD",
"prix de vente": 22.99
,
"sku": 23374755,
"prénom": "(Sans titre) - CD",
"prix de vente": 39.99
Si vous souhaitez rechercher tous les produits publiés en février 2014, utilisez cette requête:
Recherche par date par rapport à aujourd'hui
boucle "https://api.bestbuy.com/v1/products(releaseDate>aujourd'hui )?format=json&show=sku,name,salePrice&apiKey=YourAPIKey"
var bby = exiger('meilleur achat') ('YourAPIKey')
bby.des produits('releaseDate> aujourd'hui'spectacle:'sku, name, salePrice').puis(une fonction(Les données)
console.bûche(Les données)
);
{
"de": 1,
"à": dix,
"total": 7688,
"page actuelle": 1,
"pages totales": 769,
"temps de requête": "0,007",
"temps total": "0.032",
"partiel": faux,
"canonicalUrl": "/ v1 / products (releaseDate> today)? show = nom, nom, prix de vente et format = json & apiKey = YourAPIKey",
"des produits": [[[[
"sku": 24987148,
"prénom": "$ Ellebrity (DVD)",
"prix de vente": 19.99
,
"sku": 6121399,
"prénom": "Et ensuite, vous tirez sur votre cousin - CD",
"prix de vente": 12.99
Vous pouvez également utiliser la valeur aujourd'hui
pour représenter le jour actuel. Si vous souhaitez voir tous les produits publiés aujourd'hui, utilisez cette requête.
Rechercher plusieurs valeurs d'attribut
boucle "https://api.bestbuy.com/v1/products(categoryPath.id=abcat0901005&color%20in(white,bisque,staneous-steel))?format=json&show=sku,name,salePrice&apiKey=yourAPIKey"
var bby = exiger('meilleur achat') ('YourAPIKey')
bby.des produits('categoryPath.id = abcat0901005 & couleur en (blanc, bisque, acier inoxydable)'spectacle:'sku, name, salePrice').puis(une fonction(Les données)
console.bûche(Les données)
);
{
"de": 1,
"à": dix,
"total": 52,
"page actuelle": 1,
"pages totales": 6,
"temps de requête": "0,007",
"temps total": "0.033",
"partiel": faux,
"canonicalUrl": "/v1/products(categoryPath.id=abcat0901005&color in (" white ", " bisque ", " stainless-steel "))? show = sku, name, salePrice & format = json & apiKey = YourAPIKey",
"des produits": [[[[
"sku": 1614013,
"prénom": "Amana - Réfrigérateur côte à côte de 25,4 pi³ avec de la glace et de l'eau à travers la porte - Acier inoxydable",
"prix de vente": 1099.99
,
"sku": 1609858,
"prénom": "Amana - Réfrigérateur côte à côte de 25,4 pi³ avec de la glace et de l'eau à travers la porte - Blanc",
"prix de vente": 999.99
Si vous souhaitez plusieurs valeurs d'un même attribut, vous pouvez les spécifier individuellement. Par exemple, si vous souhaitez voir des réfrigérateurs côte à côte blancs, en biscuit ou en acier inoxydable, utilisez cette requête.
REMARQUE: pour rechercher des produits sur la base d’une liste de valeurs d’attributs, nous vous recommandons d’utiliser le dans
opérateur. La plupart des attributs peuvent être utilisés avec le dans
opérateur. L'attribut le plus couramment utilisé est SKU
. En utilisant le dans
l'opérateur aide à éviter les erreurs de requête par seconde (QPS).
Par exemple: https://api.bestbuy.com/v1/products(sku in (43900,2088495,7150065))? apiKey = YourAPIKey
Wildcards – La valeur est présente
boucle "https://api.bestbuy.com/v1/products(categoryPath.id=abcat0502000&driveCapacityGb=*??format=json&show=sku,name,salePrice&apiKey=YourAPIKey"
var bby = exiger('meilleur achat') ('YourAPIKey')
bby.des produits('categoryPath.id = abcat0502000 & driveCapacityGb = *'spectacle:'sku, name, salePrice').puis(une fonction(Les données)
console.bûche(Les données)
);
{
"de": 1,
"à": dix,
"total": 381,
"page actuelle": 1,
"pages totales": 39,
"temps de requête": "0,008",
"temps total": "0.039",
"partiel": faux,
"canonicalUrl": "/v1/products(categoryPath.id=abcat0502000&driveCapacityGb=*)?show=sku,name,salePrice&format=json&apiKey=YourAPIKey",
"des produits": [[[[
"sku": 4591017,
"prénom": "Acer - 11.6 " Chromebook à écran tactile - Intel Celeron - Mémoire de 2 Go - Disque SSD de 32 Go - Blanc Moonstone ",
"prix de vente": 299.00
,
"sku": 5009309,
"prénom": Ordinateur portable à écran tactile "Acer - 14 " - Intel Core i5 - Mémoire de 6 Go - Disque dur 500 Go + Disque SSD de 20 Go - Argent ",
"prix de vente": 740.98
Vous pouvez utiliser l'astérisque *
en tant que caractère générique. Le caractère générique peut être utilisé pour:
- indiquer la présence de valeurs d'attribut
- demander toutes les valeurs pour les attributs filtrés
- tokenize la chaîne et représenter des caractères supplémentaires
Certains attributs s'appliquent uniquement à des éléments spécifiques. Même dans ce cas, étant donné qu'une grande partie de ces informations d'attribut provient du fabricant, tous les éléments d'un type donné n'auront pas de valeurs définies pour cet attribut. Vous pouvez utiliser le caractère générique pour spécifier des éléments contenant des données pour un attribut spécifique.
attribut = *
– demande des éléments pour lesquels l'attribut a des valeursattribut! = *
– demande des éléments pour lesquels l'attribut n'a pas de valeur
Wildcards – La valeur n'est pas présente
boucle "https://api.bestbuy.com/v1/products(categoryPath.id=abcat0502000&driveCapacityGb!=*??format=json&show=sku,name,salePrice&apiKey=YourAPIKey"
var bby = exiger('meilleur achat') ('YourAPIKey')
bby.des produits('categoryPath.id = abcat0502000 & driveCapacityGb! = *'spectacle:'sku, name, salePrice').puis(une fonction(Les données)
console.bûche(Les données)
);
{
"de": 1,
"à": dix,
"total": 42,
"page actuelle": 1,
"pages totales": 5,
"temps de requête": "0,007",
"temps total": "0,270",
"partiel": faux,
"canonicalUrl": "/v1/products(categoryPath.id=abcat0502000&driveCapacityGb!=*)?show=sku,name,salePrice&format=json&apiKey=YourAPIKey",
"des produits": [[[[
"sku": 6941496,
"prénom": "Apple® - MacBook Pro avec écran Retina - 13.3 " Écran - 4 Go de mémoire - Stockage Flash de 128 Go ",
"prix de vente": 1299.99
,
"sku": 6293168,
"prénom": "Apple® - MacBook Pro avec écran Retina - 13.3 " Écran - 8 Go de mémoire - Stockage Flash de 256 Go ",
"prix de vente": 1499.99
Cela retournera des résultats dans lesquels aucune valeur n'est présente. Dans l'exemple suivant, avec l'ajout du !
, le résultat renvoyé est passé de Solid State Drive.
Wildcards – String
boucle 'https://api.bestbuy.com/v1/products(longDescription=iPhone*|sku=7619002)?show=sku,name&pageSize=15&page=5&apiKey=YourAPIKey&format=json'
var bby = exiger('meilleur achat') ('YourAPIKey')
bby.des produits('longDescription = iPhone * | sku = 7619002'spectacle:'sku, name',taille de la page:15,page:5).puis(une fonction(Les données)
console.bûche(Les données)
);
"de": 61,
"à": 75,
"total": 2753,
"page actuelle": 5,
"pages totales": 184,
"temps de requête": "0.010",
"temps total": "0.045",
"partiel": faux,
"canonicalUrl": "/ v1 / products (longDescription = " iPhone * "
Lorsqu'il est utilisé dans une recherche de chaîne, le caractère générique remplit deux fonctions. Tout d'abord, il tokenise la chaîne en la divisant en mots. Deuxièmement, il fonctionne comme un caractère générique standard, correspondant à n’importe quel jeu de caractères de la chaîne à jeton. L'exemple suivant illustre les deux fonctions. When searching for a string value, you may want to search for variations on a specific word.
There are several description attributes by which you can search, including longDescription
, shortDescription
, la description
ou prénom
. There is a single SKU
attribute to search based on SKU
.
In this example we are searching the longDescription
for iPhone*. We have appended iPhone with a wildcard *
so we can search for iPhones with any suffix. We are also looking for any products that have a SKU with a value of 7619002 – note the ou |
. Finally, in our example we have updated the number of results that can be returned per page to 15. Our search will return page 5 of the total 184 pages. Additional information on how to specify the number of results that should be returned per page and which page to return can be found in our Pagination section.
Wildcard – Limitations
- You cannot use a wildcard to begin a string search (e.g.
(name=*top)
) this type of search is extremely resource intensive and doing so will result in a400
error. - Wildcard with data is valid for strings only. When used alone, the wildcard can represent any data type. When used with other characters, the wildcard can only represent string data. For example, to find Canon products with customer reviews of 4.x, you cannot use
(manufacturer=canon&customerReviewAverage=4.*)
as the search string. You would have to use a search string like this:(manufacturer=canon&customerReviewAverage>4&customerReviewAverage.
Filtered product attribute
Certain attributes, such as active=true
, digital=false
ou preowned=false
inherently filter results.
If your search string is sku=*
, you will only return active products, not all products. This is the same as specifying sku=*&active=true
. If you want a list of all active and inactive products, you can specify sku=*&active=*
.
Parce que actif
is a boolean attribute, active=*
will return products for which actif
is either true or false. It’s the same as sku=*&(active=true|active=false)
.
If your search string goes to sku.xml or sku.json these filters are ignored.
Keyword Search Function
boucle "https://api.bestbuy.com/v1/products(search=oven&search=stainless&search=steel)?format=json&show=sku,name,salePrice&apiKey=YourAPIKey"
var bby = exiger('bestbuy')('YourAPIKey')
bby.des produits('search=oven&search=stainless&search=steel',spectacle:'sku,name,salePrice').puis(une fonction(Les données)
console.bûche(Les données)
);
This example looks for ‘stainless steel ovens’.
{
"products": [[[[
"sku": 6916066,
"name": "Amana - 30 Self-Cleaning Freestanding Electric Range - Stainless-Steel",
"salePrice": 584.99
,
"sku": 2267329,
"name": "Applica - 4-Slice Toaster Oven - Stainless Steel",
"salePrice": 39.99
Applies to: Products API
Notre Keyword Search une fonction (search=searchterm)
allows you to search text accross several common attributes. To search for a term that includes a space, include an Et
ampersand between the words or it will be treated as an |
or. le Keyword Search includes the following attributes:
prénom
fabricant
shortDescription
longDescription
features.feature
details.value
Search on Reviews
boucle "https://api.bestbuy.com/v1/products(customerReviewAverage>=4&customerReviewCount>100)?show=customerReviewAverage,customerReviewCount,name,sku&format=json&apiKey=YourAPIKey"
var bby = exiger('bestbuy')('YourAPIKey')
bby.des produits('customerReviewAverage>=4&customerReviewCount>100',spectacle:'customerReviewAverage,customerReviewCount,name,sku').puis(une fonction(Les données)
console.bûche(Les données)
);
"products": [[[[
"customerReviewAverage": "4.1",
"customerReviewCount": 411,
"name": "Insignia™ - Soundbar Home Theater Speaker System",
"sku": 4841342
,
"customerReviewAverage": "4.3",
"customerReviewCount": 411,
"name": "Sunpak - PlatinumPlus 6000PG 61" Tripod",
"sku": 1205204
]
To search for products based on customer review criteria, you can use the customerReviewAverage
and/or the customerReviewCount
attributes. You can also limit the product information returned using our spectacle
functionality. HINT: You can specify additional attributes in your search or to be included in the response document for most attributes in the Products API.
In this example, we are searching for all products that have a customer review average greater than four and a customer review count greater than 100. In addition, we are limiting the product information returned to customer review average, customer review count, name and sku, and forcing a format of json (default is xml when using the Products API).
The Best Buy Product API provides a simple, REST-based interface for our entire product catalog, past and present. This includes pricing, availability, specifications, descriptions, and images for more than one million current and historical products. Most product information is updated near real-time, including product pricing.
PLEASE NOTE: Music and movie data may be used only where an ability to purchase the related music or movies from BESTBUY.COM is provided to end users. Developers using music and movie data to redirect to BESTBUY.COM must become members of the Best Buy Affiliate Program to allow the sale of music and movies through BESTBUY.COM under the terms of the Affiliate Program.
Detail
The Best Buy Detail attributes contain a wealth of knowledge about Best Buy products. The intention of these attributes is to provide product descriptions, dimensions, accessories and reviews.
Attribute List
Attribute | La description | Type |
---|---|---|
accessories.sku | Collection of SKUs that could be an accessory to originating SKU | longue |
Couleur | Product color | chaîne |
état | Identifies if the product is new, refurbished or pre-owned | chaîne |
customerReviewAverage | Average “score” or ratings as submitted by reviewers | flotte |
customerReviewCount | Number of customer reviews | entier |
customerTopRated | Identifies if the product is top rated based on ratings from reviewers. If the Avg rating >= 4.5 and Qty of ratings >= 15, customerTopRated is set to be “true”, else is set to “false” | booléen |
profondeur | Product depth (inches) | chaîne |
la description | Product description | chaîne |
details.name | Collection of details about product (Example: whether a camera has a zoom) | chaîne |
details.value | Collection of values that support the product (Example: A camera’s number of Megapixels or amount of zoom) | chaîne |
numérique | Identifies if product is available in a digital format | booléen |
features.feature | Collection of product features | chaîne |
format | Identifies media product format | chaîne |
la taille | Product height (inches) | chaîne |
includedItemList.includedItem | Collection of items included with product (Example: Canon EOS 60D Digital SLR Camera, EF-S 18-135mm IS lens, Battery pack, Battery charger) | chaîne |
longDescription | Detailed product description | chaîne |
longDescriptionHtml | Detailed product description with HTML formatting | chaîne |
fabricant | Product manufacturer | chaîne |
modelNumber | Manufacturer product model number | chaîne |
prénom | Product name | chaîne |
preowned | Identifies if product has been previously owned (used) | booléen |
productVariations.sku | Collection of related SKUs that are variations (e.g. color, size) of the originating SKU | longue |
quantityLimit | Maximum quantity of product that can be ordered | entier |
releaseDate | Date the product was released | rendez-vous amoureux |
shortDescription | Brief product description | chaîne |
shortDescriptionHtml | Brief product description (HTML formatting) | chaîne |
sku | Best Buy unique 7-digit product identifier | longue |
upc | Universal Product Code (UPC) | chaîne |
warrantyLabor | Manufacture labor warranty description | chaîne |
warrantyParts | Manufacture parts warranty description | chaîne |
poids | Product weight | chaîne |
largeur | Product width (inches) | chaîne |
California Proposition 65
California Proposition 65 (CA Prop 65) is a California regulation requiring businesses with 10 or more employees to provide a “clear and reasonable warning” before knowingly and intentionally exposing individuals in California to a chemical listed by the state as known to cause cancer or reproductive toxicity. The CA Prop 65 regulation provides safe harbor warnings that meet the “clear and reasonable warning” requirement. As of August 30, 2018, these safe harbor warnings require either a short-form warning or a chemical-specific warning for any product containing a listed chemical. Websites and mobile applications that sell products must provide the same warning that is displayed on the product and/or product packaging.
In order to comply with CA Prop 65, the warning is required for all products offered for purchase. The warning may be implemented by displaying the CA Prop 65 warning at a point prior to purchase of an affected product to (a) all customers, or (b) only to customers who enter a California ship-to address.
Best Buy’s Products API provides the following fields for this purpose:
Attribute List
Attribute | La description | Type |
---|---|---|
proposition65WarningMessage | A custom warning message which can be up to 360 characters. It can be null/empty depending on the product. | chaîne |
proposition65WarningType | Values of 01 to 05 indicating the type of warning required for this product. This field will ALWAYS contain a value. 01 – None (There is no warning message required for this product) 02 – Cancer 03 – Reproductive Harm 04 – Cancer and Reproductive Harm 05 – Unknown (We currently do not have information about warnings on this product) |
chaîne |
For more information on this regulation including the list of chemicals, please go to https://oehha.ca.gov/proposition-65.
Pricing and Sales Ranking
Best Buy’s Pricing attributes make it easy to identify the product price, if a product is on sale, how much you can save and even when we made our last pricing changes. We also provide sales ranking over given time periods so you can have an idea of the best-sellers.
Attribute | La description |
---|---|
bestSellingRank | Ranks products by number of units sold |
contracts.type | Type of contract for Mobile phone |
contracts.prices | Regular and current monthly contract pricing for Mobile phone |
contracts.priceNote | Description of contract pricing for Mobile phone |
dollarSavings | Identifies amount saved |
lowPriceGuarantee | Identifies if a product qualifies for the Best Buy low price guarantee |
onSale | Identifies if sale price is less than regular price |
percentSavings | Identifies the percent saved between the regularPrice and salePrice |
priceRestriction | Identifies product sale price display restrictions (guidelines for displaying lowest salePrice are sent to developers with privileged keys):
|
priceUpdateDate | Date and time product price was last updated |
priceWithPlan.newTwoYearPlan | Mobile phone price when purchased with new 2-year plan |
priceWithPlan.upgradeTwoYearPlan | Mobile phone price when purchased with 2-year upgrade plan |
priceWithPlan.newTwoYearPlanSalePrice | Mobile phone sale price when purchased with 2-year plan |
priceWithPlan.upgradeTwoYearPlanSalePrice | Mobile phone sale price when purchased with 2-year upgrade plan |
priceWithPlan.newTwoYearPlanRegularPrice | Mobile phone price when purchased with new 2-year plan |
priceWithPlan.upgradeTwoYearPlanRegularPrice | Mobile phone price when purchased with 2-year upgrade plan |
regularPrice | Product’s regular selling price |
salePrice | Current item selling price |
salesRankLongTerm | Sales rank over past 5-21 days |
salesRankMediumTerm | Sales rank over past 2-4 days |
salesRankShortTerm | Sales rank over past day |
Disponibilité
The Availability attributes provide details into which products can be purchased online and which products can be picked up in stores.
Note: For store-specific availability, please refer to our Stores API documentation.
Attribute | La description |
---|---|
friendsAndFamilyPickup | Identifies if a product is eligible for friends and family pickup |
homeDelivery | Identifies if a product must be fulfilled using home delivery instead of shipping |
inStoreAvailability | Identifies if a product is available for purchase in a Best Buy store |
inStoreAvailabilityUpdateDate | Provides date and time inStoreAvailability last updated |
inStorePickup | Identifies if a product can be purchased online and picked up in a store |
onlineAvailability | Identifies if a product can be purchased online |
onlineAvailabilityUpdateDate | Provides date and time onlineAvailability was last updated |
orderable | Product ordering status |
specialOrder | Identifies whether a product will require special handling for delivery |
Shipping and Delivery
The Shipping and Delivery attributes provide details about the cost of shipping or delivery of a product. A product can be shippable or deliverable, but not both.
Sample
shippingLevelsOfService
réponse
"shippingLevelsOfService":[[[[
"serviceLevelId": 1,
"serviceLevelName": "Standard",
"unitShippingPrice": 2.99
,
"serviceLevelId": 3,
"serviceLevelName": "Expedited",
"unitShippingPrice": 10,99
,
"serviceLevelId": 5,
"serviceLevelName": "Express",
"unitShippingPrice": 14.99
]
Attribute | La description |
---|---|
freeShipping | Identifies if a product qualifies for free shipping |
freeShippingEligible | Identifies if a product is currently eligible to receive free shipping from an existing offer |
shippingCost | Provides product’s lowest shipping costs |
shippingWeight | Identifies product’s shipping weight (pounds) |
shippingLevelsOfService | An array of shipping options |
shippingLevelsOfService.serviceLevelId | ID of the shipping level of service |
shippingLevelsOfService.serviceLevelName | Name of the shipping level of service |
shippingLevelsOfService.unitShippingPrice | Price of the shipping level of service |
Images
The Images attributes provide multiple images for a product. These include large, small, and side images and even interactive 360 degree images.
Attribute | La description |
---|---|
accessoriesImage | URL of accessories image |
alternateViewsImage | URL of alternate image |
angleImage | URL of product’s angle image |
backViewImage | URL of rear image |
energyGuideImage | URL of product’s EnergyGuide image |
image | URL of BESTBUY.COM product detail page image |
largeFrontImage | URL of large front image |
largeImage | URL of image |
leftViewImage | URL of left image |
mediumImage | URL of medium image |
remoteControlImage | URL of remote control image |
rightViewImage | URL of right image |
spin360Url | URL of 360-degree image |
thumbnailImage | URL of image used on BESTBUY.COM listing pages |
topViewImage | URL of top image |
Liens
The Links attributes provide a way for you to direct customers to a BESTBUY.COM product detail page or create a BESTBUY.COM cart on their behalf while including the product in the cart.
Attribute | La description |
---|---|
addToCartUrl | URL to BESTBUY.COM with item in cart |
url | URL to BESTBUY.COM product detail page |
For our affiliate partners we provide this same functionality but use a special link so you can get credit for your sale. Affiliates add their LinkShare Affiliate Tracking Code (LID) to their query request. The URL generated will direct the customer to BESTBUY.COM with this item in their cart and credit the affiliate with the sale. Additional information on the affiliate program can be found here.
Attribute | La description |
---|---|
linkShareAffiliateAddToCartUrl | URL to BESTBUY.COM with item in cart |
linkShareAffiliateUrl | URL to BESTBUY.COM product detail page |
Categorizations
Best Buy provides multiple ways to group products based on your needs.
The department, class and subclass attributes provide categorization structure or groupings of products. These attributes are returned as separate attributes but are related. The department attribute provides the more general categorization while the class and subclass attributes narrow the focus to be more specific. The class and subclass attributes are less volatile than category attributes and are the recommended attributes for grouping products.
Attribute | La description | Type |
---|---|---|
classe | Class name | chaîne |
classId | Class identifiers | entier |
département | Department name | chaîne |
departmentId | Department identifiers | entier |
sous-classe | Subclass name | chaîne |
subclassId | Subclass identifier | entier |
The categoryPath attributes provide a hierarchal view of a product returned as a collection. The collections start with the most general categorization, while subsequent categories narrow to be more specific. The number of categories returned can be 3+ layers deep. The products within the categories also tend to be slightly more volatile than department, class and subclass groupings.
Attribute | La description | Type |
---|---|---|
categoryPath.id | Category identifiers | chaîne |
categoryPath.name | Category names | chaîne |
The list attributes are used for specific events such as Valentine’s Day. These lists are curated by Best Buy merchant teams for customer visibility for a specific event or purpose.
Attribute | La description | Type |
---|---|---|
lists.endDate | End date shown in list | chaîne |
lists.listId | Name shown in list | chaîne |
lists.startDate | Start date shown in list | chaîne |
Offers and Deals
The Best Buy offer attributes provide a comprehensive view into the deals at Best Buy. This includes what is in our Sunday circular (also available online), our “Deal of the Day” and other special offers like “Free Shipping on Orders $35 and Up.” Each offer will contain a description of the offer and a link to the offer on BESTBUY.COM where applicable. Offer information is grouped together in a collection. Each product can have one or more offers associated to it.
NOTE: Offers are updated on a daily basis. Offers are subject to change and applicability will be determined at checkout.
Attributes | La description |
---|---|
offers.endDate | Date de fin de l'offre |
offers.id | Offer identifier |
offers.startDate | Offer start date |
offers.text | Description of offer |
offers.type | Offer types can include the following:
|
offers.url | URL of offer information on BESTBUY.COM |
Listing Products
We offer various metadata to support you when listing Best Buy products. This includes information such as whether a product is active, if it is new or refurbished, the type of product (music, movie, hardgood, bundle, game, blacktie, or software) and more.
Attribute | La description | Type |
---|---|---|
actif | Identifies if product is currently supported in the BESTBUY.COM catalog | booléen |
activeUpdateDate | Date and time the active attribute was last changed | rendez-vous amoureux |
bundledIn.sku | Returns SKUs of bundles that that include this product | longue |
itemUpdateDate | Date and time any change was made to this product | rendez-vous amoureux |
members.sku | Collection of skus within a bundle | longue |
Nouveau | Identifies if the product was added within last 30 days | booléen |
secondaryMarket | Identifies if product is a secondary market product | booléen |
startDate | Date Best Buy began selling product | rendez-vous amoureux |
type | Best Buy product type, see section below for more details | chaîne |
Product Type Details
Valeur | La description |
---|---|
blackTie | Extended warranty services provided by the Best Buy GeekSquad team |
paquet | A group of products; group can include both material and digital products |
Jeu | Games; includes both material and digital (downloadable) game products |
hardgood | Products that are not of type music, movie, game, blackTie, software or bundle |
film | Movies; inclues both material and digital (downloadable) movie products |
la musique | Music; includes both material and digital (downloadable) music products |
Logiciel | Software; includes material and digital (downloadable) software products |
Warranties
The Warranties endpoint within the Best Buy Products API helps you access a list of warranties associated with a Best Buy product, along with select data associated with the warranty. For more detailed information about a specific warranty, you can look at that warranty by SKU in our Products endpoint.
Search for warranties associated with SKU 5005633
boucle "https://api.bestbuy.com/v1/products/5005633/warranties.json?apiKey=YourAPIKey"
[{[{[{[
"skuId": "2745188",
"shortName": "1-Year Accidental Geek Squad Protection",
"currentPrice": 149.99,
"type": "GSP",
"department": "7",
"subclass": "210",
"protectionType": "Accidental",
"paymentType": "ONETIME",
"term": "12 months",
"class": "332"
]
Common Attributes
Attribute | La description | Type |
---|---|---|
protectionType | Collection of warranties offering specific protections | chaîne |
paymentType | Collection of warranties available with a specific type of payment | chaîne |
terme | Collection of warranties available for a certain length of time | chaîne |
Remarque: Descriptions of other warranty-related attributes, including skuId
, shortName
, currentPrice
, type
, département
, classe
, et sous-classe
can be found in our core Products documentation.
The Buying Options API helps you access some of our best deals. This is where you’ll find information about ship-from-store eligible Open Box products including availability, condition and special pricing, with more to come as we build out this API further. Our Open Box endpoints provide access to several categories of Best Buy merchandise, similar to the “Buying Options” tab on BESTBUY.COM product detail pages. We typically have multiple Open Box products for a single SKU. When a customer purchases an Open Box product on BESTBUY.COM we ship from the closest Best Buy store based on the customer shipping address. To assist in selecting the correct Open Box product we assign a condition of “excellent or certified” to the product in every Open Box offer.
- “excellent” – products that look brand new in appearance, with no physical flaws, scratches or scuffs and include all original parts and accessories
- “certified” – products that have passed the Geek Squad Certification process.
We have split Open Box into multiple endpoints:
- le Open Box Single SKU endpoint lets you query for a specific product using the product identifier (SKU) for any available Open Box offers.
- le Open Box by list of SKUs endpoint lets you query for a list of products using product identifier (SKU) for any available Open Box offers.
- le Open Box by Category endpoint lets you query for a set of products based on their categories.
All responses returned will be in a json format. In addition, we only return results for available product. We check for newly available product every five minutes. If you are an affiliate partner please see the Affiliate FAQ for instructions on proper use.
Common Attributes
Attribute | La description |
---|---|
customerReviews.averageScore | Provides an average of all the ratings submitted for a product by reviewers. The customer can rate the product on a scale of 1-5 where 5 is the highest. Ratings may be returned using decimals |
customerReviews.count | The total number of reviews collected |
descriptions.short | A brief description of a product |
images.standard | URL of BESTBUY.COM product detail page image |
links.product | Link to the specific product in the Products API using a product identifier (SKU) |
links.web | Link to the BESTBUY.COM product detail page using the Buying Options tab |
links.addToCart | URL to BESTBUY.COM with item in cart |
names.title | Name of the product |
offers.condition | The condition attribute will either be “excellent” (products that look brand new in appearance,with no physical flaws, scratches or scuffs and include all original parts and accessories) or “certified” (products that have passed the Geek Squad Certification process) |
offers.prices.current, | “Open box” product’s current selling price |
offers.prices.regular | “Open box” product’s regular selling price |
prices.current | “New” product’s current selling price |
prices.regular | “New” product’s regular selling price |
sku | Unique identifier for products sold by Best Buy |
Open Box Single SKU
boucle "https://api.bestbuy.com/beta/products/8610161/openBox?apiKey=YourAPIKey"
var bby = exiger('bestbuy')('YourAPIKey')
bby.openBox(8610161).puis(une fonction(Les données)
console.bûche(Les données)
);
Search all open box offers for SKU 8610161. We can see there are at least two offers excellent et agréé.
"results": [[[[
"customerReviews":
"averageScore": "4.5",
"count": 471
,
"descriptions":
"short": "Google Chrome 64-bitTechnical details: Intel® Celeron® processor; 11.6" display; 2GB memory; 16GB eMMC flash memorySpecial features: Bluetooth; HDMI outputNote: DVD/CD drive not included"
,
"images":
"standard": "http://img.bbystatic.com/BestBuy_US/images/products/8610/8610161_rc.jpg"
,
"links":
"product": "https://api.bestbuy.com/v1/products/8610161.json?apiKey=YourAPIKey",
"web": "http://www.bestbuy.com/site/acer-11-6-chromebook-intel-celeron-2gb-memory-16gb-emmc-flash-memory-moonstone-white/8610161.p?id=1219351773817&skuId=8610161&cmp=RMX&ky=2l9pmD3wUBb9cc0tkHo49KBFCMPCiIPY4#tab=buyingOptions",
"addToCart": "https://api.bestbuy.com/click/-/8610161/cart"
,
"names":
"title": "Acer - 11.6" Chromebook - Intel Celeron - 2GB Memory - 16GB eMMC Flash Memory - Moonstone White"
,
"offers": [[[[
"condition": "excellent",
"prices":
"current": 175.99,
"regular": 199
,
"condition": "certified",
"prices":
"current": 187.99,
"regular": 199
],
"prices":
"current": 199,
"regular": 199
,
"sku": "8610161"
]
The Open Box Single SKU endpoint allows you to query by SKU all Open Box offers associated with a SKU. If there are no Open Box offers available, the query will return a HTTP 200 response code with an empty result set.
Open Box by List of SKUs
boucle "https://api.bestbuy.com/beta/products/openBox(sku%20in(5729048,7528703,4839357,8153056,8610161))?apiKey=YourAPIKey"
var bby = exiger('bestbuy')('YourAPIKey')
bby.openBox('sku in(5729048,7528703,4839357,8153056,8610161)').puis(une fonction(Les données)
console.bûche(Les données)
);
Returns available Open Box offers for 5 different SKUs
{
"metadata":
"resultSet":
"count": 6
,
"context":
"canonicalUrl": "https://api.bestbuy.com/beta/products/openBox(sku%20in(5729048,7528703,4839357,8153056,8610161,4591017))?apiKey=YourAPIKey"
,
"results": [[[[
"customerReviews":
"averageScore": "4.5",
"count": 471
,
"descriptions":
"short": "Google Chrome 64-bitTechnical details: Intel® Celeron® processor; 11.6" display; 2GB memory; 16GB eMMC flash memorySpecial features: Bluetooth; HDMI outputNote: DVD/CD drive not included"
,
"images":
"standard": "http://img.bbystatic.com/BestBuy_US/images/products/8610/8610161_rc.jpg"
,
"links":
"product": "https://api.bestbuy.com/v1/products/8610161.json?apiKey=YourAPIKey",
"web": "http://www.bestbuy.com/site/acer-11-6-chromebook-intel-celeron-2gb-memory-16gb-emmc-flash-memory-moonstone-white/8610161.p?id=1219351773817&skuId=8610161&cmp=RMX&ky=2l9pmD3wUBb9cc0tkHo49KBFCMPCiIPY4#tab=buyingOptions",
"addToCart": "https://api.bestbuy.com/click/-/8610161/cart"
,
"names":
"title": "Acer - 11.6" Chromebook - Intel Celeron - 2GB Memory - 16GB eMMC Flash Memory - Moonstone White"
,
"offers": [[[[
"condition": "excellent",
"prices":
"current": 175.99,
"regular": 199
,
"condition": "certified",
"prices":
"current": 187.99,
"regular": 199
],
"prices":
"current": 199,
"regular": 199
,
"sku": "8610161"
,
The Open Box by List of SKUs endpoint allows you to query all Open Box offers associated with a list of SKUs. The endpoint will return any available Open Box offers. If there is not an offer for a particular SKU in the list, that SKU will not be represented in the results. If there are no offers for any of the SKUs in the list, the query will return an HTTP 200 (OK) response code with an empty result set.
NOTE: This endpoint accepts and returns at most 100 SKUs. The results are not paginated. Expect an HTTP 400 (Bad Request) response if you submit more than 100 SKUs.
Open Box by Category
boucle "https://api.bestbuy.com/beta/products/openBox(categoryId=abcat0400000)?apiKey=YourAPIKey"
var bby = exiger('bestbuy')('YourAPIKey')
bby.openBox('categoryId=abcat0400000)').puis(une fonction(Les données)
console.bûche(Les données)
);
Search all Open Box offers for SKUs that are a part of category abcat0400000; our Cameras & Camcorders category
"results": [[[[
"customerReviews":
"averageScore": "4.7",
"count": 145
,
"descriptions":
"short": "Compatible with most Canon DSLR cameras; stepping motor; 52mm filter size; 11.8" minimum focus distance"
,
"images":
"standard": "http://img.bbystatic.com/BestBuy_US/images/products/5729/5729048_sc.jpg"
,
"links":
"product": "https://api.bestbuy.com/v1/products/5729048.json?apiKey=YourAPIKey",
"web": "http://www.bestbuy.com/site/canon-ef-40mm-f-2-8-stm-standard-lens-black/5729048.p?id=1218688218296&skuId=5729048&cmp=RMX&ky=2l9pmD3wUBb9cc0tkHo49KBFCMPCiIPY4#tab=buyingOptions",
"addToCart": "https://api.bestbuy.com/click/-/5729048/cart"
,
"names":
"title": "Canon - EF 40mm f/2.8 STM Standard Lens - Black"
,
"offers": [[[[
"condition": "excellent",
"prices":
"current": 167.99,
"regular": 199.99
],
"prices":
"current": 199.99,
"regular": 199.99
,
"sku": "5729048"
]
The Open Box by Category endpoint allows you to query all Open Box offers associated with the SKUs in the requested category. If there are no Open Box offers available, the query will return a HTTP 200 response code with an empty result set. You will want to search by Category ID. It is not possible to search by Category Name at this time.
We recommend using our Categories API to identify the desired category. You can also look at the Products API category attributes to help identify those categories that you want to use to search Open Box offers.
Use Pagination to review or retrieve the entire result set. If additional product information is needed you can use the links.product
attribute to go to the Products API for a wealth of product information.
The Categories API allows you to traverse the many categories on BESTBUY.COM and perform product searches based on category names or identifiers. The Categories API also allows you to search for specific product attributes within a specific category (example: TVs less than $100), search using multiple product attributes within a specific category (example: TVs released in the last year that are less than $100) or look at Best Buy taxonomy to better search and present Best Buy product data (example: HD TVs released in the last year that are less than $100).
Category and Subcategory Paths
As part of the category details, we provide a flat hierarchical path for each category. le chemin
is a collection of all the categories in the path, starting with the root.
Similarly, the Subcategories path attributes provide a collection of subcategories for the parent category. Each category can have one or more subcategories associated to it, which are identified by subcategory ids and names.
The Products API also includes the category path information for each product. For additional information on the category attributes in Products API, refer to Categorizations.
Common Attributes
Attribute | La description |
---|---|
prénom | Used to find all subcategories (e.g., parents, siblings, children) within a specific category |
identifiant | Used to find all results within a specific category (e.g., abcat0100000) |
url | URL to corresponding BESTBUY.COM category page |
path.name | Used to find all categories, starting with the root, within a particular path (e.g., electronics) |
path.id | Used to find all categories, starting with the root, within a particular path (e.g., abcat0014001) |
subCategories.name | Used to identify subcategories within a specific category (e.g., Kitchen Essentials within Gift Ideas) |
subCategories.id | Used to identify subcategories within a specific category (e.g., abcat0011002) |
Get All Categories
boucle "https://api.bestbuy.com/v1/categories?format=json&show=id&apiKey=YourAPIKey"
var bby = exiger('bestbuy')('YourAPIKey')
bby.catégories('',spectacle:'id').puis(une fonction(Les données)
console.bûche(Les données)
);
"from": 1,
"to": dix,
"total": 4328,
"currentPage": 1,
"totalPages": 433,
"queryTime": "0.003",
"totalTime": "0.025",
"partial": faux,
"canonicalUrl": "/v1/categories?show=id,url&format=json&apiKey=YourAPIKey",
"categories": [[[[
"id": "abcat0010000",
"url": "http://www.bestbuy.com/site/electronics/gift-ideas/abcat0010000.c?id=abcat0010000"
,
"id": "abcat0020001",
"url": "http://www.bestbuy.com/site/electronics/gift-ideas/abcat0020001.c?id=abcat0020001"
,
"id": "abcat0020002",
"url": "http://www.bestbuy.com/site/electronics/gift-ideas/abcat0020002.c?id=abcat0020002"
,
"id": "abcat0020004",
"url": "http://www.bestbuy.com/site/electronics/gift-ideas/abcat0020004.c?id=abcat0020004"
,
"id": "abcat0100000",
"url": "http://www.bestbuy.com/site/electronics/gift-ideas/abcat0100000.c?id=abcat0100000"
]
The query to the right will return all the Best Buy product categories. Query is filtered to show only identifiant
s.
Search for a Category
boucle "https://api.bestbuy.com/v1/categories(name=Sony%20DSLR%20Camera*)?format=json&show=path&apiKey=YourAPIKey"
var bby = exiger('bestbuy')('YourAPIKey')
bby.catégories('name=Sony DSLR Camera*',spectacle:'path').puis(une fonction(Les données)
// The util package is loaded to print the complete object structure
console.bûche(exiger('util').inspecter(Les données, faux, nul));
);
"from": 1,
"to": 1,
"total": 1,
"currentPage": 1,
"totalPages": 1,
"queryTime": "0.011",
"totalTime": "0.014",
"partial": faux,
"canonicalUrl": "/v1/categories(name="Sony DSLR Camera*")?show=path&format=json&apiKey=YourAPIKey",
"categories": [[[[
"path": [[[[
"id": "cat00000",
"name": "Best Buy"
,
"id": "pcmcat128500050004",
"name": "Name Brands"
,
"id": "cat15063",
"name": "Sony"
,
"id": "pcmcat97200050015",
"name": "Sony DSLR Camera"
]
]
The following query will return the category path for the category prénom
specified in the input. In the below example we are requesting the category path for a Sony DSLR Camera. The query results are shown in a flat hierarchical path starting from the root. In this case Best Buy is the root category which is the first in the path, followed by its child category Name Brands, whose child is Sony, and its child Sony DSLR Camera, which is also the last category in this path.
The Recommendations API offers Trending, Most Viewed and Also Viewed information about Best Buy products based on customer behavior at BESTBUY.COM.
Attribute | La description |
---|---|
customerReviews.averageScore | An average of all the ratings submitted for a product by reviewers |
customerReviews.count | Total number of reviews collected |
description.short | Brief description of a product |
images.standard | URL of the BESTBUY.COM product detail page image |
links.addToCart | URL that will direct the customer to BESTBUY.COM with the item in their cart |
links.product | Link to the specific sku in the Products API |
links.web | Link to the BESTBUY.COM product detail page |
names.title | Name of the product |
prices.current | Current selling price |
prices.regular | Regular selling price |
sku | Unique identifier for products sold by Best Buy |
Trending Products
boucle "https://api.bestbuy.com/beta/products/trendingViewed(categoryId=abcat0400000)?apiKey=YourAPIKey"
var bby = exiger('bestbuy')('YourAPIKey')
bby.recommandations('trendingViewed','abcat0400000').puis(une fonction(Les données)
console.bûche(Les données)
);
In this example we request Trending products based on category abcat0400000 otherwise known as “Cameras & Camcorders”. When pulling by category you should always use the category id. It is not possible to query by category name. For more information about identifying category ids please refer to our Categories API documentation.
{
"results": [[[[
"customerReviews":
"averageScore": "4.9",
"count": 309
,
"descriptions":
"short": "20.2-megapixel APS-C CMOS sensorShooting speeds up to 7 fpsBuilt-in Wi-Fi"
,
"images":
"standard": "http://img.bbystatic.com/BestBuy_US/images/products/8896/8896132_sc.jpg"
,
"links":
"product": "https://api.bestbuy.com/v1/products/8896132.json?apiKey=YourAPIKey",
"web": "http://www.bestbuy.com/site/canon-eos-70d-dslr-camera-with-18-135mm-is-stm-lens-black/8896132.p?id=1218941181224&skuId=8896132&cmp=RMX&ky=2l9pmD3wUBb9cc0tkHo49KBFCMPCiIPY4",
"addToCart": "http://www.bestbuy.com/site/olspage.jsp?id=pcmcat152200050035&type=category&cmp=RMX&ky=2l9pmD3wUBb9cc0tkHo49KBFCMPCiIPY4&qvsids=8896132"
,
"names":
"title": "Canon - EOS 70D DSLR Camera with 18-135mm IS STM Lens - Black"
,
"prices":
"current": 1449.99,
"regular": 1549.99
,
"rank": 6,
"sku": "8896132"
,
The Trending Products endpoint returns top ten products, by rank, based on customer views of the BESTBUY.COM product detail page over a rolling three hour time period. Trending growth is based on a comparison against the previous three hour time period. You can also pull this same information by Catégorie ou sous catégorie. For more information about identifying category ids please refer to our Categories API documentation.
Note: Minimum of 50 page views/hr required for inclusion. In addition, deep subcategories may not have enough user traffic to generate trending data.
Trending Products Specific Attributes
Attribute | La description |
---|---|
rang | The rank of a product as compared to the velocity of other trending products. The number rank 1 identifies the most highly trending product while a number 10 rank would identify the 10th trending product |
Most Popular Viewed
boucle "https://api.bestbuy.com/beta/products/mostViewed(categoryId=abcat0107000)?apiKey=YourAPIKey"
var bby = exiger('bestbuy')('YourAPIKey')
bby.recommandations('mostViewed','abcat0107000').puis(une fonction(Les données)
console.bûche(Les données)
);
Request Most Viewed products based on category abcat0107000 otherwise known as “TV & Home Theater Accessories.” When pulling by category you should always use the category id. It is not possible to query by category name.
{
"results": [[[[
"customerReviews":
"averageScore": "4.6",
"count": 15
,
"descriptions":
"short": "Lets you connect your Apple® TV to a VGA-enabled projector; converts digital HDMI output to analog VGA signal; 3.5mm audio port; 6' cord"
,
"images":
"standard": "http://images.bestbuy.com/BestBuy_US/images/products/1740/1740039_sc.jpg"
,
"links":
"product": "https://api.bestbuy.com/v1/products/1740039.json",
"addToCart": "http://www.bestbuy.com/site/olspage.jsp?id=pcmcat152200050035&type=category&cmp=RMX&ky=1xrtkOPXgHdxEmF4yQx1jGyxiihDiJ5c2&qvsids=1740039",
"web": "http://www.bestbuy.com/site/belkin-hdmi-to-vga-adapter/1740039.p?id=1219062507184&skuId=1740039&cmp=RMX&ky=2dN2vg9ikE823Sb2cqFFchnSnf6JkvQna"
,
"names":
"title": "Belkin - HDMI-to-VGA Adapter"
,
"prices":
"current": 25.99,
"regular": 49.99
,
"rank": 7,
"sku": "1740039"
,
The Most Popular Viewed endpoint returns the top ten products, by rank, of the most frequently viewed products on BESTBUY.COM. You can also pull this same information by Catégorie ou sous catégorie. To find out additional information about identifying category ids please refer to our Categories API documentation. This data for Most Popular Viewed is refreshed every two hours with a maximum accumulation time of 48 hours when determining the top ten products.
Note: The difference between Trending Products and Most Popular Viewed Products is that Trending Products reflects change in velocity of product views while Most Popular Viewed reflects page views only.
Most Popular Product Specific Attributes
Attribute | La description |
---|---|
rang | The rank of a product based on how frequently it is viewed on BESTBUY.COM product detailed page |
Also Viewed
boucle "https://api.bestbuy.com/beta/products/5747275/alsoViewed?apiKey=YourAPIKey"
var bby = exiger('bestbuy')('YourAPIKey')
bby.recommandations('alsoViewed',5747275).puis(une fonction(Les données)
console.bûche(Les données)
);
"results": [[[[
"customerReviews":
"averageScore": nul,
"count": nul
,
"descriptions":
"short": nul
,
"images":
"standard": "http://images.bestbuy.com/BestBuy_US/images/products/nonsku/default_movies_l.jpg"
,
"links":
"product": "https://api.bestbuy.com/v1/products/5747275.json",
"addToCart": "http://www.bestbuy.com/site/olspage.jsp?id=pcmcat152200050035&type=category&cmp=RMX&ky=1xrtkOPXgHdxEmF4yQx1jGyxiihDiJ5c2&qvsids=5747275",
"web": "http://www.bestbuy.com/site/batman-begins-blu-ray-disc/8880044.p?id=1484301&skuId=8880044&cmp=RMX&ky=1xrtkOPXgHdxEmF4yQx1jGyxiihDiJ5c2"
,
"names":
"title": "Batman Begins (2 Disc) (Ultraviolet Digital Copy) (Blu-ray Disc)"
,
"prices":
"current": 9,99,
"regular": 9,99
,
"rank": 3,
"sku": "5747275"
]
The Also Viewed Products endpoint can be used to identify top ten products that were viewed along with the originating product. These results are determined based on aggregated customer browsing behavior over the past thirty days on BESTBUY.COM.
Also Viewed Product Specific Attributes
Attribute | La description |
---|---|
rang | The rank of the product based on how many views a product received after starting with originating SKU. The number 1 rank identifies the highest number of page views an associated product received while looking at originating SKU while the number 10 rank identifies the product with the 10th highest page views while look at same originating product |
boucle "https://api.bestbuy.com/v1/stores?format=json&show=city,longName&pageSize=2&apiKey=YourAPIKey"
var bby = exiger('bestbuy')('YourAPIKey')
bby.magasins('',spectacle:'city,longName',pageSize:2).puis(une fonction(Les données)
console.bûche(Les données)
);
Returns the city and store name of 2 stores
"from": 1,
"to": 2,
"total": 1587,
"currentPage": 1,
"totalPages": 794,
"stores": [[[[
"city": "San Juan",
"longName": "Best Buy - Hato Rey"
,
"city": "Bayamon",
"longName": "Best Buy - Rio Hondo Mall"
]
The Best Buy Stores API provides store information for all Best Buy stores in the United States and Puerto Rico. This information includes address, location, hours and services offered.
In addition, store availability of a product can be determined by querying the Products API together with the Stores API. Refer to In Store Availability for more information on these type of queries.
Common Attributes
boucle "https://api.bestbuy.com/v1/stores(postalCode=55423)?format=json&show=storeId,storeType,name,city,region&apiKey=YourAPIKey"
var bby = exiger('bestbuy')('YourAPIKey')
bby.magasins('postalCode=55423', spectacle: 'storeId,storeType,name,city,region').puis(une fonction(Les données)
console.bûche(Les données)
);
Returns all stores at the ZIP code 55423 (Richfield, MN)
"from": 1,
"to": 3,
"total": 3,
"currentPage": 1,
"totalPages": 1,
"stores": [[[[
"storeId": 2387,
"storeType": "Mobile SAS",
"name": "Best Buy Mobile - Richfield",
"city": "Richfield",
"region": "MN"
,
"storeId": 281,
"storeType": "Big Box",
"name": "Richfield",
"city": "Richfield",
"region": "MN"
,
"storeId": 8001,
"storeType": "Express Kiosk",
"name": "Best Buy HQ",
"city": "Richfield",
"region": "MN"
]
The Stores API enables you to retrieve the basic store information for all Best Buy stores, a specific Best Buy store or those stores that match a set of search parameters.
Attribute | La description |
---|---|
adresse | Street address |
address2 | Street address 2 provides additional street address information for the Best Buy store in the result set |
ville | City name |
pays | Country name |
distance | Store distance from specified location in miles; attribute is not queryable; use with lat and long or postal code |
fullPostalCode | 9-digit postal code if available for store location |
lat | Latitude |
lng | Longitude |
emplacement | Details about location of a store; primarily used for identifying Best Buy Express Kiosk stores |
longName | Full store name |
prénom | Store name |
téléphone | Store phone number; phone number for Express stores goes to Best Buy Customer Service |
postalCode | Code postal à 5 chiffres |
Région | State, territory |
storeId | Store number |
storeType | Indicates the type of store. There are six types of Best Buy stores: “Big Box”, “Mobile SAS”, “Express Kiosk”, “Warehouse Sale”, “Outlet Center” and “PAC Standalone Store”
|
Area Function
boucle "https://api.bestbuy.com/v1/stores(area(55423,10))?format=json&show=storeId,storeType,name&pageSize=2&apiKey=YourAPIKey"
var bby = exiger('bestbuy')('YourAPIKey')
bby.magasins('area(55423,10)',spectacle:'storeId,storeType,name', pageSize: 2).puis(une fonction(Les données)
console.bûche(Les données)
);
Returns stores within 10 miles of ZIP code 55423 (Richfield, MN)
"from": 1,
"to": 2,
"total": 22,
"currentPage": 1,
"totalPages": 11,
"stores": [[[[
"storeId": 2387,
"storeType": "Mobile SAS",
"name": "Best Buy Mobile - Richfield"
,
"storeId": 281,
"storeType": "Big Box",
"name": "Richfield"
]
The Stores API includes a special function area(location,distance)
enabling you to locate stores near a specified location.
Use the postalCode
attribute or a lat
–lng
pair to search based on a location. When postal code is used the reference point in the postal code (zipcode) area is determined by a standard mapping service. If no distance is specified in the function, radius is defaulted to 10 miles. le emplacement
will be populated with the distance from the specified postal code or lat/long to the store in miles.
Remarque: You may notice the stores returned are stated to be just over 10 miles from the ZIP code. This is due to the way return distance is calculated. The search area is defined as a square, bounded by location point +/- distance identified in request. All stores in that square are returned. Return distance is calculated linearly from the location point (creates a circle). Stores near the corner of the square might be listed as farther than the query distance specified.
Heures
boucle "https://api.bestbuy.com/v1/stores(storeId=1118)?format=json&show=hours,hoursAmPm,gmtOffset,detailedHours&apiKey=YourAPIKey"
var bby = exiger('bestbuy')('YourAPIKey')
bby.magasins('storeId=1118',spectacle:'hours,hoursAmPm,gmtOffset,detailedHours')
.puis(une fonction(Les données)
// The util package is loaded to print the complete object structure
console.bûche(exiger('util').inspecter(Les données, faux, nul));
);
Shows all hours that store #1118 (San Juan, PR) is open
"from": 1,
"to": 1,
"total": 1,
"currentPage": 1,
"totalPages": 1,
"stores": [[[[
"hours": "Mon: 10-9; Tue: 10-9; Wed: 10-9; Fri: 12:01-10; Sat: 9-10; Sun: 11-8",
"hoursAmPm": "Mon: 10am-9pm; Tue: 10am-9pm; Wed: 10am-9pm; Fri: 12:01am-10pm; Sat: 9am-10pm; Sun: 11am-8pm",
"gmtOffset": -5,
"detailedHours": [[[[
"day": "Sunday",
"date": "2015-11-22",
"open": "11:00",
"close": "20:00"
,
"day": "Monday",
"date": "2015-11-23",
"open": "10:00",
"close": "21:00"
// Typically returns 14 days, truncating from documentation
]
]
The Hours attributes provide the days and times each Best Buy store is open for the following two weeks. We start our weeks on Sunday and provide hours in both a 12-hour and 24-hour clock. The times displayed are for the local time zones of the Best Buy store being returned. The Detailed Hours attributes provide the most accurate information of when stores will be opened or closed. This can be helpful during holidays as store hours may vary during this time.
Hint: Detailed hours are filtered out from the search results by default. Query with show=all
ou show=detailedHours
to see in the search results.
Attribute | La description |
---|---|
detailedHours.day | Days of the week store will be open |
detailedHours.date | Dates store will be open |
detailedHours.open | Time store will open (24-hour clock) |
detailedHours.close | Time store will close (24-hour clock) |
gmtOffset | Time difference from GMT |
heures | Regular Best Buy store hours Monday through Friday for the calendar year; displayed in local time zone |
hoursAmPm | Regular Best Buy store hours Monday through Friday for the calendar year with am and pm identifiers; displayed in local time zone |
Services Offered
boucle "https://api.bestbuy.com/v1/stores(storeId=1118)?format=json&show=services&apiKey=YourAPIKey"
var bby = exiger('bestbuy')('YourAPIKey')
bby.magasins('storeId=1118',spectacle:'services').puis(une fonction(Les données)
// The util package is loaded to print the complete object structure
console.bûche(exiger('util').inspecter(Les données, faux, nul));
);
Shows all services available at store #1118 (San Juan, PR)
"from": 1,
"to": 1,
"total": 1,
"currentPage": 1,
"totalPages": 1,
"stores": [[[[
"services": [[[[
"service": "Windows Store"
,
"service": "Geek Squad Services"
,
"service": "Best Buy Mobile"
,
"service": "Best Buy For Business"
,
"service": "Apple Shop"
,
"service": "Electronics Recycling"
,
"service": "Best Buy Marine Powered by Geek Squad"
,
"service": "Samsung Experience"
,
"service": "LG Experience"
,
"service": "Trade-In"
,
"service": "Car & GPS Installation Services"
]
]
The Stores API includes information related to the services offered at each of the Best Buy stores. prestations de service
is a collection of different services offered at a specified store.
Attribute | La description |
---|---|
services.service | Collection of services offered at each Best Buy store |
In-Store Availability
boucle "https://api.bestbuy.com/v1/products/4807511/stores.json?postalCode=55423&apiKey=YourAPIKey"
Shows stores near 55423 (Richfield, MN) that carry SKU 4807511 (Insignia LED-TV)
"ispuEligible": vrai,
"stores": [[[[
"storeID": "281",
"name": "RICHFIELD MN",
"address": "1000 WEST 78TH ST",
"city": "RICHFIELD",
"state": "MN",
"postalCode": "55423",
"storeType": "Big_Box_Store",
"minPickupHours": 1,
"lowStock": faux
,
]
The Stores API, in conjunction with the Products API, allows you to search stores for a product and identify if it is available. In-store availability searches will return only those stores that have a given product in stock. Stores not returned do not have that product in stock. You can get near real time availability for specific SKUs based on either a store ID or postal code search. If you prefer to use a broader query – e.g., based on lat/long data or a wider set of product query parameters – your results will be based on estimated data (see below).
SKU Specific Availability
You can look up near real time store availability for single SKUs. You may search either on postalCode
or based on storeId
. Results for postalCode
queries will include all stores within a 250 mile radius, sorted by proximity.
Broad Availability Query
boucle "https://api.bestbuy.com/v1/stores(area(44.882942,-93.2775,3)&storeType=Express)+products(sku=5038019)?format=json&show=storeId,storeType,city,region,name,products.name,products.sku,products&pageSize=1&apiKey=YourAPIKey"
//Not yet implemented
Shows Express stores within 3 miles of 44.882942,-93.2775 (Richfield, MN) that carry SKU 5038019 (Insignia 5-Way Stereo Splitter).
"from": 1,
"to": 1,
"total": 3,
"currentPage": 1,
"totalPages": 3,
"stores": [[[[
"storeId": 8001,
"storeType": "Express Kiosk",
"city": "Richfield",
"region": "MN",
"name": "Best Buy HQ",
"products": [[[[
"name": "Insignia™ - 6" 5-Way Stereo Splitter - White",
"sku": 5038019
]
]
If you prefer a broader query, you can use a fuller set of query parameters. Using this wider search, availability in stores is calculated using counts and previous-day sales to determine if the product is likely to be available, might be available or is unlikely to be available. The algorithm errs on the side of caution, and anything that is not available defaults to “not available”.
HINT: The Products API attribute inStoreAvailability
will tell you if a product is sold in stores but not if it’s available at a particular store. Using the In-Store availability queries is equivalent to checking product availability in store.
The Best Buy Commerce API allows our partners to introduce a seamless cart experience to their customers, exposing the ability to select various fulfillment options including Store Pickup at one of our 1,400+ locations, Ship To Home et Home Delivery. If you have not yet been issued a Commerce API key, please contact developer@bestbuy.com.
Within the Commerce APIs, partners have the ability to integrate your e-commerce solution with Best Buy’s online experience.
Functionality
Full documentation supplied once you have a CAPI Key. Commerce API functionality includes:
- Look up product availability, delivery dates, shipping costs prior to order submission
- Create orders including Store Pick Up, Ship to Home et Home Delivery
- Look up order information
- Modify/Cancel an Order
Getting a Commerce API Key
Please contact us at developer@bestbuy.com to request an invite to the Commerce API program and a corresponding API Key. Current CAPI partners can access reporting and documentation via the same address.