---
title: Category
slug: redcircleapi/target-product-data-api/parameters/category
docTags: 
createdAt: 2024-07-27T14:22:43.825Z
---

# Category Parameters

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

The Category Parameters are applicable when making a request with  `type=category`  to retrieve category results from Target. The category is specified in the  `category_id`  parameter. The parameters should be appended as querystring parameters to the Target Product Data API `GET` HTTP request.

Category results are retrieved from the [Category results page](https://www.target.com/c/-/N-pmrkg) on Target.

![](https://apiimages.imgix.net/redcircleapi/images/png/docs/category.png?auto=format\&ixlib=react-9.5.1-beta.1\&w=600 "Category Results Page")

For example, to request category results for the  `category_id`  of  `pmrkg`  (the trampolines category on Target), the request would be:

:::CodeblockTabs
HTTP

```HTTP
https://api.redcircleapi.com/request?api_key=demo&type=category&category_id=pmrkg
```

```curl
curl -L --get https://api.redcircleapi.com/request
-d api_key="demo"
-d type="category"
-d category_id="pmrkg"
```

```nodejs
const axios = require('axios');

// set up the request parameters
const params = {
  api_key: "demo",
  type: "category",
  category_id: "pmrkg"
}

// make the http GET request to RedCircle API
axios.get('https://api.redcircleapi.com/request', { params })
  .then(response => {

    // print the JSON response from RedCircle API
    console.log(JSON.stringify(response.data, 0, 2));

  }).catch(error => {
    // catch and print the error
    console.log(error);
  })
```

```python
import requests
import json

# set up the request parameters
params = {
  'api_key': 'demo',
  'type': 'category',
  'category_id': 'pmrkg'
}

# make the http GET request to RedCircle API
api_result = requests.get('https://api.redcircleapi.com/request', params)

# print the JSON response from RedCircle API
print(json.dumps(api_result.json()))
```
:::

***

### Category Parameters

The following parameters are available for all requests made when  `type=category` .

| *`Parameter`*            | *`Required`*        | *`Description`*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------------ | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *`category_id`*          | <u>*`required`*</u> | A category ID to retrieve results from. You may supply any arbitary value in the `category_id` parameter however we recommend using a category ID returned from the [Categories API ](https://docs.trajectdata.com/redcircleapi/categories-api/overview)as these are known-good category IDs from Target.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| *`sort_by`*              | *`optional`*        | Determines how the results are sorted. Valid values are:<br />1. `best_seller`<br />2. Sort results by best selling products first.<br /><br />1. `price_high_to_low`<br />2. Sort results by highest to lowest priced.<br /><br />1. `price_low_to_high`<br />2. Sort results by lowest to highest priced.<br /><br />1. `best_match`<br />2. Sort results by best match.<br /><br />1. `highest_rating`<br />2. Sort results by highest rated products first.<br /><br />1. `newly_listed`<br />2. Sort results by newest products first<br /><br />1. `featured`<br />2. Sort results by featured products first<br />- <br />:inlineImage[]{src="https://apiimages.imgix.net/redcircleapi/images/png/docs/search_sort_by.png?auto=format&ixlib=react-9.5.1-beta.1&w=150" alt caption}                      |
| *`delivery_type`*        | *`optional`*        | Determines whether results are filtered to just those matching the given delivery type. Valid values are:<br />1. `in_store_pickup`<br />2. Filter results to products available in store (use the `customer_zipcode` parameter to specify the store).<br /><br />1. `same_day_delivery`<br />2. Filter results to products available via same-day delivery.<br /><br />1. `buy_at_store`<br />2. Filter results to products available via "Buy it at the Store" (use the `customer_zipcode` parameter to specify the store).<br /><br />1. `ship_to_home`<br />2. Filter results to products available via ship-to-home delivery.<br />- <br />:inlineImage[]{src="https://apiimages.imgix.net/redcircleapi/images/png/docs/search_delivery_type.png?auto=format&ixlib=react-9.5.1-beta.1&w=150" alt caption} |
| *`rating`*               | *`optional`*        | Determines whether results are filtered to just those matching the given customer star rating. Valid values are:<br />1. `one_star`<br />2. Filter results to products with a 1 to 1.9 star customer rating.<br /><br />1. `two_star`<br />2. Filter results to products with a 2 to 2.9 star customer rating.<br /><br />1. `three_star`<br />2. Filter results to products with a 3 to 3.9 star customer rating.<br /><br />1. `four_star`<br />2. Filter results to products with a 4 to 5 star customer rating.<br /><br />1. `five_star`<br />2. Filter results to products with a 5 star customer rating.<br />- <br />:inlineImage[]{src="https://apiimages.imgix.net/redcircleapi/images/png/docs/search_rating.png?auto=format&ixlib=react-9.5.1-beta.1&w=150" alt caption}                           |
| *`include_out_of_stock`* | *`optional`*        | Set to `true` to include out of stock products or `false` (the default) to exclude them.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| *`page`*                 | *`optional`*        | The current page of results to retrieve. Inspect the `pagination` results property for details on the number of pages available.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| *`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/redcircleapi/target-product-data-api/pagination)docs for more information.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| *`facets`*               | *`optional`*        | A free-form set of filter facet IDs to use with the request. Available facet IDs are returned from `type=category` requests in the `id` property of the `facets` array. Facet IDs can also be retrieved from any Target URL in the `facetedValue` Target URL querystring parameter.  <br />Facet IDs should be expressed in comma seperated notation, with each facet ID delimited by a comma (",") character.  <br />For example, to set the `Sold By` facet to the value `Target` (facet ID `dq4mn` ), and the `Color` facet to the value `Blue` (facet ID `5y70h` ), the `facets` request parameter would be `facets=dq4mn,5y70h`                                                                                                                                                                           |
| *`url`*                  | *`optional`*        | The Target category results page to retrieve results from.  <br />**Note** : If the `url` parameter is supplied then all other parameters are ignored as they are overriden be those specified in the `url` parameter.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |

***

**Next Steps**
     [Category Results](https://docs.trajectdata.com/redcircleapi/target-product-data-api/results/category)
