# Tesco — 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 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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-tesco-com-api-07b466cc/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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.paywithlocus.com/api/wrapped/parse-tesco-com-api-07b466cc/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-tesco-com-api-07b466cc/get_promotions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-tesco-com-api-07b466cc/get_suggestions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-tesco-com-api-07b466cc/list_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-tesco-com-api-07b466cc/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"count":"<integer>","page":"<integer>","query":"<string>"}'
```
