Categories API

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).

For additional information on writing queries please refer to our search tutorial.

Some examples of how to search and return category information include:

Attributes

Hint: If you would like additional information about an attribute, including examples, detailed descriptions and any special considerations when using the attribute, please click on the attribute name.

NameDescriptionType
activeidentifies if category is activeboolean
idcategory identifierstring
namecategory namestring

active

The active attribute identifies if this is an active Best Buy product category.

Type
boolean
Example
true,false
Back To Attributes

id

The id attribute provides the Best Buy category identifier.

Type
string
Example
abcat0011000
Back To Attributes

name

The name attribute provides the name of the category.

Type
string
Example
Her, Him , Kids, Gift Center
Back To Attributes

Request/Response Examples

Return all the categories

The following query will return all the Best Buy product categories.Query is filtered to show only ids. Return to Information

#request:
http://api.bestbuy.com/v1/categories?format=json&apiKey=YourAPIKey&show=id

#response:
{ "from": 1, "to": 10, "total": 4328, "currentPage": 1, "totalPages": 433, "queryTime": "0.003", "totalTime": "0.025", "partial": false, "canonicalUrl": "/v1/categories?show=id&format=json&apiKey=YourAPIKey", "categories": [ { "id": "abcat0010000" }, { "id": "abcat0020001" }, { "id": "abcat0020002" }, { "id": "abcat0020004" }, { "id": "abcat0100000" } ...
#request:
http://api.bestbuy.com/v1/categories?apiKey=YourAPIKey&show=id

#response:
<categories currentPage="1" totalPages="433" from="1" to="10" total="4328" queryTime="0.004" totalTime="0.036" canonicalUrl="/v1/categories?show=id&amp;apiKey=YourAPIKey" partial="false"> <category> <id>abcat0010000</id> </category> <category> <id>abcat0020001</id> </category> <category> <id>abcat0020002</id> </category> <category> <id>abcat0020004</id> </category> <category> <id>abcat0100000</id> </category> <category> <id>abcat0101000</id> </category> <category> <id>abcat0101001</id> </category> <category> <id>abcat0101005</id> </category> ...

Return category information using category identifier

The following query will return all the category details for the category id specified in the input along with the associated subcategories if any. Return to Information

#request:
http://api.bestbuy.com/v1/categories(id=abcat0011000)?format=json&apiKey=YourAPIKey

#response:
{ "id": "abcat0011000", "name": "Her", "active": false, "path": [ { "id": "cat00000", "name": "Best Buy" }, { "id": "abcat0010000", "name": "Gift Center" }, { "id": "abcat0011000", "name": "Her" } ], "subCategories": [ { "id": "abcat0011001", "name": "Leisure Gifts" }, { "id": "abcat0011002", "name": "Kitchen Essentials" }, { "id": "abcat0011003", "name": "Electronics" }, { "id": "abcat0011004", "name": "Music, Movies & More" } ] }
#request:
http://api.bestbuy.com/v1/categories(id=abcat0011000)?apiKey=YourAPIKey

#response:
<category> <id>abcat0011000</id> <name>Her</name> <active>false</active> <path> <category> <id>cat00000</id> <name>Best Buy</name> </category> <category> <id>abcat0010000</id> <name>Gift Center</name> </category> <category> <id>abcat0011000</id> <name>Her</name> </category> </path> <subCategories> <category> <id>abcat0011001</id> <name>Leisure Gifts</name> </category> <category> <id>abcat0011002</id> <name>Kitchen Essentials</name> </category> <category> <id>abcat0011003</id> <name>Electronics</name> </category> <category> <id>abcat0011004</id> <name>Music, Movies &amp; More</name> </category> </subCategories> </category>

Return category information using category name

The following query will return the category details for the category name specified in the input. Return to Information

#request:
http://api.bestbuy.com/v1/categories(name=Leisure%20Gifts)?format=json&apiKey=YourAPIKey

#response:
{ "categories": [ { "id": "abcat0011001", "name": "Leisure Gifts", "active": false, "path": [ { "id": "cat00000", "name": "Best Buy" }, { "id": "abcat0010000", "name": "Gift Center" }, { "id": "abcat0011000", "name": "Her" }, { "id": "abcat0011001", "name": "Leisure Gifts" } ], "subCategories": [ ] } ] }
#request:
http://api.bestbuy.com/v1/categories(name=Leisure%20Gifts)?apiKey=YourAPIKey

#response:
<categories currentPage="1" totalPages="1" from="1" to="1" total="1" queryTime="0.002" totalTime="0.005" canonicalUrl="/v1/categories(name=&quot;Leisure Gifts&quot;)?apiKey=yourAPIKey" partial="false"> <category> <id>abcat0011001</id> <name>Leisure Gifts</name> <active>false</active> <path> <category> <id>cat00000</id> <name>Best Buy</name> </category> <category> <id>abcat0010000</id> <name>Gift Center</name> </category> <category> <id>abcat0011000</id> <name>Her</name> </category> <category> <id>abcat0011001</id> <name>Leisure Gifts</name> </category> </path> <subCategories/> </category> </categories>

Category Path

As part of the category details, we provide a flat hierarchical path for each category. The path is a collection of all the categories in the path, starting with the root.

See the following example for how to query for a category path and return the structure of the category path:

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.

Attributes

Hint: If you would like additional information about an attribute, including examples, detailed descriptions and any special considerations when using the attribute, please click on the attribute name.

NameDescriptionType
path.idcategory path idstring
path.namecategory path namestring

path.id

The path.id attribute is returned as part of a collection and provides category ID for each of the categories in the path.

Type
string
Example
abcat0014000
Back To Attributes

path.name

The path.name attribute is returned as part of a collection and provides category names for each of the categories in the path.

Type
string
Example
Gift Center
Back To Attributes

Request/Response Examples

Returns category path of specific category

The following query will return the category path for the category name 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. Return to Category Path

#request:
http://api.bestbuy.com/v1/categories(name=Sony%20DSLR%20Camera*)?format=json&apiKey=YourAPIKey&show=path

#response:
{ "from": 1, "to": 1, "total": 1, "currentPage": 1, "totalPages": 1, "queryTime": "0.011", "totalTime": "0.014", "partial": false, "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" } ] } ] }
#request:
http://api.bestbuy.com/v1/categories(name=Sony%20DSLR%20Camera*)?apiKey=YourAPIKey&show=path

#response:
<categories currentPage="1" totalPages="1" from="1" to="1" total="1" queryTime="0.019" totalTime="0.022" canonicalUrl="/v1/categories(name=&quot;Sony DSLR Camera*&quot;)?show=path&amp;apiKey=YourAPIKey" partial="false"> <category> <path> <category> <id>cat00000</id> <name>Best Buy</name> </category> <category> <id>pcmcat128500050004</id> <name>Name Brands</name> </category> <category> <id>cat15063</id> <name>Sony</name> </category> <category> <id>pcmcat97200050015</id> <name>Sony DSLR Camera</name> </category> </path> </category> </categories>

Subcategory Path

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.

See the following examples to query and return results for subcategories:

Attributes

Hint: If you would like additional information about an attribute, including examples, detailed descriptions and any special considerations when using the attribute, please click on the attribute name.

NameDescriptionType
subCategories.idSubcategory idstring
subCategories.nameSubcategory namestring

subCategories.id

The subCategories.id attribute is returned as part of a collection and provides subcategory ids for each of the subcategories in the path

Type
string
Example
abcat0011000
Back To Attributes

subCategories.name

The subCategories.name attribute is returned as part of a collection and provides subcategory names of each of the subcategories in the path.

Type
string
Example
Kids
Back To Attributes

Request/Response Examples

Show all the subcategories of this category

The following query will return all the subcategories that have the input category id as their parent category. Return to Subcategory Path

#request:
http://api.bestbuy.com/v1/categories(id=abcat0010000)?format=json&apiKey=YourAPIKey&show=subCategories

#response:
{ "from": 1, "to": 1, "total": 1, "currentPage": 1, "totalPages": 1, "queryTime": "0.004", "totalTime": "0.010", "partial": false, "canonicalUrl": "/v1/categories(id=\"abcat0010000\")?show=subCategories&format=json&apiKey=YourAPIKey", "categories": [ { "subCategories": [ { "id": "pcmcat140000050035", "name": "Capturing Photos & Videos" }, { "id": "pcmcat140000050036", "name": "Listening to Digital Music" }, { "id": "pcmcat140000050037", "name": "Computing Made Easy" }, { "id": "pcmcat140000050039", "name": "Simple GPS Navigation" } ...
#request:
http://api.bestbuy.com/v1/categories(id=abcat0010000)?apiKey=YourAPIKey&show=subCategories

#response:
<categories currentPage="1" totalPages="1" from="1" to="1" total="1" queryTime="0.003" totalTime="0.010" canonicalUrl="/v1/categories(id=&quot;abcat0010000&quot;)?show=subCategories&amp;apiKey=YourAPIKey" partial="false"> <category> <subCategories> <category> <id>pcmcat140000050035</id> <name>Capturing Photos &amp; Videos</name> </category> <category> <id>pcmcat140000050036</id> <name>Listening to Digital Music</name> </category> <category> <id>pcmcat140000050037</id> <name>Computing Made Easy</name> </category> <category> <id>pcmcat140000050039</id> <name>Simple GPS Navigation</name> </category> <category> <id>pcmcat140000050040</id> <name>Playing Video Games</name> </category> ...

Return all the categories with this subcategory

The following query will return all the categories that have the input subCategories.id as their subcategory. Return to Subcategory Path

#request:
http://api.bestbuy.com/v1/categories(subCategories.id=pcmcat140000050035)?format=json&apiKey=yourAPIKey

#response:
{ "from": 1, "to": 1, "total": 1, "currentPage": 1, "totalPages": 1, "queryTime": "0.003", "totalTime": "0.009", "partial": false, "canonicalUrl": "/v1/categories(subCategories.id=pcmcat140000050035)?format=json&apiKey=yourAPIKey", "categories": [ { "id": "abcat0010000", "name": "Gift Center", "active": true, "path": [ { "id": "cat00000", "name": "Best Buy" }, { "id": "abcat0010000", "name": "Gift Center" } ], "subCategories": [ { "id": "pcmcat140000050035", "name": "Capturing Photos & Videos" }, { "id": "pcmcat140000050036", "name": "Listening to Digital Music" }, { "id": "pcmcat140000050037", "name": "Computing Made Easy" }, { "id": "pcmcat140000050039", "name": "Simple GPS Navigation" }, { "id": "pcmcat140000050040", "name": "Playing Video Games" }, { "id": "pcmcat140000050041", "name": "Watching HDTV" }, { "id": "pcmcat140000050042", "name": "Enjoying Favorite Movies" }, { "id": "abcat0012000", "name": "Him" }, { "id": "abcat0011000", "name": "Her" }, { "id": "abcat0013000", "name": "Teens" }, { "id": "abcat0014000", "name": "Kids" }, { "id": "pcmcat84000050001", "name": "Anniversaries" }, { "id": "pcmcat84000050004", "name": "Baby Showers" }, { "id": "pcmcat94300050028", "name": "Birthdays" }, { "id": "pcmcat84000050002", "name": "Business Gifts" }, { "id": "pcmcat84000050003", "name": "Graduations" } ...
#request:
http://api.bestbuy.com/v1/categories(subCategories.id=pcmcat140000050035)?apiKey=yourAPIKey

#response:
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="/v1/xsl/xml_pretty_printer.xsl" type="text/xsl"?> <categories currentPage="1" totalPages="1" from="1" to="1" total="1" queryTime="0.013" totalTime="0.021" canonicalUrl="/v1/categories(subCategories.id=pcmcat140000050035)?apiKey=yourAPIKey" partial="false"> <category> <id>abcat0010000</id> <name>Gift Center</name> <active>true</active> <path> <category> <id>cat00000</id> <name>Best Buy</name> </category> <category> <id>abcat0010000</id> <name>Gift Center</name> </category> </path> <subCategories> <category> <id>pcmcat140000050035</id> <name>Capturing Photos &amp; Videos</name> </category> <category> <id>pcmcat140000050036</id> <name>Listening to Digital Music</name> </category> <category> <id>pcmcat140000050037</id> <name>Computing Made Easy</name> </category> <category> <id>pcmcat140000050039</id> <name>Simple GPS Navigation</name> </category> <category> <id>pcmcat140000050040</id> <name>Playing Video Games</name> </category> <category> <id>pcmcat140000050041</id> <name>Watching HDTV</name> </category> <category> <id>pcmcat140000050042</id> <name>Enjoying Favorite Movies</name> </category> <category> <id>abcat0012000</id> <name>Him</name> </category> <category> <id>abcat0011000</id> <name>Her</name> </category> <category> <id>abcat0013000</id> <name>Teens</name> </category> <category> <id>abcat0014000</id> <name>Kids</name> </category> <category> <id>pcmcat84000050001</id> <name>Anniversaries</name> </category> <category> <id>pcmcat84000050004</id> <name>Baby Showers</name> </category> <category> <id>pcmcat94300050028</id> <name>Birthdays</name> </category> <category> <id>pcmcat84000050002</id> <name>Business Gifts</name> </category> <category> <id>pcmcat84000050003</id> <name>Graduations</name> </category> <category> <id>pcmcat84000050000</id> <name>Weddings</name> </category> <category> <id>abcat0020004</id> <name>Unique Gifts</name> </category> <category> <id>pcmcat111900050004</id> <name>Pink and Red Gifts</name> </category> <category> <id>abcat0020006</id> <name>Prepaid Cards</name> </category> <category> <id>pcmcat231900050003</id> <name>eGift Cards</name> </category> ...
Best Buy logo

We do not support your browser. Neither does Microsoft.

We're glad that you're excited about Best Buy's APIs. However, you're using a browser that's too old to view our new developer site. We encourage you to switch to a newer browser, preferably a recent version of Chrome, Firefox, or Internet Explorer.