# Nuphy — 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.

> Browse and search NuPhy's mechanical keyboard catalog, view detailed product specifications, explore curated collections, and discover the store's best-selling keyboards. Get instant access to product information and recommendations to find the perfect keyboard for your needs.

**Category:** E-commerce | **Website:** [nuphy.com/](https://nuphy.com/) | **Docs:** [parse.bot/marketplace/c3950a6a-3176-44ff-8baf-37b5727057a5/nuphy-com-api](https://parse.bot/marketplace/c3950a6a-3176-44ff-8baf-37b5727057a5/nuphy-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-nuphy-com-api-c3950a6a/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_best_sellers

Get best-selling products from NuPhy store ordered by popularity. Supports pagination via page number. Equivalent to get_collection_products with collection_handle='best-selling-products'.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of products per page (1-250). |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-nuphy-com-api-c3950a6a/get_best_sellers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>"}'
```

### get_collection_products

Get products from a specific collection by its handle. Useful for browsing categories and curated product lists. Supports pagination via page number.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `collection_handle` | string | Yes | Collection URL handle (e.g. 'keyboards', 'keycaps', 'switches', 'best-selling-products', 'new-arrivals', 'gaming-keyboards', 'office-keyboards'). |
| `limit` | integer | No | Maximum number of products per page (1-250). |
| `page` | integer | No | Page number for pagination. |

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

### get_product_details

Get full details for a specific product by its URL handle, including all variants, options, images, and description HTML. The handle is the URL slug portion of the product page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `handle` | string | Yes | Product URL handle (e.g. 'air75-v2', 'nuphy-wh80-gaming-keyboard'). Available from search_products or get_collection_products results. |

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

### search_products

Search for NuPhy products by keyword. Returns matching products with pricing, availability, and image data. Results come from Shopify's suggest endpoint, limited to a maximum of 10 results per query.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results to return. Must be between 1 and 10. |
| `query` | string | Yes | Search query string (e.g. 'keyboard', 'switch', 'keycap'). |

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