PetSmart API endpoint
Returns PetSmart's own search suggestions for partial text, each with its relative popularity and how many products it matches exactly. Useful for completing a search phrase before calling /petsmart/search. Pass country=ca for the Canadian catalog.
/petsmart/suggestQuery parameters: country (optional, us default or ca), query (required, partial text such as dog fo) and limit (optional, default 8, maximum 20).
| Field | Filled in, of 8 checked | Values in the sample |
|---|---|---|
| query | 8 | “dog food” and 7 other values |
| popularity | 8 | 914 to 78,080, median 1,522 |
| product_count | 8 | 38 to 6,102, median 358 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| country | string | No | Optional catalog: us (default) or ca for the Canadian store, which has its own products (about 9,000), categories, filters and prices. Allowed values: us, ca. | us | |
| query | string | Yes | Partial search text to complete, for example dog fo. | dog fo | |
| limit | integer | No | 8 | Optional suggestions returned. Defaults to 8, maximum 20. | 8 |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/petsmart/suggest?country=us&query=dog+fo&limit=10" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"country": "us",
"query": "dog fo",
"suggestions": [
{
"query": "dog food",
"popularity": 79098,
"product_count": 4889
}
]
}
}Request schema
No body schema
Response schema
#/definitions/petsmart.suggestResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | Code is the HTTP status code or a custom code used to indicate the result of the request @example 200 | |||
| data | petsmart.SuggestResponse | No | ||||
| data.country | string | No | ||||
| data.query | string | No | ||||
| data.suggestions | array | No | ||||
| data.suggestions[].popularity | integer | No | Popularity is PetSmart's relative search volume for the phrase. | |||
| data.suggestions[].product_count | integer | No | ProductCount is how many products the phrase matches exactly. | |||
| data.suggestions[].query | string | No | ||||
| msg | unknown | No | Msg is the message that describes the result of the request @example "Request successful" |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/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/petsmart/suggest?country=us&query=dog+fo&limit=10" \
-H "x-api-key: $CRAWLORA_API_KEY"