# Restoration Hardware — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Browse Restoration Hardware's furniture and home décor catalog by exploring categories, searching for specific products, and viewing detailed information including images and related items. Get comprehensive product details, pricing, and recommendations to find exactly what you're looking for across RH's entire collection.

**Category:** E-commerce | **Website:** [rh.com/](https://rh.com/) | **Docs:** [parse.bot/marketplace/207fde3c-9581-4d69-b6d2-9dbef32ac35a/rh-com-api](https://parse.bot/marketplace/207fde3c-9581-4d69-b6d2-9dbef32ac35a/rh-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-rh-com-api-207fde3c/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_category_products

Retrieve products within a specific category. Returns the same paginated result format as search_products. Delegates internally to the search endpoint with the category_id pinned. Pagination is manual via the offset parameter.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | Yes | Category ID (e.g., 'cat160024'). Obtain from get_subcategories. |
| `limit` | integer | No | Max results per page. |
| `offset` | integer | No | Pagination offset (number of records to skip). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-rh-com-api-207fde3c/get_category_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<string>","limit":"<integer>","offset":"<integer>"}'
```

### get_product_details

Retrieve detailed information for a specific product including description, dimensions, pricing, available configuration options (width, depth, fabric), and images. Returns stale_input when the product ID does not exist.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Product ID (e.g., 'prod6490263'). Obtain from search_products or get_category_products results via records[*].repositoryId. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-rh-com-api-207fde3c/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### get_product_images

Retrieve all image URLs for a specific product, including the main image and alternate/lifestyle images. Returns protocol-relative URLs (prefixed with //).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Product ID (e.g., 'prod6490263'). Obtain from search_products or get_category_products results via records[*].repositoryId. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-rh-com-api-207fde3c/get_product_images \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### get_related_products

Retrieve related/upsell products for a given product. Uses the upsellIds from the product's priceRangeDisplay to fetch companion items. Returns an empty items array if the product has no related products.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Product ID (e.g., 'prod6490263'). Obtain from search_products or get_category_products results via records[*].repositoryId. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-rh-com-api-207fde3c/get_related_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### get_subcategories

Retrieve the full navigation tree of product categories from rh.com. Returns a single root category object containing nested child categories up to 3 levels deep. Each category includes an id, displayName, targetUrl, and childCategories array. Use category IDs from this tree to filter search_products or call get_category_products.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-rh-com-api-207fde3c/get_subcategories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_products

Search for products by keyword or category ID. Returns paginated results with product records including name, image, and pricing. Some search terms may redirect to category pages — the scraper follows these redirects automatically. At least one of query or category_id should be provided. Pagination is manual via the offset parameter.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | No | Category ID to filter by (e.g., 'cat160024'). Obtain from get_subcategories. |
| `limit` | integer | No | Max results per page. |
| `offset` | integer | No | Pagination offset (number of records to skip). |
| `query` | string | No | Search keyword (e.g., 'sofa', 'table lamp'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-rh-com-api-207fde3c/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<string>","limit":"<integer>","offset":"<integer>","query":"<string>"}'
```
