# Compraonline Alcampo — 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 Alcampo's online product catalog, view detailed product information, explore categories, check current promotions, and find nearby store locations across Spain. Access real-time data from Alcampo's online shopping platform to discover products, compare prices, and locate physical stores.

**Category:** Food & Dining | **Website:** [compraonline.alcampo.es/](https://compraonline.alcampo.es/) | **Docs:** [parse.bot/marketplace/75d273ca-3157-46b6-809a-a554c3fd90b9/compraonline-alcampo-es-api](https://parse.bot/marketplace/75d273ca-3157-46b6-809a-a554c3fd90b9/compraonline-alcampo-es-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-compraonline-alcampo-es-api-75d273ca/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_category_tree

Retrieve the full hierarchical category tree of the Alcampo online supermarket. Returns nested categories up to 4 levels deep with retailerCategoryId values usable in get_products_by_category. Single-page response containing all categories.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-compraonline-alcampo-es-api-75d273ca/get_category_tree \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_product_details

Fetch comprehensive details for a single product by its retailer product ID. Returns a flat product object with all details including description, ingredients, pricing, images, category breadcrumbs, and availability. Product IDs are obtained from search_products or get_products_by_category results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Retailer product ID (e.g. '54497', '54180'). Obtain from search_products or get_products_by_category decoratedProducts[].retailerProductId. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-compraonline-alcampo-es-api-75d273ca/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### get_products_by_category

Browse products within a specific retailer category. Returns paginated product groups with full product details. Use retailerCategoryId values from get_category_tree. Pagination via nextPageToken in metadata.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | Yes | Retailer category ID from get_category_tree (e.g. 'OCLAC', 'OCFYP', 'OC16', 'OC2112'). There are hundreds of categories available. |
| `page_size` | integer | No | Maximum number of products to return per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-compraonline-alcampo-es-api-75d273ca/get_products_by_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<string>","page_size":"<integer>"}'
```

### get_promotions

Get current promotions and offers from Alcampo. Returns featured and on-offer product groups with promotion details including discount descriptions. Pagination via nextPageToken in metadata.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page_size` | integer | No | Maximum number of products to return per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-compraonline-alcampo-es-api-75d273ca/get_promotions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page_size":"<integer>"}'
```

### get_store_locations

Find physical Alcampo store locations near given coordinates. Returns flattened store objects with name, address, contact info, distance from the search point, and current open/closed status.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `lat` | number | No | Latitude for the search center (default: Madrid center 40.4168). |
| `lng` | number | No | Longitude for the search center (default: Madrid center -3.7038). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-compraonline-alcampo-es-api-75d273ca/get_store_locations \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"lat":"<number>","lng":"<number>"}'
```

### search_products

Full-text search over Alcampo's online catalog. Returns product groups organized by relevance, with decorated product details including pricing, availability, images, and promotions. Results are grouped by type (personalized, cluster, on_offer). Pagination is token-based via nextPageToken in metadata.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page_size` | integer | No | Maximum number of products to return per page. |
| `query` | string | Yes | Search keyword (e.g. 'leche', 'pan', 'agua'). |

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