Petco
Learn how to start scraping Petco.
With Web Scraper API, you can scrape various types of Petco pages; below is an overview of all supported scrapers and their respective source values. The response returns the page HTML in content, in the standard response structure described in Realtime and Push-Pull.
petco_search
Search page for a search term of your choice.
Any other Petco page can be scraped by passing its url alone, no source needed.
Search
Request samples
curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
"source": "petco_search",
"query": "food"
}'import requests
from pprint import pprint
# Structure payload.
payload = {
'source': 'petco_search',
'query': 'food'
}
# Get response.
response = requests.request(
'POST',
'https://realtime.oxylabs.io/v1/queries',
auth=('USERNAME', 'PASSWORD'),
json=payload
)
# Instead of response with job status and results url, this will return the
# JSON response with the result.
pprint(response.json())Request parameter values
source
Sets the scraper.
petco_search
query
The keyword or phrase to search for products.
-
start_page
Starting page number.
1
- mandatory parameter
Localization and Filtering
fulfillment_type
petco_search
Shows only products available for the chosen way of getting them. Available values: repeat_delivery, free_pickup_today, same_day_delivery.
-
Last updated
Was this helpful?