# Ahlens — 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 and browse products from Åhléns Swedish department store to get pricing, images, brands, and category information, with autocomplete suggestions to help you find what you're looking for. Access detailed product information and explore items across different categories in real-time.

**Category:** E-commerce | **Website:** [ahlens.se/](https://ahlens.se/) | **Docs:** [parse.bot/marketplace/81b9217f-abf8-44a8-a9aa-e178b71a5f55/ahlens-se-api](https://parse.bot/marketplace/81b9217f-abf8-44a8-a9aa-e178b71a5f55/ahlens-se-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-ahlens-se-api-81b9217f/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### autocomplete

Get search autocomplete suggestions for a partial query. Returns matching products (without size variants), category links, brand links, and content page links. Useful for building search-as-you-type interfaces or discovering related categories and brands.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Partial search query (e.g. 'jack', 'klän') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ahlens-se-api-81b9217f/autocomplete \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### browse_category

Browse products within a specific category path on Åhléns. Returns paginated products with the same structure as search_products. Category paths follow the site hierarchy (e.g. '/dam/jackor' for women's jackets). Sort controls result ordering.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | Yes | Category path (e.g. '/dam/jackor', '/herr/byxor', '/barn', '/skonhet') |
| `limit` | integer | No | Number of products to return per page. |
| `skip` | integer | No | Number of products to skip for pagination. |
| `sort` | string | No | Sort order for results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ahlens-se-api-81b9217f/browse_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","limit":"<integer>","skip":"<integer>","sort":"<string>"}'
```

### get_product

Fetch detailed product information by product key UUID. Returns enriched data including care/washing description, material composition, season, brand URL, and product category not available in search or browse results. The product key is a UUID obtained from search_products or browse_category results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_key` | string | Yes | Product UUID key from search_products or browse_category results |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ahlens-se-api-81b9217f/get_product \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_key":"<string>"}'
```

### search_products

Full-text search over Åhléns product catalog by keyword. Returns paginated products with brand, title, prices, images, colors, categories, stock levels, and size variants. Paginates via skip/limit offsets. Each product exposes variant-level stock and pricing. Sort controls result ordering; default is relevance-ranked.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Number of products to return per page. |
| `query` | string | Yes | Search keyword (e.g. 'jacka', 'klänning', 'skor') |
| `skip` | integer | No | Number of products to skip for pagination. |
| `sort` | string | No | Sort order for results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ahlens-se-api-81b9217f/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","query":"<string>","skip":"<integer>","sort":"<string>"}'
```
