# Phia — 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 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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-phia-com-api-79037c43/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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.paywithlocus.com/api/wrapped/parse-phia-com-api-79037c43/get_autocomplete_suggestions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-phia-com-api-79037c43/get_brand_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-phia-com-api-79037c43/get_editorial_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-phia-com-api-79037c43/get_editorials \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-phia-com-api-79037c43/get_explore_brands \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-phia-com-api-79037c43/get_popular_searches \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-phia-com-api-79037c43/get_price_assessment \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-phia-com-api-79037c43/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-phia-com-api-79037c43/get_visually_similar_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-phia-com-api-79037c43/lookup_product_by_url \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-phia-com-api-79037c43/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","query":"<string>"}'
```
