Kroger API endpoint
Returns Kroger's own search-box suggestions for a (possibly empty) query, sourced directly from Kroger's public suggestions API rather than the rendered search page. An empty query returns Kroger's default "trending" shopping shortcuts instead of an error. location_id scopes results to one Kroger store and defaults to a confirmed-working store id when omitted.
/kroger/suggestQuery parameters:
query (optional) — partial search text. Omit it to get Kroger's own
default "trending" shopping shortcuts (a real response shape, not an
error case) instead of term suggestions.location_id (optional) — a Kroger store/location id that scopes
suggestions. Defaults to a confirmed-working store id when omitted.Notable response behavior:
suggestions has a type — SUGGESTION for a term
suggestion, TRENDING for a default shopping shortcut shown when query
is omitted — passed through from Kroger's own API rather than validated
against a fixed list, so a future third type still surfaces.spelling_correction is set only when query returned zero suggestions
and Kroger judged it a likely typo (e.g. Marble cake → maple cake); it
is omitted otherwise.suggestions list (with or without
spelling_correction) is a normal, successful response — not an error.| Field | Filled in, of 5 checked | Values in the sample |
|---|---|---|
| type | 5 | SUGGESTION in all 5 |
| value | 5 | “onion ring” and 4 other values |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| query | string | No | Partial search text; omit for trending default suggestions | rin | |
| location_id | string | No | Kroger store/location id | 03500917 | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/kroger/suggest?query=coffee" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"query": "rin",
"location_id": "03500917",
"suggestions": [
{
"type": "SUGGESTION",
"value": "onion ring"
},
{
"type": "SUGGESTION",
"value": "pork rind"
},
{
"type": "SUGGESTION",
"value": "white castle chicken ring"
},
{
"type": "SUGGESTION",
"value": "rinse aid"
},
{
"type": "SUGGESTION",
"value": "frozen onion ring"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/kroger.suggestResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | kroger.SuggestResponse | No | ||||
| data.location_id | string | No | ||||
| data.query | string | No | ||||
| data.spelling_correction | string | No | SpellingCorrection is Kroger's own suggested respelling of Query, set only when Query returned zero suggestions and Kroger judged it a likely typo (confirmed live: "Marble cake" -> "maple cake" with an empty Suggestions list). | |||
| data.suggestions | array | No | ||||
| data.suggestions[].type | string | No | ||||
| data.suggestions[].value | string | No | ||||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 429 | Too Many Requests | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/kroger/suggest?query=coffee" \
-H "x-api-key: $CRAWLORA_API_KEY"