# PetSmart Product ## Overview | Property | Value | |----------|-------| | **Status** | active | | **Method** | `GET` | | **Endpoint** | `/v2/petsmart/product` | | **Base URL** | `https://api.piloterr.com` | | **Credit Cost** | 1 credit per call | | **Documentation** | https://www.piloterr.com/library/petsmart-product | ## Description Read one PetSmart product URL, including the selected size, dollar price, flavor, and item number. ## Authentication - **Key Name:** `x-api-key` - **Location:** HTTP Header - **Get an API key:** https://app.piloterr.com/register ## Example Request ```bash curl --location --request GET 'https://api.piloterr.com/v2/petsmart/product' \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Example Response ### Purina Pro Plan 30 lb salmon and rice ```json { "id": "5252900", "url": "https://www.petsmart.com/dog/food/dry-food/purina-pro-plan-sensitive-skin-and-stomach-dry-dog-food-adult-salmon-and-rice-formula-digestive-health-36648.html", "gtin": "0038100175526", "size": "30 Lb", "brand": "Purina Pro Plan", "image": "https://s7d2.scene7.com/is/image/PetSmart/5252900?fmt=webp&wid=400&hei=400", "price": 77.99, "sizes": [ { "label": "4 Lb", "selected": false }, { "label": "16 Lb", "selected": false }, { "label": "30 Lb", "selected": true }, { "label": "40 Lb", "selected": false } ], "title": "Purina Pro Plan Sensitive Skin and Stomach Dry Dog Food Adult Salmon & Rice Formula Digestive Health", "flavor": "Salmon & Rice", "rating": 4.5, "currency": "USD", "in_stock": true, "variants": [ { "sku": "5252899", "gtin": "0038100175458", "price": 54.99, "in_stock": true, "selected": false, "price_display": "$54.99" }, { "sku": "5252900", "gtin": "0038100175526", "price": 77.99, "in_stock": true, "selected": true, "price_display": "$77.99" }, { "sku": "5339374", "gtin": "0038100100757", "price": 20.68, "in_stock": true, "selected": false, "price_display": "$20.68" }, { "sku": "5339575", "gtin": "0038100100771", "price": 94.99, "in_stock": true, "selected": false, "price_display": "$94.99" } ], "description": "Nurture your dog's sensitive skin and stomach with Purina Pro Plan Brand Dog Food Sensitive Skin and Stomach Salmon and Rice Formula adult dry dog food. Nutrient-rich salmon is the first ingredient.", "rating_count": 9221, "price_display": "$77.99", "master_product_id": "36648" } ``` ## Documentation ## Overview Read one PetSmart product page. The response is the selected size: price, rating, flavor, and the other sizes on that page. `query` is a PetSmart product URL ending in `.html`. A search link returns 400. ## Quickstart ``` GET https://api.piloterr.com/v2/petsmart/product?query=https://www.petsmart.com/dog/food/dry-food/purina-pro-plan-sensitive-skin-and-stomach-dry-dog-food-adult-salmon-and-rice-formula-digestive-health-36648.html ``` ## Parameters | Parameter | Type | Required | Description | |---|---|---|---| | `query` | string | yes | Product URL. Placeholder: a PetSmart `.html` product link. | | `return_page_source` | boolean | no | When true, the response is the raw HTML in `result`. | ## Response fields `price` is the price of the selected size. `price_display` is that number in dollars. `id` is the PetSmart item number. `variants` lists the other priced SKUs on the page. ## Use cases - Track the 30 lb salmon formula at PetSmart - Read the item number, GTIN, and flavor - Compare the sizes sold on one product page ## Error codes | Code | Meaning | |---|---| | 400 | Empty query, another website, or a link that is not a product | | 404 | The page had no product sheet | | 500 | The fetch failed |