# Lider — 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 browse products from Lider Supermercado's catalog to compare prices, explore categories, and check real-time availability across Chile. Get detailed product information including pricing and category organization to help you shop efficiently online or in-store.

**Category:** Food & Dining | **Website:** [www.lider.cl/inicio](https://www.lider.cl/inicio) | **Docs:** [parse.bot/marketplace/c8690f22-1c37-420f-91a4-b40a48c7c2a7/lider-cl-api](https://parse.bot/marketplace/c8690f22-1c37-420f-91a4-b40a48c7c2a7/lider-cl-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-lider-cl-api-c8690f22/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### browse_category

Browse products within a specific category by its path ID. Returns paginated results with the same product structure as search. Category IDs are underscore-separated numeric paths obtained from search results' category field (e.g. '45669105_39354732' for Leche under Lácteos).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | Yes | Category path ID using underscore-separated numeric segments (e.g. '45669105_39354732'). Obtained from product category paths in search results. |
| `page` | integer | No | Page number for pagination (1-based). |
| `sort` | string | No | Sort order for results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-lider-cl-api-c8690f22/browse_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<string>","page":"<integer>","sort":"<string>"}'
```

### search_products

Full-text search across all supermarket products. Returns paginated results with product name, brand, price, category hierarchy, and stock status. Results are auto-iterated across pages; each page contains up to ~50 products.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1-based). |
| `query` | string | Yes | Search term (e.g. 'leche', 'arroz', 'detergente'). |
| `sort` | string | No | Sort order for results. |

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