PetSmart API endpoint
Returns every filter PetSmart's catalog offers (about 120, such as brand, pet type, food form, size, flavor and life stage) with each filter's top values and product counts, scoped to the same search arguments /petsmart/search takes so the counts describe the result set that search would return. facet_names always lists every valid filter name for /petsmart/search's filter parameter. Pass facet to list one filter's values (up to 1,000) and facet_query to search within them, for example brand names containing blue; numeric_ranges reports the spread of numeric attributes such as price and rating over the scoped products. An unknown facet returns a 400. Pass country=ca for the Canadian catalog.
/petsmart/search/filtersThe scope arguments are the same as /petsmart/search (query, category, brand, filter, min_price, max_price, min_rating), so the counts describe the result set that search would return.
Additional parameters:
country — us (default) or ca. Filter names, values and counts are per country (123 filters in the US catalog, 118 in Canada's).facet — list one filter's values (up to 1,000). Must be a name from facet_names; an unknown name returns a 400.facet_query — search within the values of facet, for example brand names containing blue. Requires facet; returns up to 100 matches.limit — values per filter. Default 10 (maximum 100) for all filters; with facet, maximum 1,000, or 100 together with facet_query.Response: total_results (products in scope), facet_names (every valid filter name for /petsmart/search's filter parameter, regardless of scope), facets[] (name, values[] of value/count, sorted by count) and numeric_ranges[] (min, max and average of numeric attributes such as price.number and bvAverageRating over the scoped products).
| Field | In the sample | Value in the sample |
|---|---|---|
| country | Has a value | “us” |
| total_results | Has a value | 0 |
| facet_names | Has a value | 123 entries |
| facets | Has a value | 1 entry |
| 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 | No | Optional keyword. | dog food | |
| category | string | No | Optional category path, from /petsmart/categories' path field (for example Dog > Food > Dry Food). Includes the category's descendants. A path not in the directory returns a 400. | Dog > Food > Dry Food | |
| brand | string | No | Optional exact brand name. Find values with /petsmart/search/filters using facet=brand and facet_query. | Blue Buffalo | |
| filter | string | No | Optional catalog filters as name:value, repeatable (for example customPet:Dog). Names and values come from /petsmart/search/filters; an unknown name returns a 400. Different names combine with AND; repeating one name combines its values with OR. | customPet:Dog | |
| min_price | number | No | Optional minimum price in dollars. | 10 | |
| max_price | number | No | Optional maximum price in dollars. | 60 | |
| min_rating | number | No | Optional minimum average customer rating, 0 to 5. | 4.5 | |
| facet | string | No | Optional single filter name to list values for, from facet_names. Without it every filter is returned with its top values. | brand | |
| facet_query | string | No | Optional text to search within the values of facet, for example brand names containing blue. Requires facet. | blue | |
| limit | integer | No | 10 (maximum 100 | Optional values per filter. Defaults to 10 (maximum 100) for all filters; with facet, maximum 1000, or 100 together with facet_query. | 20 |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/petsmart/search/filters?country=us&query=coffee&limit=10" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"country": "us",
"total_results": 944,
"facet_names": [
"brand",
"customPet",
"foodForms"
],
"facets": [
{
"name": "brand",
"values": [
{
"value": "Blue Buffalo",
"count": 82
},
{
"value": "Royal Canin",
"count": 74
}
]
}
],
"numeric_ranges": [
{
"name": "price.number",
"min": 0.99,
"max": 364.99,
"avg": 57.2
}
]
}
}Request schema
No body schema
Response schema
#/definitions/petsmart.filtersResponseDoc
| 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.FiltersResponse | No | ||||
| data.country | string | No | ||||
| data.facet_names | array | No | FacetNames lists every filter name /petsmart/search's filter parameter accepts, regardless of the scope. | |||
| data.facets | array | No | ||||
| data.facets[].name | string | No | ||||
| data.facets[].values | array | No | ||||
| data.facets[].values[].count | integer | No | ||||
| data.facets[].values[].value | string | No | ||||
| data.numeric_ranges | array | No | ||||
| data.numeric_ranges[].avg | number | No | ||||
| data.numeric_ranges[].max | number | No | ||||
| data.numeric_ranges[].min | number | No | ||||
| data.numeric_ranges[].name | string | No | ||||
| data.total_results | integer | 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/search/filters?country=us&query=coffee&limit=10" \
-H "x-api-key: $CRAWLORA_API_KEY"