# Clicks — 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 for and browse thousands of products from Clicks, South Africa's leading pharmacy, health, home and beauty retailer, with access to detailed product information, pricing, and the complete category structure. Discover items by keyword search or explore products organized by category to find exactly what you need.

**Category:** E-commerce | **Website:** [www.clicks.co.za/](https://www.clicks.co.za/) | **Docs:** [parse.bot/marketplace/2247fc40-d214-4f78-beab-c3c5e7cb5860/clicks-co-za-api](https://parse.bot/marketplace/2247fc40-d214-4f78-beab-c3c5e7cb5860/clicks-co-za-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-clicks-co-za-api-2247fc40/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_categories

Get the category hierarchy. When called without a parent, returns top-level categories. When called with a parent path, returns its direct children. Each category includes a product count and full path usable in get_category_products.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `parent` | string | No | Parent category path to get children of (e.g. 'Beauty'). Omit to get top-level categories. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-clicks-co-za-api-2247fc40/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"parent":"<string>"}'
```

### get_category_products

Browse products within a category. Supports pagination and sorting. Category paths use ' > ' as separator (e.g. 'Beauty > Skincare'). Use get_categories to discover valid category paths.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | Yes | Category path using ' > ' separator (e.g. 'Beauty', 'Beauty > Skincare', 'Beauty > Skincare > Sun Care'). Obtain from get_categories endpoint. |
| `hits_per_page` | integer | No | Number of products per page (1-100). |
| `page` | integer | No | Zero-based page number for pagination. |
| `sort` | string | No | Sort order for results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-clicks-co-za-api-2247fc40/get_category_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","hits_per_page":"<integer>","page":"<integer>","sort":"<string>"}'
```

### get_product_details

Get full details for a single product by its numeric product ID (as returned in search_products or get_category_products results). Returns extended product information including variants, flags, and attributes.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Numeric product ID (e.g. '290870') from search_products or get_category_products results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-clicks-co-za-api-2247fc40/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### search_products

Search products by keyword. Returns paginated results with product details including price, availability, promotions, and category. One API call per page; use the page parameter to paginate through results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `hits_per_page` | integer | No | Number of products per page (1-100). |
| `page` | integer | No | Zero-based page number for pagination. |
| `query` | string | Yes | Search keyword or phrase (e.g. 'sunscreen', 'shampoo', 'vitamin c'). |

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