# Gap — 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 Gap's product catalog by keyword or category, retrieve detailed product information including pricing, available sizes, colors, and customer reviews, get product recommendations, locate nearby Gap retail stores, and explore the full site navigation and category tree.

**Category:** E-commerce | **Website:** [gap.com/](https://gap.com/) | **Docs:** [parse.bot/marketplace/6fe2c68d-5dbc-433e-97c1-1867e42c7660/gap-com-api](https://parse.bot/marketplace/6fe2c68d-5dbc-433e-97c1-1867e42c7660/gap-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-gap-com-api-6fe2c68d/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### find_stores

Find Gap retail stores near a location by ZIP code. Returns store details including name, address, phone number, operating hours, special hours, distance in miles, and geographic coordinates.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `zip` | string | Yes | US ZIP code to search near (e.g. '10001', '90210') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gap-com-api-6fe2c68d/find_stores \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"zip":"<string>"}'
```

### get_category_products

Browse products within a specific Gap category by category ID. Returns paginated product listings grouped by style with color variants, pricing, and inventory status. Category IDs can be discovered via the get_navigation endpoint.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `cid` | string | Yes | Category ID (e.g. '5664' for Women's Jeans). Discoverable via get_navigation. |
| `limit` | integer | No | Number of products per page (max 120) |
| `page` | integer | No | Page number (0-indexed) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gap-com-api-6fe2c68d/get_category_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cid":"<string>","limit":"<integer>","page":"<integer>"}'
```

### get_navigation

Retrieve the site's full navigation structure and category tree. Returns the root node with nested divisions (Women, Men, Girls, Boys, etc.) and their subcategories, each with category IDs usable for get_category_products. Also includes brand site data and top search terms.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gap-com-api-6fe2c68d/get_navigation \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_product_details

Retrieve product details by product ID (PID). Returns title, description, brand, pricing, and review data parsed from the product detail page. The PID is the color-level ID (e.g. '728822002') from search or category results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `pid` | string | Yes | Product ID, the color-level ID from search results (e.g. '728822002') |

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

### get_product_reviews

Retrieve customer reviews for a product by its style ID. Returns paginated review results with ratings, comments, reviewer details, and rollup statistics including rating histograms and fit data. The style ID is the base product ID without the color suffix (e.g. '728822' not '728822002').

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number (0-indexed). Each page returns up to 25 reviews. |
| `pid` | string | Yes | Product style ID — the base product ID without color suffix (e.g. '728822') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gap-com-api-6fe2c68d/get_product_reviews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","pid":"<string>"}'
```

### get_recommendations

Retrieve product recommendations for a given product. Returns groups of recommendations such as 'Customers also viewed' and 'You might also like', each with scored product suggestions including pricing and ratings. Requires a color-level product ID.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `pid` | string | Yes | Product ID at the color level (e.g. '728822002') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gap-com-api-6fe2c68d/get_recommendations \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pid":"<string>"}'
```

### search_products

Full-text search over Gap.com product catalog by keyword. Returns paginated product listings with names, prices, color swatches, review scores, and facets. Pagination is 0-indexed. Each product contains multiple color variants with pricing and images.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Number of products per page (max 120) |
| `page` | integer | No | Page number (0-indexed) |
| `query` | string | Yes | Search keyword (e.g. 'jeans', 'shirt', 'dress') |

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