In this guide, we will show you how to scrape Chewy.com, the American online pet food, supply and toy retailer!
Chewy was founded in 2011 and has generated $2 billion dollars, which is 51% of all online pet food sales by 2017. Chewy was acquired in the same year by PetSmart for over $3 billion dollars, the largest e-commerce purchase at the time. The company has generated over 9 billion dollars in 2021 and has over 21,000 employees. As an e-commerce company, there are no physical stores, but Chewy has 13 fulfilment centers where it ships products from. Chewy hosts over 3,000 brands of pet foods and items and has 24/7 customer service available to assist customers. Are you ready to scrape dog, cat, fish, bird, reptile, farm, horse and other pet products?
Let’s begin!
Step 1: Scraping Products
- Firstly, open ParseHub and log in.
- Click “New Project” to start a new project.
- Enter the Chewy.com URL you would like to scrape, we will be scraping dog plush toys with this URL: https://www.chewy.com/b/plush-toys-320
- Once the page loads, press CTRL/CMD+1 a few times with your cursor on the first product’s name, until an A tag appears, then click to extract the product.
- Redo this for the next product’s name to train the algorithm.
- You may need to scroll down to the other product section and click there too to extract every product on the first page.
- Rename this selection on the left to “product”.
Step 2: Scraping Prices & Reviews
Now that we have our products, we can use ParseHub’s Relative Select tool to scrape relative data for each product!
- Begin by clicking the PLUS(+) button next to your product selection.
- Choose Relative Select and click the first product’s name then its price.
- Scroll down to the next product section and redo the product click, then the price.
- Rename this selection on the left to “price”.
- You can redo these steps for other details, such as product reviews or ratings!
Note: If extra text shows up in the price, you can add: ([0-9,.]+) to the regex, which will only show the price.
Step 3: Pagination
- To scrape multiple pages, begin by scrolling down the page until you see the nav bar.
- Click the PLUS(+) button next to your page selection and choose Select.
- Click the Next page button to extract it.
- Rename this selection on the left to “pagination”.
- Expand the selection and delete the two extractions.
- Click the PLUS(+) button next to your pagination selection and choose “Click”.
- Click “Yes” and enter the additional amount of pages you would like to scrape, entering zero will scrape every single page!
Step 4: Bypassing Blocks
At the time of this guide, it seems like IP Rotation is required to scrape Chewy.com. Without it you may run into blocks, resulting in an empty data file.
To enable IP Rotation, click the settings cog on the top left of ParseHub, and then click the settings tab. Finally, tick the “Rotate IP Addresses” box.
Note, this is a paid ParseHub feature.
Step 5: Start Scraping
Now that you have set up your ParseHub project to extract products, their prices, and other details such as reviews, and have set up pagination and IP Rotation, it is time to begin scraping!
Click the green “Get Data” button on the left, and choose whether you want to test, run or schedule your scrape. We chose to run the scrape a single time.
Running into scraping issues? Contact our live chat support!
Happy Scraping! 💻