# Tesco — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 Tesco's complete grocery catalog to find products with detailed nutritional information, ingredient lists, and customer reviews. Explore product suggestions via autocomplete and browse items organized by category to make informed shopping decisions.

**Category:** Food & Dining | **Website:** [tesco.com/](https://tesco.com/) | **Docs:** [parse.bot/marketplace/07b466cc-ad41-4625-8ee0-b278c24a8c18/tesco-com-api](https://parse.bot/marketplace/07b466cc-ad41-4625-8ee0-b278c24a8c18/tesco-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/tesco/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get product details

Retrieve full details for a specific product by its TPNC identifier. Returns ingredients, nutrition information, allergens, storage instructions, marketing copy, and customer reviews with ratings and distribution. Reviews are paginated separately via offset/limit within the response.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `reviews_limit` | integer | No | Number of reviews to return |
| `reviews_offset` | integer | No | Offset for reviews pagination |
| `tpnc` | string | Yes | Product ID (TPNC) from search_products results |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/tesco/get-product-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"reviews_limit":"<integer>","reviews_offset":"<integer>","tpnc":"<string>"}'
```

### Get promotions

Retrieve currently active public Tesco grocery promotions including Clubcard Prices, standard price reductions, and multibuy offers. Returns paginated product listings with promotional pricing and dates. Excludes personalised coupons, Marketplace products, clothing, and electronics.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `count` | integer | No | Number of items to return per page, maximum 50 |
| `page` | integer | No | Page number to retrieve |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/tesco/get-promotions \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"count":"<integer>","page":"<integer>"}'
```

### Get suggestions

Get search autocomplete suggestions for a partial or full query string. Returns a list of suggested search terms ranked by relevance. Useful for building type-ahead search UIs or discovering popular search variations.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of suggestions to return |
| `query` | string | Yes | Partial or full search term (e.g. 'milk', 'choc') |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/tesco/get-suggestions \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","query":"<string>"}'
```

### List category

List all products in a specific Tesco grocery category using a facet ID. Returns the same product structure as search_products. Facet IDs are base64-encoded category identifiers found via the Tesco website navigation. Pagination via integer page counter.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `count` | integer | No | Number of items to return per page |
| `facet` | string | Yes | Category facet ID (e.g. 'b;RnJlc2glMjBGb29k' for Fresh Food) |
| `page` | integer | No | Page number to retrieve |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/tesco/list-category \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"count":"<integer>","facet":"<string>","page":"<integer>"}'
```

### Search products

Full-text search over Tesco's grocery catalog. Returns paginated product listings with pricing, promotions, and ratings. Each result carries enough identity (tpnc) to drill into full details via get_product_details. Pagination via integer page counter; server default is 24 items per page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `count` | integer | No | Number of items to return per page |
| `page` | integer | No | Page number to retrieve |
| `query` | string | Yes | Search keyword (e.g. 'milk', 'bread', 'lactose free milk') |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/tesco/search-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"count":"<integer>","page":"<integer>","query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.