Core APIs
Product API
Getting Started
7min
getting started backyard api is an api to retrieve public domain data from home improvement in real time you can use backyard api to retrieve products https //docs trajectdata com/backyardapi/home improvement product data api/parameters/product , reviews https //docs trajectdata com/backyardapi/home improvement product data api/parameters/reviews , search results https //docs trajectdata com/backyardapi/home improvement product data api/parameters/search and category listings https //docs trajectdata com/backyardapi/home improvement product data api/parameters/category from home improvement backyard api returns clean, structured json or csv results you can achieve fine grained control over your request using the request parameters https //docs trajectdata com/backyardapi/home improvement product data api/parameters/common retrieving search results for products on home improvement get get /request getting search result home improvement data with backyard api is as simple as making an http get request to the request endpoint the only required parameters are api key ( sign up https //app backyardapi com/signup for free to get an api key) and type (which defines the type of home improvement data you'd like to retrieve) for example, to retrieve search results ( type=search ) for the search term lawn mower , ordered by best selling products ( sort by=best seller ) the backyard api request would be http https //api backyardapi com/request?api key=demo\&engine=homedepot\&type=search\&search term=lawn+mower\&sort by=best seller$ curl l get https //api backyardapi com/request \\ d api key="demo" \\ d engine="homedepot" \\ d type="search" \\ d sort by="best seller" \\ d search term="lawn mower"const axios = require('axios'); // set up the request parameters const params = { api key "demo", engine "homedepot", type "search", search term "lawn mower", sort by "best seller" } // make the http get request to backyard api axios get('https //api backyardapi com/request', { params }) then(response => { // print the json response from backyard api console log(json stringify(response data, 0, 2)); }) catch(error => { // catch and print the error console log(error); })import requests import json \# set up the request parameters params = { 'api key' 'demo', 'engine' 'homedepot', 'type' 'search', 'search term' 'lawn mower', 'sort by' 'best seller' } \# make the http get request to backyard api api result = requests get('https //api backyardapi com/request', params) \# print the json response from backyard api print(json dumps(api result json()))\<?php \# set up the request parameters $querystring = http build query(\[ 'api key' => 'demo', 'engine' 'homedepot', 'type' 'search', 'search term' 'lawn mower', 'sort by' 'best seller' ]); \# make the http get request to backyard api $ch = curl init(sprintf('%s?%s', 'https //api backyardapi com/request', $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); $api result = curl exec($ch); curl close($ch); \# print the json response from backyard api echo $api result; ?> to view backyard api json results clearly in your browser we recommend these extensions for chrome and firefox the search results are shown below within the search results array for full documentation on the search results response see the search results https //www backyardapi com/docs/home improvement product data api/results/search docs { "request info" { "success" true, "credits used" 1, "credits remaining" 999 }, "request metadata" { "created at" "2020 01 01t00 00 00 000z", "processed at" "2020 01 01t00 00 00 000z", "total time taken" 2 15, "homedepot url" "https //www homedepot com/s/lawn+mower?ncni 5" }, "request parameters" { "engine" "homedepot", "type" "search", "search term" "lawn mower", "sort by" "best seller" }, "search results" \[ { "position" 1, "product" { "title" "honda 21 in 3 in 1 variable speed gas walk behind self propelled lawn mower with auto choke", "link" "https //www homedepot com/p/honda 21 in 3 in 1 variable speed gas walk behind self propelled lawn mower with auto choke hrn216vka/314013158", "is bestseller" true, "brand" "honda", "favorite count" 1053, "item id" "314013158", "store sku" "1004556576", "model number" "hrn216vka", "images" \[ "https //images thdstatic com/productimages/b805cb94 f0f9 4800 bf93 2070a92a8704/svn/honda self propelled lawn mowers hrn216vka 64 1000 jpg", "https //images thdstatic com/productimages/2da3aa20 c521 4191 8855 32c65af1ec4e/svn/honda self propelled lawn mowers hrn216vka e4 1000 jpg" ], "primary image" "https //images thdstatic com/productimages/b805cb94 f0f9 4800 bf93 2070a92a8704/svn/honda self propelled lawn mowers hrn216vka 64 1000 jpg", "rating" 4 5, "ratings total" 5192, "collection" { "id" "family 312406020", "name" "family 312406020", "link" "https //www homedepot com/collection/outdoors/honda lawn mowers collection/family 312406020?omsid=314013158" }, "features" \[ { "name" "power type", "value" "gas" }, { "name" "cutting width (in )", "value" "21 inches" }, { "name" "size of yard", "value" "1/4 1/2 acre" }, { "name" "engine make", "value" "honda engine" }, { "name" "features", "value" "mulching lawn mower" } ] }, "fulfillment" { "pickup" false, "ship to store" true, "ship to home" true, "scheduled delivery" false, "ship to store info" { "store id" "6242", "store state" "stamford", "store name" "ct", "stock level" 2427, "in stock" true }, "ship to home info" { "in stock" true, "stock level" 9999 } }, "offers" { "primary" { "price" 469, "regular price" 549, "symbol" "$", "currency" "usd" } } }, { "position" 2, "product" { "title" "ryobi 40v hp brushless 20 in cordless battery walk behind push mower with 6 0 ah battery and charger", "link" "https //www homedepot com/p/ryobi 40v hp brushless 20 in cordless battery walk behind push mower with 6 0 ah battery and charger ry401170vnm/317061059", "is bestseller" true, "is top rated" true, "brand" "ryobi", "item id" "317061059", "store sku" "1006431841", "model number" "ry401170vnm", "images" \[ "https //images thdstatic com/productimages/63e8deea ed6d 442d 8d0c 5a061c301bff/svn/ryobi push lawn mowers ry401170vnm 64 1000 jpg", "https //images thdstatic com/productimages/06034308 37ee 4a31 bcc2 94862828c43d/svn/ryobi push lawn mowers ry401170vnm e4 1000 jpg" ], "primary image" "https //images thdstatic com/productimages/63e8deea ed6d 442d 8d0c 5a061c301bff/svn/ryobi push lawn mowers ry401170vnm 64 1000 jpg", "rating" 4 7, "ratings total" 835, "features" \[ { "name" "power type", "value" "battery" }, { "name" "cutting width (in )", "value" "20 inches" }, { "name" "voltage (v)", "value" "40v" }, { "name" "size of yard", "value" "1/4 1/2 acre" }, { "name" "battery run time (min )", "value" "48" } ] }, "fulfillment" { "pickup" true, "ship to store" false, "ship to home" true, "scheduled delivery" false, "pickup info" { "store id" "6242", "store state" "stamford", "store name" "ct", "stock level" 9, "in stock" true }, "ship to home info" { "in stock" true, "stock level" 9999 } }, "offers" { "primary" { "price" 299, "symbol" "$", "currency" "usd" } } }, { "position" 3, "product" { "title" "ryobi 40v hp brushless 21 in cordless battery walk behind self propelled lawn mower with (2) 6 0 ah batteries and charger", "link" "https //www homedepot com/p/ryobi 40v hp brushless 21 in cordless battery walk behind self propelled lawn mower with 2 6 0 ah batteries and charger ry401140us/314600837", "is exclusive" true, "brand" "ryobi", "item id" "314600837", "store sku" "1005788802", "model number" "ry401140us", "images" \[ "https //images thdstatic com/productimages/6edf6453 7ea4 4e52 9478 b4fc3cf850e6/svn/ryobi self propelled lawn mowers ry401140us 64 1000 jpg", "https //images thdstatic com/productimages/06034308 37ee 4a31 bcc2 94862828c43d/svn/ryobi self propelled lawn mowers ry401140us e4 1000 jpg" ], "primary image" "https //images thdstatic com/productimages/6edf6453 7ea4 4e52 9478 b4fc3cf850e6/svn/ryobi self propelled lawn mowers ry401140us 64 1000 jpg", "rating" 4 5, "ratings total" 1766, "features" \[ { "name" "cutting width (in )", "value" "21 inches" }, { "name" "power type", "value" "battery" }, { "name" "size of yard", "value" "1/2 1 acre" }, { "name" "features", "value" "mulching lawn mower" }, { "name" "rear wheel height (in )", "value" "high wheel" } ] }, "fulfillment" { "pickup" false, "ship to store" true, "ship to home" true, "scheduled delivery" false, "ship to store info" { "store id" "6242", "store state" "stamford", "store name" "ct", "stock level" 408, "in stock" true }, "ship to home info" { "in stock" true, "stock level" 9999 } }, "offers" { "primary" { "price" 499, "regular price" 549, "symbol" "$", "currency" "usd" } } }, { "position" 4, "product" { "title" "toro flex force 22 in 60 volt cordless 2 tool combo kit recycler mower & 14 in /16 in string trimmer charger/2 batteries", "link" "https //www homedepot com/p/toro flex force 22 in 60 volt cordless 2 tool combo kit recycler mower 14 in 16 in string trimmer charger 2 batteries 66351/320792383", "sponsored" true, "brand" "toro", "item id" "320792383", "model number" "66351", "images" \[ "https //images thdstatic com/productimages/a3dd1331 9abd 4908 bde8 d24048693089/svn/toro self propelled lawn mowers 66351 64 1000 jpg", "https //images thdstatic com/productimages/ea72f0b1 c2dd 4595 b90d a3bc764953e9/svn/toro self propelled lawn mowers 66351 e4 1000 jpg" ], "primary image" "https //images thdstatic com/productimages/a3dd1331 9abd 4908 bde8 d24048693089/svn/toro self propelled lawn mowers 66351 64 1000 jpg", "rating" 0, "ratings total" 0, "features" \[ { "name" "cutting width (in )", "value" "22 inches" }, { "name" "power type", "value" "battery" }, { "name" "size of yard", "value" "1/4 1/2 acre" }, { "name" "rear wheel height (in )", "value" "high wheel" }, { "name" "drive type", "value" "rear wheel drive" } ] }, "fulfillment" { "pickup" false, "ship to store" true, "ship to home" true, "scheduled delivery" false, "ship to store info" { "store id" "6242", "store state" "stamford", "store name" "ct", "stock level" 158, "in stock" true }, "ship to home info" { "in stock" true, "stock level" 9999 } }, "offers" { "primary" { "price" 798 99, "symbol" "$", "currency" "usd" } } }, { "position" 5, "product" { "title" "ryobi 40v hp brushless 21 in cordless battery walk behind dual blade self propelled mower with (2) 6 0 ah batteries & charger", "link" "https //www homedepot com/p/ryobi 40v hp brushless 21 in cordless battery walk behind dual blade self propelled mower with 2 6 0 ah batteries charger ry401150us/314428494", "is top rated" true, "is exclusive" true, "brand" "ryobi", "item id" "314428494", "store sku" "1005788757", "model number" "ry401150us", "images" \[ "https //images thdstatic com/productimages/ede5f12d 4e02 4de1 8719 c77d0b32f0a8/svn/ryobi self propelled lawn mowers ry401150us 64 1000 jpg", "https //images thdstatic com/productimages/06034308 37ee 4a31 bcc2 94862828c43d/svn/ryobi self propelled lawn mowers ry401150us e4 1000 jpg" ], "primary image" "https //images thdstatic com/productimages/ede5f12d 4e02 4de1 8719 c77d0b32f0a8/svn/ryobi self propelled lawn mowers ry401150us 64 1000 jpg", "rating" 4 4, "ratings total" 1078, "features" \[ { "name" "cutting width (in )", "value" "21 inches" }, { "name" "power type", "value" "battery" }, { "name" "size of yard", "value" "1/2 1 acre" }, { "name" "features", "value" "mulching lawn mower" }, { "name" "rear wheel height (in )", "value" "high wheel" } ] }, "fulfillment" { "pickup" true, "ship to store" false, "ship to home" false, "scheduled delivery" true, "pickup info" { "store id" "6242", "store state" "stamford", "store name" "ct", "stock level" 4, "in stock" true }, "scheduled delivery info" { "in stock" false, "stock level" 11 } }, "offers" { "primary" { "price" 599, "symbol" "$", "currency" "usd" } } } ], "breadcrumbs" \[ { "name" "outdoors", "link" "https //www homedepot com/b/outdoors/n 5yc1vzbx82" }, { "name" "outdoor power equipment", "link" "https //www homedepot com/b/outdoors outdoor power equipment/n 5yc1vzbx5c" }, { "name" "lawn mowers", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/n 5yc1vzc5ar" } ], "related queries" \[ { "query" "dewalt cordless screwdriver" }, { "query" "dewalt screwdriver" }, { "query" "cordless screwdriver" }, { "query" "milwaukee electric screwdriver" }, { "query" "dewalt gyroscopic screwdriver" }, { "query" "cordless electric screwdriver" }, { "query" "dewalt drill" }, { "query" "electric screwdriver" } ], "facets" \[ { "name" "availability", "display name" "availability", "values" \[ { "display name" "show unavailable products", "value" "bwo5s", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/show unavailable products/n 5yc1vzc5arzbwo5s?ncni 5", "count" 0, "active" false } ] }, { "name" "category", "display name" "category", "values" \[ { "display name" "lawn mower parts", "value" "2fkp8zm", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers lawn mower parts/n 5yc1vz2fkp8zm", "count" 341, "active" false }, { "display name" "self propelled lawn mowers", "value" "c5ap", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers self propelled lawn mowers/n 5yc1vzc5ap", "count" 114, "active" false }, { "display name" "push lawn mowers", "value" "c5ah", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers push lawn mowers/n 5yc1vzc5ah", "count" 72, "active" false }, { "display name" "reel lawn mowers", "value" "c5av", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers reel lawn mowers/n 5yc1vzc5av", "count" 20, "active" false }, { "display name" "field mowers", "value" "c5aq", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers field mowers/n 5yc1vzc5aq", "count" 7, "active" false }, { "display name" "commercial lawn mowers", "value" "c7gx", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers commercial lawn mowers/n 5yc1vzc7gx", "count" 6, "active" false }, { "display name" "robotic lawn mowers", "value" "c5at", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers robotic lawn mowers/n 5yc1vzc5at", "count" 6, "active" false } ] }, { "name" "battery run time (min )", "display name" "battery run time (min )", "values" \[ { "display name" "60", "value" "1z183mn", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/60/n 5yc1vzc5arz1z183mn", "count" 30, "active" false }, { "display name" "0", "value" "1z183nb", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/0/n 5yc1vzc5arz1z183nb", "count" 18, "active" false }, { "display name" "40", "value" "1z183lz", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/40/n 5yc1vzc5arz1z183lz", "count" 14, "active" false }, { "display name" "70", "value" "1z183mv", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/70/n 5yc1vzc5arz1z183mv", "count" 14, "active" false }, { "display name" "45", "value" "1z183m1", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/45/n 5yc1vzc5arz1z183m1", "count" 8, "active" false }, { "display name" "0 0", "value" "1z1czwc", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/00/n 5yc1vzc5arz1z1czwc", "count" 7, "active" false }, { "display name" "43", "value" "1z1p8ko", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/43/n 5yc1vzc5arz1z1p8ko", "count" 7, "active" false }, { "display name" "30", "value" "1z183ln", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/30/n 5yc1vzc5arz1z183ln", "count" 6, "active" false }, { "display name" "50", "value" "1z183mc", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/50/n 5yc1vzc5arz1z183mc", "count" 6, "active" false }, { "display name" "1", "value" "1z1rutf", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/1/n 5yc1vzc5arz1z1rutf", "count" 3, "active" false }, { "display name" "240", "value" "1z183ne", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/240/n 5yc1vzc5arz1z183ne", "count" 3, "active" false }, { "display name" "25", "value" "1z183lf", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/25/n 5yc1vzc5arz1z183lf", "count" 3, "active" false }, { "display name" "120", "value" "1z183oy", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/120/n 5yc1vzc5arz1z183oy", "count" 2, "active" false }, { "display name" "20", "value" "1z183lb", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/20/n 5yc1vzc5arz1z183lb", "count" 2, "active" false }, { "display name" "48", "value" "1z1b6d4", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/48/n 5yc1vzc5arz1z1b6d4", "count" 2, "active" false }, { "display name" "90", "value" "1z183nn", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/90/n 5yc1vzc5arz1z183nn", "count" 2, "active" false }, { "display name" "0 00", "value" "1z1narh", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/000/n 5yc1vzc5arz1z1narh", "count" 1, "active" false }, { "display name" "180", "value" "1z183kp", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/180/n 5yc1vzc5arz1z183kp", "count" 1, "active" false }, { "display name" "42", "value" "1z1a9wt", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/42/n 5yc1vzc5arz1z1a9wt", "count" 1, "active" false }, { "display name" "75", "value" "1z183mw", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/75/n 5yc1vzc5arz1z183mw", "count" 1, "active" false } ] }, { "name" "voltage (v)", "display name" "voltage (v)", "values" \[ { "display name" "18v", "value" "1z17p5w", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/18v/n 5yc1vzc5arz1z17p5w", "count" 39, "active" false }, { "display name" "40v", "value" "1z17owe", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/40v/n 5yc1vzc5arz1z17owe", "count" 27, "active" false }, { "display name" "60v", "value" "1z17ozo", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/60v/n 5yc1vzc5arz1z17ozo", "count" 26, "active" false }, { "display name" "36v", "value" "1z17p7b", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/36v/n 5yc1vzc5arz1z17p7b", "count" 18, "active" false }, { "display name" "120v", "value" "1z17owx", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/120v/n 5yc1vzc5arz1z17owx", "count" 15, "active" false }, { "display name" "20v", "value" "1z17otq", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/20v/n 5yc1vzc5arz1z17otq", "count" 14, "active" false }, { "display name" "28v", "value" "1z17pk4", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/28v/n 5yc1vzc5arz1z17pk4", "count" 2, "active" false }, { "display name" "56v", "value" "1z17ovl", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/56v/n 5yc1vzc5arz1z17ovl", "count" 2, "active" false }, { "display name" "62v", "value" "1z1bur8", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/62v/n 5yc1vzc5arz1z1bur8", "count" 2, "active" false }, { "display name" "12v", "value" "1z17p15", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/12v/n 5yc1vzc5arz1z17p15", "count" 1, "active" false }, { "display name" "80v", "value" "1z1c2pv", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/80v/n 5yc1vzc5arz1z1c2pv", "count" 1, "active" false } ] }, { "name" "engine make", "display name" "engine make", "values" \[ { "display name" "oem branded engine", "value" "1z1s3yy", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/oem branded engine/n 5yc1vzc5arz1z1s3yy", "count" 63, "active" false }, { "display name" "briggs and stratton engine", "value" "1z1s3vq", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/briggs and stratton engine/n 5yc1vzc5arz1z1s3vq", "count" 35, "active" false }, { "display name" "ryobi engine", "value" "1z1s477", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/ryobi engine/n 5yc1vzc5arz1z1s477", "count" 7, "active" false }, { "display name" "honda engine", "value" "1z1s3xx", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/honda engine/n 5yc1vzc5arz1z1s3xx", "count" 5, "active" false }, { "display name" "troy bilt engine", "value" "1z1s4cc", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/troy bilt engine/n 5yc1vzc5arz1z1s4cc", "count" 2, "active" false }, { "display name" "kawasaki engine", "value" "1z1s49r", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/kawasaki engine/n 5yc1vzc5arz1z1s49r", "count" 1, "active" false }, { "display name" "stanley engine", "value" "1z1t3pz", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/stanley engine/n 5yc1vzc5arz1z1t3pz", "count" 1, "active" false } ] } ], "pagination" { "total results" 562, "total pages" 24, "current" { "page" 1, "link" "https //www homedepot com/s/lawn%20mower?ncni 5" }, "next" { "page" 2, "link" "https //www homedepot com/s/lawn%20mower?ncni 5=\&nao=24" } }, "location info" { "store id" "6242", "store name" "stamford", "zipcode" "06902" } } response times & concurrency backyard api gathers data in real time and will typically return a result in 1 6 seconds please inspect the http response code https //docs trajectdata com/backyardapi/response codes and update your app accordingly if you need to run large volumes of requests consider using the collections api https //docs trajectdata com/backyardapi/collections api/overview collections allow you to enqueue up to 15,000 requests, run them manually or on a schedule and execute them concurrently on backyard api's infrastructure getting data for an individual product get get /request lets say we want to change our query to request a different type of data information on a specific product https //docs trajectdata com/backyardapi/home improvement product data api/parameters/product , in this case the product with item id 317061059 here's the backyard api request to achieve that http https //api backyardapi com/request?api key=demo\&engine=homedepot\&type=product\&item id=317061059$ curl l get https //api backyardapi com/request \\ d api key="demo" \\ d engine="homedepot" \\ d type="product" \\ d item id="317061059"const axios = require('axios'); // set up the request parameters const params = { api key "demo", engine "homedepot", type "product", item id "317061059" } // make the http get request to backyard api axios get('https //api backyardapi com/request', { params }) then(response => { // print the json response from backyard api console log(json stringify(response data, 0, 2)); }) catch(error => { // catch and print the error console log(error); })import requests import json \# set up the request parameters params = { 'api key' 'demo', 'engine' 'homedepot', 'type' 'product', 'item id' '317061059' } \# make the http get request to backyard api api result = requests get('https //api backyardapi com/request', params) \# print the json response from backyard api print(json dumps(api result json()))\<?php \# set up the request parameters $querystring = http build query(\[ 'api key' => 'demo', 'engine' 'homedepot', 'type' 'product', 'item id' '317061059' ]); \# make the http get request to backyard api $ch = curl init(sprintf('%s?%s', 'https //api backyardapi com/request', $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); $api result = curl exec($ch); curl close($ch); \# print the json response from backyard api echo $api result; ?> the result of the product request is shown below for full documentation on product results see the product results https //docs trajectdata com/backyardapi/home improvement product data api/results/product docs { "request info" { "success" true, "credits used" 1, "credits remaining" 999 }, "request metadata" { "created at" "2020 01 01t00 00 00 000z", "processed at" "2020 01 01t00 00 00 001z", "total time taken" 0 1, "homedepot url" "https //www homedepot com/p/317061059" }, "request parameters" { "engine" "homedepot", "type" "product", "item id" "317061059" }, "product" { "link" "https //www homedepot com/p/ryobi 40v hp brushless 20 in cordless battery walk behind push mower with 6 0 ah battery and charger ry401170vnm/317061059", "brand" "ryobi", "brand link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers push lawn mowers/ryobi/n 5yc1vzm5dzc5ah", "title" "ryobi 40v hp brushless 20 in cordless battery walk behind push mower with 6 0 ah battery and charger", "upc" "046396037169", "item id" "317061059", "store sku" "1006431841", "model number" "ry401170vnm", "description" "ryobi continues to lead the industry in cordless mower innovation with their 40v hp 20 in brushless push mower combining 40v lithium ion battery power with brushless technology this mower delivers gas like power, without the hassle of gas, oil, or maintenance the high capacity 6 0 ah battery provides extended run time and instant power at the push of a button with the 3 in 1 mowing functions you can choose between bagging, mulching, or side discharge functions right out of the box select your ideal grass height with the 7 position single point height adjustment the easy lift bag removal allows you to quickly and easily empty the grass catcher bag and get back to work with folding handles, this mower easily folds down when the job is done and can be stored vertically making it ideal for compact spaces ", "is bestseller" true, "is top rated" true, "aisle" "52", "bay" "011", "collection" { "id" "family 308879048", "name" "family 308879048", "link" "https //www homedepot com/collection/outdoors/ryobi 40 volt collection/family 308879048?omsid=317061059" }, "feature bullets" \[ "includes 40v 6 0 ah battery and a quick charger", "3 in 1 capable right out of the box", "works with all ryobi 40v batteries" ], "feature bullets count" 3, "descriptive attributes" \[ "high performance brushless motor delivers maximum performance for gas like power", "push button for hassle free starting", "up to 48 minutes of runtime, ideal for 1/2 acre or less", "7 position, single point height adjustment from 1 5 in to 4 in ", "3 in 1 mulching, bagging and side discharge capable right out of the box", "easy lift bag removal", "folding handles for compact vertical storage", "on board battery storage compartment for easy battery exchange", "6 0 ah high capacity battery for extended run time", "includes quick charger for 2x faster charging", "5 year tool warranty, 3 year battery warranty" ], "descriptive attributes count" 14, "images" \[ { "link" "https //images thdstatic com/productimages/63e8deea ed6d 442d 8d0c 5a061c301bff/svn/ryobi push lawn mowers ry401170vnm 64 1000 jpg", "type" "primary" }, { "link" "https //images thdstatic com/productimages/06034308 37ee 4a31 bcc2 94862828c43d/svn/ryobi push lawn mowers ry401170vnm e1 1000 jpg", "type" "image left view" }, { "link" "https //images thdstatic com/productimages/f7b5f873 f7ca 400a b5df d7f338743245/svn/ryobi push lawn mowers ry401170vnm 40 1000 jpg", "type" "image right view" }, { "link" "https //images thdstatic com/productimages/3da668c3 3d5b 4508 87f6 700c6e6681f3/svn/ryobi push lawn mowers ry401170vnm a0 1000 jpg", "type" "image top view" }, { "link" "https //images thdstatic com/productimages/5317a55a d3e2 4ff4 a668 d6f45e76752e/svn/ryobi push lawn mowers ry401170vnm 1d 1000 jpg", "type" "image bottom view" }, { "link" "https //images thdstatic com/productimages/b7c36076 3358 46fc 9d1e e51e8c3bd0ac/svn/ryobi push lawn mowers ry401170vnm 66 1000 jpg", "type" "image back view" }, { "link" "https //images thdstatic com/productimages/0d2651b9 f713 42d6 a5d5 4503832b7b6a/svn/ryobi push lawn mowers ry401170vnm 77 1000 jpg", "type" "image open view" }, { "link" "https //images thdstatic com/productimages/7dfaf8a4 2818 449f ba88 f0b777999a4b/svn/ryobi push lawn mowers ry401170vnm c3 1000 jpg", "type" "image alternate view" }, { "link" "https //images thdstatic com/productimages/f896c50e f29d 46be af2a 9562e3a1722a/svn/ryobi push lawn mowers ry401170vnm 4f 1000 jpg", "type" "image alternate view 2" }, { "link" "https //images thdstatic com/productimages/2dad2206 d356 4fb2 8c37 33282dd81476/svn/ryobi push lawn mowers ry401170vnm 1f 1000 jpg", "type" "image alternate view 3" }, { "link" "https //images thdstatic com/productimages/cd083757 5d0b 4f8a 8ab6 013c316d3f39/svn/ryobi push lawn mowers ry401170vnm 44 1000 jpg", "type" "image alternate view 4" }, { "link" "https //images thdstatic com/productimages/857c441a b78e 4c61 a8c8 74137f447e83/svn/ryobi push lawn mowers ry401170vnm fa 1000 jpg", "type" "image alternate view 5" }, { "link" "https //images thdstatic com/productimages/ddfed769 c6ad 4eb9 a964 6c78ae69bd50/svn/ryobi push lawn mowers ry401170vnm 76 1000 jpg", "type" "image alternate view 6" }, { "link" "https //images thdstatic com/productimages/258875ba e76c 4c60 9504 3e2450d705bf/svn/ryobi push lawn mowers ry401170vnm d4 1000 jpg", "type" "image catalog view" }, { "link" "https //images thdstatic com/productimages/34320099 ed94 499d a848 b763fe8caf5c/svn/ryobi push lawn mowers ry401170vnm 31 1000 jpg", "type" "image life style" } ], "main image" { "link" "https //images thdstatic com/productimages/63e8deea ed6d 442d 8d0c 5a061c301bff/svn/ryobi push lawn mowers ry401170vnm 64 1000 jpg", "type" "primary" }, "ratings total" 103, "rating" 4 5, "specifications" \[ { "group name" "details", "name" "amperage (amps)", "value" "0" }, { "group name" "details", "name" "assembly required", "value" "no" }, { "group name" "details", "name" "battery amp hours", "value" "6 ah" }, { "group name" "details", "name" "battery run time (min )", "value" "48" }, { "group name" "details", "name" "battery type", "value" "lithium ion" }, { "group name" "details", "name" "battery/charger", "value" "(1) 6 ah battery & charger included" }, { "group name" "details", "name" "ca (carb) compliant", "value" "not carb compliant" }, { "group name" "details", "name" "charge time (hours)", "value" "1 5" }, { "group name" "details", "name" "charger included", "value" "charger included" }, { "group name" "details", "name" "cutting height options", "value" "7 position" }, { "group name" "details", "name" "cutting options", "value" "bag,mulch,side discharge" }, { "group name" "details", "name" "deck material", "value" "polymer composite" }, { "group name" "details", "name" "deck type", "value" "fabricated" }, { "group name" "details", "name" "engine make", "value" "oem branded engine" }, { "group name" "details", "name" "engine torque (ft lb )", "value" "0" }, { "group name" "details", "name" "features", "value" "adjustable cutting height,adjustable handlebar,bagger,brushless motor,collapsible,foldable handle,mulching lawn mower,no oil change required,residential,single lever height adjustment,tool free adjustments" }, { "group name" "details", "name" "included", "value" "bagger,battery(s),charger,wheels" }, { "group name" "details", "name" "lawn mower type", "value" "push mower" }, { "group name" "details", "name" "maximum cutting height (in )", "value" "4" }, { "group name" "details", "name" "minimum cutting height (in )", "value" "1 5" }, { "group name" "details", "name" "mower size type", "value" "standard" }, { "group name" "details", "name" "number of batteries required", "value" "1" }, { "group name" "details", "name" "number of blades", "value" "1" }, { "group name" "details", "name" "number of handlebar positions", "value" "2" }, { "group name" "details", "name" "number of total batteries included", "value" "1" }, { "group name" "details", "name" "power type", "value" "battery" }, { "group name" "details", "name" "product weight (lb )", "value" "43 lb" }, { "group name" "details", "name" "recommended terrain", "value" "flat,sloped" }, { "group name" "details", "name" "refurbished", "value" "no" }, { "group name" "details", "name" "returnable", "value" "90 day" }, { "group name" "details", "name" "size of yard", "value" "1/4 1/2 acre" }, { "group name" "details", "name" "start type", "value" "push button start" }, { "group name" "details", "name" "tools included", "value" "battery,charger" }, { "group name" "details", "name" "voltage (v)", "value" "40v" }, { "group name" "details", "name" "walk behind mower type", "value" "manual push" }, { "group name" "warranty / certifications", "name" "certifications and listings", "value" "ul certified" }, { "group name" "warranty / certifications", "name" "manufacturer warranty", "value" "5 year limited tool warranty, 3 year limited battery warranty" }, { "group name" "dimensions", "name" "assembled depth (in )", "value" "62 5 in" }, { "group name" "dimensions", "name" "assembled height (in )", "value" "39 in" }, { "group name" "dimensions", "name" "assembled width (in )", "value" "21 5 in" }, { "group name" "dimensions", "name" "blade length (in )", "value" "20" }, { "group name" "dimensions", "name" "cutting width (in )", "value" "20 inches" }, { "group name" "dimensions", "name" "front wheel size (in )", "value" "8" }, { "group name" "dimensions", "name" "mower deck width (in )", "value" "20" }, { "group name" "dimensions", "name" "rear wheel height (in )", "value" "high wheel" }, { "group name" "dimensions", "name" "rear wheel size (in )", "value" "10" } ], "breadcrumbs" \[ { "name" "outdoors", "link" "https //www homedepot com/b/outdoors/n 5yc1vzbx82" }, { "name" "outdoor power equipment", "link" "https //www homedepot com/b/outdoors outdoor power equipment/n 5yc1vzbx5c" }, { "name" "lawn mowers", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers/n 5yc1vzc5ar" }, { "name" "push lawn mowers", "link" "https //www homedepot com/b/outdoors outdoor power equipment lawn mowers push lawn mowers/n 5yc1vzc5ah" } ], "buybox winner" { "price" 299, "currency symbol" "$", "currency" "usd", "unit" "each", "fulfillment" { "pickup" true, "ship to store" false, "ship to home" true, "scheduled delivery" true, "pickup info" { "store id" "0121", "store state" "cumberland", "store name" "ga", "in stock" false, "stock level" 0 }, "scheduled delivery info" { "in stock" true, "stock level" 1, "price" 35, "start date" "2022 05 31", "end date" "2022 05 31", "delivery date name" "tomorrow" }, "ship to home info" { "store id" "8119", "store name" "ga", "in stock" true, "stock level" 1539, "price" 0, "start date" "2022 06 02", "end date" "2022 06 02", "delivery date name" "later" } } } } } localizing results to a zipcode backyard api allows you to retrieve results as they would be seen by a user in a given zipcode by specifying the zipcode or postal code in the customer zipcode request parameter for example, to request results as they would be seen by a user in us zipcode 77001 you should append the customer zipcode=77001 request parameter next steps searching for products on home improvement https //docs trajectdata com/backyardapi/home improvement product data api/parameters/search retrieving customer reviews https //docs trajectdata com/backyardapi/home improvement product data api/parameters/reviews retrieving product details https //docs trajectdata com/backyardapi/home improvement product data api/parameters/product