Search
GET /request
The Search Parameters are applicable when making a request with type=search to retrieve search results from Target. The search term is specified in the search_term parameter. The parameters should be appended as querystring parameters to the Target Product Data API GET HTTP request.
Search results are retrieved from the Search results page on Target.
For example, to request search results for the search term highlighter pens , sorted by "best selling products", the request would be:
The following parameters are available for all requests made when type=search .
Parameter | Required | Description |
---|---|---|
search_term | required | A search term to use to search for Target items. Either the search_term or url parameter must be supplied. |
category_id | optional | 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 as these are known-good category IDs from Target. Category IDs can also be retrieved from any Target URL in the category Target URL querystring parameter. |
sort_by | optional | Determines how the results are sorted. Valid values are:
|
delivery_type | optional | Determines whether results are filtered to just those matching the given delivery type. Valid values are:
|
rating | optional | Determines whether results are filtered to just those matching the given customer star rating. Valid values are:
|
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. See the 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=search 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. Facet IDs should be expressed in comma seperated notation, with each facet ID delimited by a comma (",") character. 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 search results page to retrieve results from. 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 Search Results