# Stockx — 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 and browse StockX products to access detailed pricing, market trends, and historical sales data all in one place. Compare sneaker and streetwear prices across listings, track price history, and discover product information to stay informed on the resale market.

**Category:** Marketplaces | **Website:** [stockx.com/](https://stockx.com/) | **Docs:** [parse.bot/marketplace/69bef3f1-0f9f-406c-a953-38c6b9a9fe7d/stockx-com-api](https://parse.bot/marketplace/69bef3f1-0f9f-406c-a953-38c6b9a9fe7d/stockx-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/stockx/`
**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

### Bulk search by style ids

Look up multiple products by their sneaker style IDs (e.g. DZ5485-612, DD1391-100) in a single request. Returns a list of StyleMatch objects, one per queried style ID, containing product data (title, url_key, brand, model, market prices) or null fields if not found. Useful for batch price checks.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `style_ids` | string | Yes | Comma-separated style IDs (e.g. 'DZ5485-612,DD1391-100'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/stockx/bulk-search-by-style-ids \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"style_ids":"<string>"}'
```

### Get price history

Retrieve market statistics and pricing data for a product by URL key. Includes annual averages, 90-day stats, 72-hour activity, price volatility, premium over retail, and current bid/ask spread. Complements get_product_details with deeper statistical data.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url_key` | string | Yes | Product URL key (e.g. 'nike-dunk-low-retro-white-black-2021', 'air-jordan-1-retro-high-og-chicago-reimagined-lost-and-found'). |

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

### Get product details

Fetch the full detail record for a single product by its URL key. Includes description, release metadata, variant list, and live market data (bid/ask/last sale/annual stats). The url_key is the slug portion of the StockX product URL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url_key` | string | Yes | Product URL key (e.g. 'air-jordan-1-retro-high-og-chicago-reimagined-lost-and-found', 'nike-dunk-low-retro-white-black-2021'). |

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

### Search products

Full-text search over StockX product catalog. Returns paginated product summaries with current market bid/ask pricing. An empty query returns featured/trending products. Paginates via integer page counter; each ProductSummary exposes a .details() navigation to the full Product.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Max results per page. |
| `page` | integer | No | Page number (1-indexed). |
| `query` | string | No | Search keyword (e.g. 'jordan 1', 'nike dunk'). Leave empty to browse featured products. |
| `sort` | string | No | Sort order for results. |

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