# Pepper — 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 deals, coupons, and product categories from Pepper.pl, a popular Polish community marketplace, with the ability to search specific offers and read community comments. Filter deals by category, view detailed information about each offer, and discover the latest coupon codes available.

**Category:** Marketplaces | **Website:** [pepper.pl/](https://pepper.pl/) | **Docs:** [parse.bot/marketplace/bce1f3d7-b032-4c10-9352-dc090b28e082/pepper-pl-api](https://parse.bot/marketplace/bce1f3d7-b032-4c10-9352-dc090b28e082/pepper-pl-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-pepper-pl-api-bce1f3d7/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_categories

Retrieve the list of deal categories (groups) available on pepper.pl. Each category has a display name and a URL slug usable with get_deals_by_category. Returns all categories in a single response without pagination.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pepper-pl-api-bce1f3d7/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_coupons

Fetch current coupons and voucher codes from the pepper.pl coupons page. Returns active and recently expired promotional codes with merchant, discount amount, code, and expiration information. Single-page response.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pepper-pl-api-bce1f3d7/get_coupons \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_deal_comments

Fetch comments for a specific deal by its numeric thread ID. Returns paginated user comments with usernames, text, relative timestamps, and reply counts. The thread_id is available as the id field from get_deals or search_deals results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `thread_id` | string | Yes | Numeric thread/deal ID, e.g. 1295062. Available from get_deals results as the id field. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pepper-pl-api-bce1f3d7/get_deal_comments \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","thread_id":"<string>"}'
```

### get_deal_detail

Fetch full details of a single deal by its slug. The slug includes the deal name and numeric ID suffix (e.g. deal-name-123456). Returns the deal's complete description, pricing, store, temperature, and metadata. Returns input_not_found if the deal no longer exists.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Deal slug including numeric ID suffix, e.g. bianchi-arcadex-al-1295321. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pepper-pl-api-bce1f3d7/get_deal_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### get_deals

Fetch a paginated list of deals from the pepper.pl homepage. Supports sorting by tab: popularne (popular, default), najgoretsze (hottest ever), gorace (hot now), nowe (new). Each page returns up to ~20 deals. Paginate by incrementing the page number until an empty array is returned.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `tab` | string | No | Sort tab for the deal listing. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pepper-pl-api-bce1f3d7/get_deals \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","tab":"<string>"}'
```

### get_deals_by_category

Fetch deals filtered by a specific category slug. Use get_categories to discover available slugs. Returns paginated results; increment page until empty.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `slug` | string | Yes | Category slug from get_categories, e.g. elektronika, klocki-lego, sport. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pepper-pl-api-bce1f3d7/get_deals_by_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","slug":"<string>"}'
```

### search_deals

Search for deals using a keyword query. Returns paginated results matching the search term across deal titles and descriptions. Paginate by incrementing page until an empty array is returned.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `query` | string | Yes | Search keyword or phrase. |

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