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.
Run this endpoint
Endpoint
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.
string
Required
Search text, 1 to 120 characters, for example milk.
coffee shops
string
Required
Public store id, e.g. 1099.
1234567890
string
Optional
en or fr (default en).
en
Response Schema
Example response fields are illustrative; inspect the JSON before integrating.
Example response fields
Scan these fields before integrating.
data
meta
success
{
"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.
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"
}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.