# Loft — 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 and search Loft's product catalog, view detailed product information, explore categories and rankings, and discover store locations. Find exactly what you're looking for with powerful search and filtering across their entire online inventory.

**Category:** E-commerce | **Website:** [loft.co.jp/](https://loft.co.jp/) | **Docs:** [parse.bot/marketplace/1ecb9b29-3dd4-4a56-af77-63581f037693/loft-co-jp-api](https://parse.bot/marketplace/1ecb9b29-3dd4-4a56-af77-63581f037693/loft-co-jp-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-loft-co-jp-api-1ecb9b29/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_categories

Retrieve the full category tree including main categories and their subcategories. Each category has a code usable with get_category_products. No input parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-loft-co-jp-api-1ecb9b29/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_category_products

Browse products within a specific category by its category code (obtainable from get_categories). Returns paginated product listings for that category.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_code` | string | Yes | Category code from get_categories (e.g. ccb100001 for Cosmetics, ccb200003 for Cosmetics/Makeup). |
| `page` | integer | No | Page number. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-loft-co-jp-api-1ecb9b29/get_category_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_code":"<string>","page":"<integer>"}'
```

### get_product_details

Retrieve full details for a single product by its JAN/barcode product ID. Returns pricing, stock status, images, specifications, category breadcrumb, and purchase availability. A separate fetch per product — not batched.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Product ID (JAN/barcode number, e.g. 4550376124245). |

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

### get_ranking

Retrieve product rankings by ranking code. Returns products ordered by popularity with their rank position.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ranking_code` | string | No | Ranking code (e.g. rr00 for overall ranking). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-loft-co-jp-api-1ecb9b29/get_ranking \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ranking_code":"<string>"}'
```

### get_store_locations

Retrieve store locations. Without shop_id returns a list of all shops with their IDs and names. With shop_id returns detailed information for a specific store.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `shop_id` | string | No | Shop ID for specific store details. If omitted, lists all shops. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-loft-co-jp-api-1ecb9b29/get_store_locations \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"shop_id":"<string>"}'
```

### search_products

Full-text search over the Loft product catalog. query matches product names and descriptions. Results are paginated and sortable. Each page returns up to limit products with total_count for the full result set.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Number of results per page. Accepted values: 20, 40, 80. |
| `page` | integer | No | Page number to retrieve. |
| `query` | string | Yes | Search keyword. |
| `sort` | integer | No | Sort order. |

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