PetSmart API endpoint
Returns how many units of a product PetSmart reports in each store, as store number and quantity, highest stock first, with totals over every store that has a record (stores_with_record, stores_in_stock, total_units). Narrow with store_id (repeatable) and min_quantity; limit caps the list (default 100, maximum 2000) without changing the totals. Store numbers are PetSmart's own; PetSmart's store locator is not available anonymously, so this endpoint does not map them to addresses. An unknown SKU returns a 404.
/petsmart/product/inventoryTotals cover every store that has a record, before the filters below apply: stores_with_record, stores_in_stock and total_units.
Query parameters: id (required, the SKU), store_id (optional, repeatable PetSmart store numbers), min_quantity (optional, default 0, which includes out-of-stock stores) and limit (optional, default 100, maximum 2000).
| Field | Filled in, of 40 checked | Values in the sample |
|---|---|---|
| store_id | 40 | |
| quantity | 40 | 22 to 50, median 28 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| id | integer | Yes | Product SKU, from /petsmart/search's id field. | 5252900 | |
| store_id | integer | No | Optional PetSmart store numbers to return, repeatable. Omit for every store with a record. | 100 | |
| min_quantity | integer | No | 0 | Optional minimum units in stock for a store to be listed. Defaults to 0, which includes stores that are out of stock. | 1 |
| limit | integer | No | 100 | Optional stores returned, highest stock first. Defaults to 100, maximum 2000. | 100 |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/petsmart/product/inventory?id=5252900&limit=10" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"id": 5252900,
"stores_with_record": 1500,
"stores_in_stock": 427,
"total_units": 1028,
"returned": 2,
"stores": [
{
"store_id": 9,
"quantity": 30
},
{
"store_id": 100,
"quantity": 8
}
]
}
}Request schema
No body schema
Response schema
#/definitions/petsmart.inventoryResponseDoc
| 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.InventoryResponse | No | ||||
| data.id | integer | No | ||||
| data.returned | integer | No | ||||
| data.stores | array | No | ||||
| data.stores[].quantity | integer | No | ||||
| data.stores[].store_id | integer | No | ||||
| data.stores_in_stock | integer | No | ||||
| data.stores_with_record | integer | No | StoresWithRecord, StoresInStock and TotalUnits describe every store PetSmart reports for the product, before store_id, min_quantity and limit apply. | |||
| data.total_units | 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 |
| 404 | Not Found | #/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/product/inventory?id=5252900&limit=10" \
-H "x-api-key: $CRAWLORA_API_KEY"