# /acehardware/search/products

`POST /api/acehardware/search/products`

Price: 20 credits

Search Ace Hardware products by keyword with price, brand, rating, offer and attribute filters

## How to use it

Search the Ace Hardware catalogue by keyword; prices are those of the store set by store_id. attributes filters by the product attributes of the category set by category_id. Pass a returned id to the Ace Hardware product endpoint for specifications and features.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `store_id` (string, nullable) — Ace Hardware store number whose price is returned (examples: "09861", "18244")
- `count` (integer, required) — Max number of products to return (min: 1; max: 10000)
- `sort` (string) — Result ordering (default: "best_match"; one of: "best_match", "top_rated", "price_low_to_high", "price_high_to_low", "name_a_to_z", "name_z_to_a")
- `min_price` (number, nullable) — Minimum selling price in USD (min: 0)
- `max_price` (number, nullable) — Maximum selling price in USD (>: 0)
- `min_rating` (number, nullable) — Minimum customer rating (min: 1; max: 5)
- `brands` (array, nullable) — Brand names (examples: ["Craftsman"], ["Estwing","DeWalt"])
- `special_offers` (array, nullable) — Only products carrying one of these offers (one of: "ace_rewards", "buy_and_get", "buy_more_and_save", "clearance", "sale")
- `attributes` (object, nullable) — Product attribute filters as named on Ace Hardware listings: filter name to accepted values (examples: {"Handle Material":["Fiberglass Handle"]}, {"Claw Type":["Curved","Rip"]})
  - `*` (array)
- `query` (string, required) — Search keywords (examples: "claw hammer", "wood stain"; minLength: 1)
- `category_id` (string, nullable) — Ace Hardware category id to search within (examples: "2804", "341")

## Response

### 200 — Successful Response

- `@type` (string) (default: "AcehardwareProduct")
- `id` (string, required)
- `name` (string, nullable)
- `url` (string, nullable)
- `brand` (string, nullable)
- `description` (string, nullable)
- `short_description` (string, nullable)
- `images` (array) (default: [])
- `store_id` (string, nullable)
- `price` (number, nullable)
- `sale_price` (number, nullable)
- `msrp` (number, nullable)
- `min_price` (number, nullable)
- `max_price` (number, nullable)
- `min_msrp` (number, nullable)
- `max_msrp` (number, nullable)
- `price_list` (string, nullable)
- `sale_start_date` (string, nullable)
- `sale_end_date` (string, nullable)
- `special_offers` (array) (default: [])
- `discount_message` (string, nullable)
- `badge` (string, nullable)
- `rating` (number, nullable)
- `review_count` (integer, nullable)
- `weighted_rating` (number, nullable)
- `upc` (string, nullable)
- `upcs` (array) (default: [])
- `mfg_part_number` (string, nullable)
- `mfg_part_numbers` (array) (default: [])
- `product_type` (string, nullable)
- `product_type_code` (string, nullable)
- `product_noun` (string, nullable)
- `department` (string, nullable)
- `sub_category` (string, nullable)
- `categories` (array) (default: [])
  - `@type` (string) (default: "AcehardwareCategoryRef")
  - `id` (string, required)
  - `code` (string, nullable)
  - `name` (string, nullable)
- `product_usage` (string, nullable)
- `collection_ids` (array) (default: [])
- `collection_member_ids` (array) (default: [])
- `family_primary_id` (string, nullable)
- `bundle_component_ids` (array) (default: [])
- `accessory_ids` (array) (default: [])
- `replacement_part_ids` (array) (default: [])
- `is_purchasable` (boolean, nullable)
- `is_active` (boolean, nullable)
- `is_bundle` (boolean, nullable)
- `is_delivery_offered` (boolean, nullable)
- `is_third_party_delivery_eligible` (boolean, nullable)
- `is_pickup_only` (boolean, nullable)
- `is_assembly_required` (boolean, nullable)
- `is_display_only` (boolean, nullable)
- `is_restricted` (boolean, nullable)
- `order_multiple` (integer, nullable)
- `merchandise_class` (string, nullable)
- `online_stock_count` (integer, nullable)
- `fulfillment_types` (array) (default: [])
- `features` (array) (default: [])
- `specifications` (array) (default: [])
  - `@type` (string) (default: "AcehardwareSpecification")
  - `name` (string, required)
  - `value` (string, required)
- `whats_included` (string, nullable)
- `country_of_origin` (string, nullable)
- `vendor_name` (string, nullable)
- `warranty_url` (string, nullable)
- `has_prop65_warning` (boolean, nullable)
- `prop65_warning` (string, nullable)
- `package` (object, nullable)
  - `@type` (string) (default: "AcehardwarePackage")
  - `height` (number, nullable)
  - `width` (number, nullable)
  - `length` (number, nullable)
  - `dimension_unit` (string, nullable)
  - `weight` (number, nullable)
  - `weight_unit` (string, nullable)
- `online_sales_30d_count` (integer, nullable)
- `online_sales_90d_count` (integer, nullable)
- `online_sales_1y_count` (integer, nullable)
- `cost_price_margin` (number, nullable)
- `created_at` (integer, nullable)
- `updated_at` (integer, nullable)
- `first_available_at` (integer, nullable)
- `catalog_start_at` (integer, nullable)
- `corrected_query` (string, nullable)

## Errors

### 422 — Validation Error

No Ace Hardware store has this store number, or a filter name or value does not apply.

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

No Ace Hardware category has this category_id.

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

