Core APIs
Categories API
List and Search
8 min
list and search categories get get /categories the categories api exposes just one endpoint /categories categories are expressed in a hierarchical structure, each category may have one or more child categories as determined by the has children property you can retrieve the child categories of a given category by passing the parent category id in the parent id parameter to retrieve the top level categories make a request without any parent id top level categories have their is root=true property set to true parameters the following querystring (http get) parameters allow you to refine the results returned by the categories api true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type results the categories api returns the following properties true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type example listing root categories in the example below we retrieve all top level (root) categories $ curl "https //api bigboxapi com/categories?api key=demo"const axios = require('axios'); axios get('https //api bigboxapi com/categories?api key=demo') then(response => { const apiresponse = response data; console log("categories ", json stringify(apiresponse, 0, 2); }) catch(error => { console error(error); });import requests import json params = { 'api key' 'demo' } api result = requests get('https //api bigboxapi com/categories', { params }) api response = api result json() print "categories ", json dumps(api response)\<?php $querystring = http build query(\[ 'api key' => 'demo' ]); $ch = curl init('https //api bigboxapi com/categories', $querystring); curl setopt($ch, curlopt returntransfer, true); curl setopt($ch, curlopt followlocation, true); \# the following options are required if you're using an outdated openssl version \# more details https //www openssl org/blog/blog/2021/09/13/letsencryptrootcertexpire/ curl setopt($ch, curlopt ssl verifyhost, false); curl setopt($ch, curlopt ssl verifypeer, false); curl setopt($ch, curlopt timeout, 180); $json = curl exec($ch); curl close($ch); $api result = json decode($json, true); print r($api result); ?> the categories api responds with the top level (root) categories in the categories property { "request info" { "success" true }, "categories" \[ { "id" "n 5yc1vzbv1w", "name" "appliances", "has children" true, "is root" true, "path" "appliances", "link" "https //www homedepot com/b/appliances/n 5yc1vzbv1w", "type" "standard", "domain" "homedepot com" }, { "id" "n 5yc1vzbqsi", "name" "cleaning", "has children" true, "is root" true, "path" "cleaning", "link" "https //www homedepot com/b/cleaning/n 5yc1vzbqsi", "type" "standard", "domain" "homedepot com" }, { "id" "n 5yc1vzc1jw", "name" "smart home", "has children" true, "is root" true, "path" "smart home", "link" "https //www homedepot com/b/smart home/n 5yc1vzc1jw", "type" "standard", "domain" "homedepot com" } ] } example listing child categories in the example below we retrieve child categories for a parent category with id n 5yc1vzbv1w $ curl "https //api bigboxapi com/categories?api key=demo\&parent id=n 5yc1vzbv1w"const axios = require('axios'); axios get('https //api bigboxapi com/categories?api key=demo\&parent id=n 5yc1vzbv1w') then(response => { const apiresponse = response data; console log("categories ", json stringify(apiresponse, 0, 2); }) catch(error => { console error(error); });import requests import json params = { 'api key' 'demo', 'parent id' 'n 5yc1vzbv1w' } api result = requests get('https //api bigboxapi com/categories', { params }) api response = api result json() print "categories ", json dumps(api response)\<?php $querystring = http build query(\[ 'api key' => 'demo', 'parent id' => 'n 5yc1vzbv1w' ]); $ch = curl init('https //api bigboxapi com/categories', $querystring); curl setopt($ch, curlopt returntransfer, true); curl setopt($ch, curlopt followlocation, true); \# the following options are required if you're using an outdated openssl version \# more details https //www openssl org/blog/blog/2021/09/13/letsencryptrootcertexpire/ curl setopt($ch, curlopt ssl verifyhost, false); curl setopt($ch, curlopt ssl verifypeer, false); curl setopt($ch, curlopt timeout, 180); $json = curl exec($ch); curl close($ch); $api result = json decode($json, true); print r($api result); ?> the categories api responds with the child categories for parent category with id n 5yc1vzbv1w in the categories property { "request info" { "success" true }, "current category" { "id" "n 5yc1vzbv1w", "name" "appliances", "has children" true, "is root" true, "path" "appliances", "link" "https //www homedepot com/b/appliances/n 5yc1vzbv1w", "type" "standard", "domain" "homedepot com" }, "categories" \[ { "id" "n 5yc1vzc3pi", "name" "refrigerators", "has children" false, "is root" false, "path" "appliances > refrigerators", "link" "https //www homedepot com/b/appliances refrigerators/n 5yc1vzc3pi", "parent id" "n 5yc1vzbv1w", "parent name" "appliances", "type" "standard", "domain" "homedepot com" }, { "id" "n 5yc1vzc3po", "name" "dishwashers", "has children" false, "is root" false, "path" "appliances > dishwashers", "link" "https //www homedepot com/b/appliances dishwashers/n 5yc1vzc3po", "parent id" "n 5yc1vzbv1w", "parent name" "appliances", "type" "standard", "domain" "homedepot com" }, { "id" "n 5yc1vzc3no", "name" "garbage disposals", "has children" false, "is root" false, "path" "appliances > garbage disposals", "link" "https //www homedepot com/b/appliances garbage disposals/n 5yc1vzc3no", "parent id" "n 5yc1vzbv1w", "parent name" "appliances", "type" "standard", "domain" "homedepot com" } ] } next steps https //docs trajectdata com/bigboxapi/categories api/overview