# Phia — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 fashion products across multiple retailers, compare prices in real-time, and discover visually similar items and editorial recommendations. Get autocomplete suggestions, browse popular trends by brand, and access detailed product information including price assessments to make smarter shopping decisions.

**Category:** E-commerce | **Website:** [phia.com/](https://phia.com/) | **Docs:** [parse.bot/marketplace/79037c43-6fba-4a24-9b79-4fd51b74ea94/phia-com-api](https://parse.bot/marketplace/79037c43-6fba-4a24-9b79-4fd51b74ea94/phia-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/phia/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get autocomplete suggestions

Returns autocomplete search suggestions for a partial query string. Each suggestion includes a keyword and type classification. Used to power search-as-you-type UI.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Partial search text to get suggestions for |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/phia/get-autocomplete-suggestions \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### Get brand products

Browse products for a specific brand by name. Returns paginated results with product details. Use the brand display name from get_explore_brands as the brand_id parameter.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `brand_id` | string | Yes | Brand display name (e.g., 'Gucci', 'Reformation', 'Prada') |
| `limit` | integer | No | Max results per page |
| `offset` | integer | No | Pagination offset |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/phia/get-brand-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"brand_id":"<string>","limit":"<integer>","offset":"<integer>"}'
```

### Get editorial products

Retrieves all products within a specific editorial collection. Use collection_id from get_editorials. Returns product details including brand, price, and link to the retailer page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `collection_id` | string | Yes | Collection ID from get_editorials (e.g., 'collection-202601-652503') |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/phia/get-editorial-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"collection_id":"<string>"}'
```

### Get editorials

Retrieves curated editorial collections featured on Phia. Each editorial has an author, title, cover image, target gender, and collection ID used to fetch its products via get_editorial_products.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/phia/get-editorials \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get explore brands

Retrieves the paginated list of browseable fashion brands on Phia. Each brand has a display name, logo URL, and website link. Sorted alphabetically.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Max brands to return |
| `offset` | integer | No | Pagination offset |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/phia/get-explore-brands \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>"}'
```

### Get popular searches

Retrieves the current list of trending/popular search terms curated by Phia. Each entry includes rank, category, and trending status. The list refreshes periodically.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/phia/get-popular-searches \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get price assessment

Returns price intelligence for a product: deal classification, resale value ratio, market comparisons with first-hand and second-hand listing counts. Requires the product's retailer URL, name, brand, and current price.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `brand` | string | Yes | Brand name |
| `name` | string | Yes | Product name |
| `price` | number | Yes | Current price in USD |
| `product_url` | string | Yes | Full URL of the product on the retailer's website |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/phia/get-price-assessment \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"brand":"<string>","name":"<string>","price":"<number>","product_url":"<string>"}'
```

### Get product details

Finds a single product by name or description search. Returns the top matching product with price, image, retailer info, and sale status. Returns stale_input if no match found.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Product name or search term to find (e.g., 'Gucci Ophidia Mini Bag') |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/phia/get-product-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### Get visually similar products

Finds visually similar products across sites for a given item. Returns products split into top matches (same brand) and similar style (different brands). Requires the product's URL, name, brand, and price.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `brand` | string | Yes | Brand name |
| `name` | string | Yes | Product name |
| `price` | number | Yes | Current price in USD |
| `product_url` | string | Yes | URL of the product page |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/phia/get-visually-similar-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"brand":"<string>","name":"<string>","price":"<number>","product_url":"<string>"}'
```

### Lookup product by url

Looks up price intelligence data for any product by its external retailer URL. Scrapes product info from the URL and returns resale insights including deal type and average resale value. Useful for evaluating products found on other sites.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_url` | string | Yes | Full URL of the product on the retailer's website |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/phia/lookup-product-by-url \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"product_url":"<string>"}'
```

### Search products

Full-text search over fashion products across 40,000+ sites. Returns paginated results ordered by relevance with product name, price, retailer, image, and sale status. Pagination via offset; each page returns up to `limit` items. The `hasMore` flag indicates additional pages exist.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Max results per page |
| `offset` | integer | No | Pagination offset |
| `query` | string | Yes | Search keyword (e.g., 'gucci bag', 'summer dress') |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/phia/search-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.