Skip to content
Scrappa Get API key
Loblaws API 1 credit / request

Loblaws Search API Documentation

GET https://scrappa.co/api/loblaws/search

Loblaws Search API searches Loblaws and PC Express products of one store. Each item has the product id, article number, brand, title, image, link, price, was price, unit price, availability and PC Optimum fields where present.

A store_id is required because prices and stock depend on the store. Find ids with the stores endpoint. The answer echoes facets and sorts from the source. price_min and price_max apply to the products of the requested page. sort orders the products of the requested page. No page is relabelled as filtered. The source has no per-item category field, so no category filter is offered. About 48 items per page. Costs 1 credit per successful request. Empty results and failed requests are free.

Loblaws Search API Documentation 1 credit / request

Endpoint

Request preview
GET
https://scrappa.co/api/loblaws/search
Auth header
x-api-key
Cost
1 credit / request
query = coffee shops store_id = 1234567890
Response preview
200 OK
{
    "data": {
        "from": 1,
        "page": 1,
        "items": [
            {
                "id": "20160571_EA",
                "uom": "EA",
                "link": "https://www.loblaws.ca/3-25-homogenized-milk/p/20160571_EA",
                "brand": "PC",
                "price": 7.44,
                "title": "3.25% Homogenized Milk",
                "images": [
                    "https://digital.loblaws.ca/PCX/20160571_EA/en/1/20160571_en_front_1200.png"
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

2 required parameters needed before sending a request.

6 optional filters available.

query string Required

Search text, 1 to 120 characters, for example milk.

Example value coffee shops
store_id string Required

Public store id, for example 1099. Find ids with the stores endpoint.

Example value 1234567890
banner string Optional

loblaw or nofrills (default loblaw).

Example value example
language string Optional

en or fr (default en).

Example value en
page integer Optional

One-based page number, 1 to 400.

Example value 1
price_min number Optional

Keep items at or above this price. Applies to the products of the requested page.

Example value 10
price_max number Optional

Keep items at or below this price. Applies to the products of the requested page.

Example value 10
sort string Optional

price_asc, price_desc or title_asc. Applies to the products of the requested page.

Example value relevance

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data success
JSON Response
200 OK
{
    "data": {
        "from": 1,
        "page": 1,
        "items": [
            {
                "id": "20160571_EA",
                "uom": "EA",
                "link": "https://www.loblaws.ca/3-25-homogenized-milk/p/20160571_EA",
                "brand": "PC",
                "price": 7.44,
                "title": "3.25% Homogenized Milk",
                "images": [
                    "https://digital.loblaws.ca/PCX/20160571_EA/en/1/20160571_en_front_1200.png"
                ],
                "on_sale": false,
                "currency": "CAD",
                "position": 1,
                "was_price": 7.44,
                "unit_price": 0.19,
                "description": "Fresh homogenized milk",
                "availability": null,
                "display_price": "$7.44",
                "regular_price": 7.44,
                "article_number": "20160571",
                "package_sizing": "4 l, $0.19/100ml",
                "unit_price_unit": "100ml"
            }
        ],
        "query": "milk",
        "sorts": [
            {
                "code": "recommended",
                "label": "Recommended"
            }
        ],
        "banner": "loblaw",
        "facets": [],
        "language": "en",
        "per_page": 48,
        "store_id": "1099",
        "pagination": {
            "is_last": false,
            "has_more": true,
            "page_size": 48,
            "page_number": 1,
            "total_results": 130
        },
        "has_next_page": true,
        "total_results": 130
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A required parameter or a value is invalid. This response is not billable.

{
    "errors": {
        "store_id": [
            "A store id is required, e.g. 1099. Find ids with the stores endpoint."
        ]
    },
    "message": "The request validation failed"
}
503

Upstream Unavailable

Loblaws could not be reached. This response is not billable. Retry shortly.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "search"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "Loblaws could not be reached. Please retry shortly."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.