# Graybar — 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 discover electrical products on Graybar by name, SKU, or manufacturer part number, and view detailed specifications including pricing and availability.

**Category:** E-commerce | **Website:** [graybar.com/](https://graybar.com/) | **Docs:** [parse.bot/marketplace/9819b729-ac5d-4e94-8931-2c492ba36961/graybar-com-api](https://parse.bot/marketplace/9819b729-ac5d-4e94-8931-2c492ba36961/graybar-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-graybar-com-api-9819b729/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_product_details

Retrieve full product details for a given Graybar SKU. Returns name, brand, manufacturer number, pack size, product specification attributes, availability, and alternate product SKUs. Pricing and availability fields may be null for unauthenticated sessions.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `sku` | string | Yes | Graybar product SKU (numeric string, e.g. '88225178'). |

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

### search_by_mpn

Search for products by Manufacturer Part Number (MPN). Delegates to Graybar's part-number search and returns matching products. Results may include fuzzy matches. Always returns page 0 (no pagination).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `mpn` | string | Yes | Manufacturer Part Number to search for. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-graybar-com-api-9819b729/search_by_mpn \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mpn":"<string>"}'
```

### search_products

Full-text search over Graybar's product catalog by keyword or SKU. Returns a paginated list of matching products with SKU, name, and price (null for unauthenticated sessions). Manufacturers facet extracted when available. Pagination is zero-based; each page returns up to 20 items.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Zero-based page number for pagination. |
| `query` | string | Yes | Search keyword or SKU to search for. |

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