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

> Access data from asda.com.

**Category:** Food & Dining | **Website:** [asda.com/](https://asda.com/) | **Docs:** [parse.bot/marketplace/7de942aa-f24c-4b1d-9570-89c54bf53368/asda-com-api](https://parse.bot/marketplace/7de942aa-f24c-4b1d-9570-89c54bf53368/asda-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-asda-com-api-7de942aa/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_category_products

Browse products within a specific category. Returns paginated product listings for the given category ID. Use list_categories to discover valid category IDs. Pagination is 0-indexed.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | Yes | Category ID from list_categories endpoint (e.g. '1215684421136') |
| `limit` | integer | No | Max results per page (1-50) |
| `page` | integer | No | Page number (0-indexed) |

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

### get_product_details

Retrieve full details for a single product by its ID. Returns pricing, availability, ratings, promotions, and category information. Returns input_not_found if the product ID does not exist.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Product ID (e.g. '20504' from search_products results) |

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

### get_product_reviews

Retrieve customer reviews for a product. Returns up to 20 most recent reviews sorted by submission date descending, plus aggregate rating statistics including distribution. Returns empty reviews array if product has no reviews.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Product ID (e.g. '20504' from search_products results) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-asda-com-api-7de942aa/get_product_reviews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### get_rollback_offers

Get products currently on Rollback (price reduction). Returns paginated listings of products whose price has been reduced. Pagination is 0-indexed.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Max results per page (1-50) |
| `page` | integer | No | Page number (0-indexed) |

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

### list_categories

List all grocery categories in a flattened hierarchy. Returns top categories, departments, aisles, and shelves with parent-child relationships via parent_id. No input parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-asda-com-api-7de942aa/list_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_products

Full-text search over ASDA's grocery catalog. Returns paginated product listings matching the keyword query. Results include pricing, availability, promotions, and ratings. Pagination is 0-indexed.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Max results per page (1-50) |
| `page` | integer | No | Page number (0-indexed) |
| `query` | string | Yes | Search keyword (e.g. 'milk', 'butter', 'bread') |

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