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

Loblaws Autocomplete API Documentation

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

Loblaws Autocomplete API returns type-ahead suggestions for a store and language. Use it to build search boxes before calling the search endpoint.

Pass a store_id from the stores endpoint. An empty or failed lookup is free and returns no items rather than an error. Costs 1 credit per successful request with suggestions.

Loblaws Autocomplete API Documentation 1 credit / request

Endpoint

Request preview
GET
https://scrappa.co/api/loblaws/autocomplete
Auth header
x-api-key
Cost
1 credit / request
query = coffee shops store_id = 1234567890
Response preview
200 OK
{
    "data": {
        "term": "milk",
        "items": [
            {
                "suggestion": "Milk"
            },
            {
                "suggestion": "Milk, 3.25%"
            }
        ],
        "banner": "loblaw",
        "language": "en",
        "store_id": "1099"
...

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.

2 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, e.g. 1099.

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

Response Schema

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

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "term": "milk",
        "items": [
            {
                "suggestion": "Milk"
            },
            {
                "suggestion": "Milk, 3.25%"
            }
        ],
        "banner": "loblaw",
        "language": "en",
        "store_id": "1099"
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "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": {
        "query": [
            "A search text is required, e.g. milk."
        ]
    },
    "message": "The request validation failed"
}
503

Upstream Unavailable

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

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "autocomplete"
    },
    "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.