---
title: Reviews
slug: backyardapi/home-improvement-product-data-api/parameters/reviews
docTags: 
createdAt: 2024-07-23T14:57:52.062Z
---

# Reviews Parameters

<font color="#52c41a">`GET`</font>  `/request`

The Reviews Parameters are applicable when making a request with  `type=reviews`  to retrieve customer Reviews for a single product on Home Depot - the product is specified using either the  `item_id`  or  `url`  parameter (where the  `url`  parameter contains a link to a Home Improvement product page). The parameters should be appended as querystring parameters to the Home Improvement Product Data API `GET` HTTP request.

Reviews are retrieved from the [customer reviews page](https://www.homedepot.com/p/317061059) for a single product on Home Depot.

![](https://apiimages.imgix.net/backyardapi/images/png/docs/reviews.png?auto=format\&ixlib=react-9.5.1-beta.1\&w=600 "Customer Reviews Page")

For example, to request reviews sorted by most helpful ( `sort_by=most_helpful` ), for the Item ID  `317061059` , the request would be:

:::CodeblockTabs
HTTP

```HTTP
https://api.backyardapi.com/request?api_key=demo&engine=homedepot&type=reviews&item_id=317061059&sort_by=most_helpful
```

```curl
curl -L --get https://api.backyardapi.com/request 
-d api_key="demo" 
-d engine="homedepot" 
-d type="reviews" 
-d item_id="317061059" 
-d sort_by="most_helpful"
```

```nodejs
curl -L --get https://api.backyardapi.com/request 
-d api_key="demo" 
-d engine="homedepot" 
-d type="reviews" 
-d item_id="317061059" 
-d sort_by="most_helpful"
```

```python
import requests
import json

# set up the request parameters
params = {
  'api_key': 'demo',
  'engine': 'homedepot',
  'type': 'reviews',
  'item_id': '317061059',
  'sort_by': 'most_helpful'
}

# 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
import requests
import json

# set up the request parameters
params = {
  'api_key': 'demo',
  'engine': 'homedepot',
  'type': 'reviews',
  'item_id': '317061059',
  'sort_by': 'most_helpful'
}

# 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()))
```
:::

***

### Reviews Parameters

The following parameters are available for all requests made when  `type=reviews`  in addition to the Common Parameters.

| `Parameter`     | `Required` | `Description`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| --------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `item_id`       | `required` | The Home Improvement Item ID to retrieve Reviews for.  <br />**Note** : If the `item_id` parameter is supplied then the `url` parameter is ignored.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `gtin`          | `optional` | The GTIN/ISBN/UPC code to look up a matching product on Home Improvement for to retrieve reviews for. If the `gtin` parameter is supplied then the `item_id` parameter is ignored. GTIN-based requests work by looking up the GTIN/ISBN/UPC on Home Improvement first, then retrieving the reviews for the first matching `item_id` .                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `url`           | `optional` | The Home Improvement reviews-page URL to retrieve Reviews from.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `sort_by`       | `optional` | Determines the sort order of reviews to return. Valid values are:<br />1) `photo_reviews`&#x20;
2) Returns reviews with photos first.<br /><br />1) `most_helpful`&#x20;
2) Returns reviews with the most helpful reviews first.<br /><br />1) `newest_to_oldest`&#x20;
2) Returns reviews ordered from newest to oldest.<br /><br />1) `oldest_to_newest`&#x20;
2) Returns reviews ordered from oldest to newest.<br /><br />1) `high_to_low_rating`&#x20;
2) Returns reviews ordered highest to lowest rating.<br /><br />1) `low_to_high_rating`&#x20;
2) Returns reviews ordered lowest to highest rating.<br /><br />*
  ![](https://apiimages.imgix.net/backyardapi/images/png/docs/reviews_sort_by.png?auto=format\&ixlib=react-9.5.1-beta.1\&w=200) |
| `search_term`   | `optional` | A search term to use to search reviews.<br />*
  ![](https://apiimages.imgix.net/backyardapi/images/png/docs/reviews_search_term.png?auto=format\&ixlib=react-9.5.1-beta.1\&w=250)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `reviewer_type` | `optional` | The type of reviewer to retrieve reviews from. Valid values are:<br />1) `verified_purchase`&#x20;
2) Include reviews by Verified Purchasers only.<br /><br />1) `all`&#x20;
2) Include all reviews, regardless of whether they are from Verified Purchasers or not.<br /><br />*
  ![](https://apiimages.imgix.net/backyardapi/images/png/docs/verified_purchase.png?auto=format\&ixlib=react-9.5.1-beta.1\&w=150)                                                                                                                                                                                                                                                                                                                                         |
| `five_star`     | `optional` | -
  ![](https://apiimages.imgix.net/backyardapi/images/png/docs/reviews_five_star.png?auto=format\&ixlib=react-9.5.1-beta.1\&w=250)<br />Set to `true` to filter to only reviews that give the product a 5-star rating.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `four_star`     | `optional` | Set to `true` to filter to only reviews that give the product a 4-star rating.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `three_star`    | `optional` | Set to `true` to filter to only reviews that give the product a 3-star rating.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `two_star`      | `optional` | Set to `true` to filter to only reviews that give the product a 2-star rating.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `one_star`      | `optional` | Set to `true` to filter to only reviews that give the product a 1-star rating.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `page`          | `optional` | The current page of reviews to retrieve. Inspect the `pagination.total_pages` property in the [Reviews results ](https://docs.trajectdata.com/backyardapi/home-improvement-product-data-api/results/reviews)to see how many pages of reviews are available.  <br />**Note** the maximum number of reviews per page is `10` (this is a Home Improvement limit).                                                                                                                                                                                                                                                                                                                                                                                              |
| `max_page`      | `optional` | Use the `max_page` parameter to get multiple pages of results in one request. The API will automatically paginate through pages and concatenate the results into one response.  <br />See the [Pagination ](https://docs.trajectdata.com/backyardapi/home-improvement-product-data-api/pagination)docs for more information.                                                                                                                                                                                                                                                                                                                                                                                                                                |

***

**Next Steps**
     [Reviews Results](https://docs.trajectdata.com/backyardapi/home-improvement-product-data-api/results/reviews)
