# Sainsbury's Search API Documentation

<p>Search public Sainsbury's grocery products. Each item has name, brand, size, price, promotion, unit price, image, rating and category. Prices are GBP. 1 credit per successful request with data.</p>

- **Documentation:** [https://scrappa.co/docs/sainsburys-api/sainsburys_search](https://scrappa.co/docs/sainsburys-api/sainsburys_search)
- **API group:** Sainsbury's API
- **Endpoint:** `GET https://scrappa.co/api/sainsburys/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | Yes | Search text, for example milk. |
| `page` | integer | No | Page from 1 to 20, default 1. |
| `sort` | string | No | -relevance, price, -price or -customer rating. |
| `category` | string | No | Category id from filters or taxonomy. |

## Example response

```json
{
    "data": {
        "page": 1,
        "items": [
            {
                "id": "product_uid",
                "name": "Sainsbury's Milk",
                "price": 1.4,
                "currency": "GBP"
            }
        ],
        "query": "milk"
    },
    "meta": {
        "credits": 1,
        "endpoint_family": "search"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Filter Not Honoured | The requested sort or category was not returned by the source. |
| 503 | Source Unavailable | The public source could not be reached. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
