> For the complete documentation index, see [llms.txt](https://docs.scraperapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scraperapi.com/structured-data-endpoints/e-commerce/homedepot/homedepot-product-api.md).

# Home Depot Product API

The `Home Depot Product API` endpoint returns the details of a single Home Depot product.

{% tabs %}
{% tab title="cURL" %}

```bash
curl --request GET \
--url "https://api.scraperapi.com/structured/homedepot/product?api_key=API_KEY\
&item_id=ITEM_ID"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

payload = {
    "api_key": "API_KEY",
    "item_id": "ITEM_ID"
}

r = requests.get('https://api.scraperapi.com/structured/homedepot/product', params=payload)

print(r.text)
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
import fetch from 'node-fetch';

const params = new URLSearchParams({
  api_key: 'API_KEY',
  item_id: 'ITEM_ID'
});

fetch(`https://api.scraperapi.com/structured/homedepot/product?${params}`)
  .then(response => response.json())
  .then(data => {
    console.log(data);
  })
  .catch(error => {
    console.error(error);
  });
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
$params = array(
    'api_key' => 'API_KEY',
    'item_id' => 'ITEM_ID'
);
$url = "https://api.scraperapi.com/structured/homedepot/product?" . http_build_query($params);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);

$response = curl_exec($ch);
curl_close($ch);

print_r($response);
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
require 'json'

params = {
  :api_key => "API_KEY",
  :item_id => "ITEM_ID"
}

uri = URI('https://api.scraperapi.com/structured/homedepot/product')
uri.query = URI.encode_www_form(params)

website_content = Net::HTTP.get(uri)
print(website_content)
```

{% endtab %}

{% tab title="Java" %}

```java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;

public class Main {
    public static void main(String[] args) {
        try {
            String apiKey = "API_KEY";
            String itemId = URLEncoder.encode("ITEM_ID", StandardCharsets.UTF_8);

            String urlStr = "https://api.scraperapi.com/structured/homedepot/product?api_key="
                            + apiKey + "&item_id=" + itemId;

            URL url = new URL(urlStr);
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
            conn.setRequestMethod("GET");

            int responseCode = conn.getResponseCode();
            if (responseCode == HttpURLConnection.HTTP_OK) {
                BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
                StringBuilder response = new StringBuilder();
                String line;
                while ((line = in.readLine()) != null) {
                    response.append(line);
                }
                in.close();
                System.out.println(response.toString());
            } else {
                System.out.println("Error in API Call. Response code: " + responseCode);
            }

        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}
```

{% endtab %}
{% endtabs %}

**Supported Parameters**

<table><thead><tr><th width="397">Parameters</th><th>Details</th></tr></thead><tbody><tr><td><code>API_KEY</code> (required)</td><td>Your API Key.</td></tr><tr><td><code>ITEM_ID</code> (required)</td><td>Home Depot item number, the number at the end of the product URL. Required unless <code>GTIN</code> or <code>URL</code> is provided. <br><br><strong>Example:</strong> <code>320326855</code></td></tr><tr><td><code>GTIN</code></td><td><p>Product barcode (UPC, EAN or GTIN), used instead of <code>ITEM_ID</code>. <br><br><strong>Example:</strong> <code>045242637720</code> </p><p></p><p><strong>Note:</strong> The barcode must match exactly one Home Depot product. If it matches none or several, the response is <code>"Product not found."</code></p></td></tr><tr><td><code>URL</code></td><td><p>A Home Depot product page URL, used instead of <code>ITEM_ID</code>. </p><p></p><p><strong>Example:</strong> <code>https://www.homedepot.com/p/320326855</code></p></td></tr><tr><td><code>OUTPUT_FORMAT</code></td><td><p>This endpoint returns JSON output only. CSV is not supported.<br></p><p><strong>Options:</strong><br>• json (default)</p></td></tr></tbody></table>

{% hint style="info" %}
Only one product identifier is used per request. If you send more than one, `URL` takes priority, then `GTIN`, then `ITEM_ID`.
{% endhint %}

### Sample Response

```json
{
  "success": true,
  "payload": {
    "product": {
      "link": "https://www.homedepot.com/p/Milwaukee-M18-FUEL-18V-Lithium-Ion-Brushless-Cordless-1-2-in-Hammer-Drill-Driver-Tool-Only-2904-20/320326855",
      "brand": "Milwaukee",
      "brand_link": "https://www.homedepot.com/b/Tools-Power-Tools-Drills-Hammer-Drills/Milwaukee/N-5yc1vZc8wtZzv",
      "title": "Milwaukee M18 FUEL 18V Lithium-Ion Brushless Cordless 1/2 in. Hammer Drill/Driver (Tool-Only)",
      "upc": "045242637720",
      "item_id": "320326855",
      "parent_id": "313560694",
      "store_sku": "1007901514",
      "model_number": "2904-20",
      "description": "This compact drill, the M18 FUEL 1/2\" Hammer Drill Driver, is designed for trade professionals who demand the most power, the smallest size, and enhanced safety features. The drill delivers 1,400 in-lbs of torque and up to 2,100 RPM, giving users the speed and strength to tackle everything from large-diameter hole boring to heavy-duty anchor setting...",
      "is_bestseller": true,
      "is_exclusive": true,
      "feature_bullets": [
        "Most powerful compact cordless hammer drill in its class",
        "6.9\" in length for access into tight spaces and reduced fatigue",
        "Fastest drilling and driving applications under load"
      ],
      "feature_bullets_count": 3,
      "descriptive_attributes": [
        "Most Powerful Hammer Drill - This M18 FUEL hammer drill delivers 1,400 in-lbs of torque for the toughest applications",
        "Compact 6.9\" Length - This M18 FUEL drill is designed to provide superior access in tight space",
        "AutoStop Control Mode - M18 FUEL 1/2\" Hammer Drill/Driver power drill protects from over-rotation during bind-ups with industry-best reaction time"
      ],
      "descriptive_attributes_count": 16,
      "images": [
        {
          "link": "https://images.thdstatic.com/productImages/66a60fa5-5897-46a9-bfb4-60e508951421/svn/milwaukee-hammer-drills-2904-20-64_1000.jpg",
          "type": "primary"
        },
        {
          "link": "https://images.thdstatic.com/productImages/5368ac20-27de-4e79-9d7d-6f391dc1241c/svn/milwaukee-hammer-drills-2904-20-e1_1000.jpg",
          "type": "image_left_view"
        },
        {
          "link": "https://images.thdstatic.com/productImages/56d093d9-8003-4adc-aab7-7f45aae31019/svn/milwaukee-hammer-drills-2904-20-40_1000.jpg",
          "type": "image_right_view"
        }
      ],
      "main_image": {
        "link": "https://images.thdstatic.com/productImages/66a60fa5-5897-46a9-bfb4-60e508951421/svn/milwaukee-hammer-drills-2904-20-64_1000.jpg",
        "type": "primary"
      },
      "videos": [
        {
          "link": "https://fastly-signed-us-east-1-prod.brightcovecdn.com/media/v1/pmp4/static/clear/1834613806001/1eff5d6b-5372-4321-901e-fd3eafeadb9e/5fd7c759-e16b-4114-87d9-26e0599f5378/main.mp4?fastly_token=...",
          "title": "Milwaukee M18 FUEL Hammer Drill Driver",
          "id": "6309017467112",
          "thumbnail": "https://cf-images.us-east-1.prod.boltdns.net/v1/jit/1834613806001/1eff5d6b-5372-4321-901e-fd3eafeadb9e/main/160x90/57s994ms/match/image.jpg?pubId=66036796001",
          "description": "The MILWAUKEE M18 FUEL ½\" Hammer Drill Driver is the Industry's Most Powerful Hammer Drill, delivering the capability to drill the largest holes at high speed into the densest materials..."
        }
      ],
      "has_360_view": true,
      "ratings_total": 1687,
      "rating": 4.7,
      "specifications": [
        {
          "group_name": "Details",
          "name": "Battery Power Type",
          "value": "Lithium Ion"
        },
        {
          "group_name": "Details",
          "name": "Battery Voltage (V)",
          "value": "18V"
        },
        {
          "group_name": "Details",
          "name": "Maximum Speed (RPM)",
          "value": "2100 RPM"
        },
        {
          "group_name": "Warranty / Certifications",
          "name": "Manufacturer Warranty",
          "value": "5 Year Tool Warranty"
        },
        {
          "group_name": "Dimensions",
          "name": "Product Depth (in.)",
          "value": "6.95 in"
        }
      ],
      "breadcrumbs": [
        {
          "name": "Tools",
          "link": "https://www.homedepot.com/b/Tools/N-5yc1vZc1xy"
        },
        {
          "name": "Power Tools",
          "link": "https://www.homedepot.com/b/Tools-Power-Tools/N-5yc1vZc298"
        },
        {
          "name": "Drills",
          "link": "https://www.homedepot.com/b/Tools-Power-Tools-Drills/N-5yc1vZc27f"
        },
        {
          "name": "Hammer Drills",
          "link": "https://www.homedepot.com/b/Tools-Power-Tools-Drills-Hammer-Drills/N-5yc1vZc8wt"
        }
      ],
      "buybox_winner": {
        "price": 229,
        "currency_symbol": "$",
        "currency": "USD",
        "unit": "each"
      }
    }
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.scraperapi.com/structured-data-endpoints/e-commerce/homedepot/homedepot-product-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
