Search PetSmart for pet food, treats, and supplies. The listing page is read with the website crawler.
query is a keyword, or a PetSmart search link. page starts at 1. Page 2 uses page=2.
A product link returns 400. Another website returns 400.
GET https://api.piloterr.com/v2/petsmart/search?query=dog+food
GET https://api.piloterr.com/v2/petsmart/search?query=cat+litter&page=2
GET https://api.piloterr.com/v2/petsmart/search?query=https://www.petsmart.com/search/?q=dog+food
| Parameter |
Type |
Required |
Description |
query |
string |
yes |
Keyword or PetSmart search URL. Placeholder: dog food. A product URL returns 400. |
page |
integer |
no |
Page number from 1. Placeholder: 1. |
return_page_source |
boolean |
no |
When true, the response is the raw HTML in result. |
Each item in results is one product card. price is the selling price shown on the card. price_display is that number in dollars. original_price is the crossed-out price when it is higher. price_label is text such as Options from when PetSmart prints it.
pagination.next is the next page URL, or null on the last page.
- Compare dog-food prices on PetSmart
- Page through a large litter search
- Turn a keyword into a product id and URL
| Code |
Meaning |
| 400 |
Empty query, another website, a product link, or a page below 1 |
| 404 |
The page had no product cards |
| 500 |
The fetch failed |