# Hm — 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.

> Search H&M's US product catalog by keyword and instantly retrieve detailed information like prices, product images, available sizes, and real-time stock availability. Perfect for comparing items, tracking product details, or building shopping applications powered by H&M's current inventory data.

**Category:** E-commerce | **Website:** [www.hm.com/](https://www.hm.com/) | **Docs:** [parse.bot/marketplace/e87f95b8-f63f-4a0b-a780-1ad3387f855d/hm-com-api](https://parse.bot/marketplace/e87f95b8-f63f-4a0b-a780-1ad3387f855d/hm-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-hm-com-api-e87f95b8/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_product_details

Get detailed product information by article code. Returns prices, sizes with stock status, color variants, images, and availability. The article_code can be found in search_products results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `article_code` | string | Yes | H&M article code (e.g., '1354317002'). Found in search_products results as article_code. |

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

### search_products

Search H&M products by keyword with pagination. Returns product listings with name, price, images, product URL, color swatches, and availability status. Uses the H&M search API which returns up to 36 products per page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination, starting at 1 |
| `query` | string | Yes | Search keyword (e.g., 'jacket', 'dress', 'shoes') |

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