Target is one of America’s biggest stores that has a variety of items (similar to Walmart).
With low prices and great products, many buyers will choose to go to target over their competitors.
Since there’s a lot of product data available on target, we’ll show you how you can scrape it without any coding.
It’s free and easy to use and has a suite of features we think you’ll enjoy like cloud-based scraping, IP rotation, dropbox integration, scheduling and many more!
So let’s show you how you can scrape data from Target.
Web Scraping Target
Once ParseHub is downloaded and installed, click on the new project button, and submit the URL you want to scrape. In this case, it’ll be kitchen items that are on sale on target.com
- Once the site is rendered, A select command will automatically be created. You will need to select the main element to this, in this case, it will look like this.
- Rename this selection to scroll, and expand and delete the data that is being automatically extracted.
- Once you have the main Div selected you can add the scroll function. On the left sidebar, click the PLUS (+) sign next to the scroll selection, click on advanced, then select the scroll function.
- You will need to tell how long the software to scroll, depending on how big the page is you may need a bigger number. But for now, let’s put it 2 times and make sure it's aligned to the bottom.
- Now, Click on the plus sign next to your page command, and choose the select command. Click on the first product name on the page. The name you’ve clicked will become green to indicate that it’s been selected.
- The rest of the product names will be highlighted in yellow. Click on the second one on the list. Now all of the items will be highlighted in green. You may need to do this 2-3 times to fully train the web scraper.
- On the left sidebar, rename your selection to product. You will notice that ParseHub is now extracting the product name and URL for each product.
- On the left sidebar, click the PLUS(+) sign next to the product selection and choose the Relative Select command.
- Using the Relative Select command, click on the first product name on the page and then on its listing price. You will see an arrow connect the two selections.
- Repeat these steps to also extract the product star rating, the number of reviews and product image. Make sure to rename your new selections accordingly.
Scraping more data from each product
Now, we will tell ParseHub to click on each of the products we’ve selected and extract additional data from each page. In this case, we will extract the product specifications
First, on the left sidebar, click on the 3 dots next to the main_template text.
- Rename your template to search_results_page. Templates help ParseHub keep different page layouts separate.
- Now use the PLUS(+) button next to the product selection and choose the “Click” command. A pop-up will appear asking you if this link is a “next page” button. Click “No” and input a new template name next to Create New Template, in this case, we will use product_page.
- ParseHub will now automatically create this new template and render the target product page for the first product on the list.
- Switch into browse mode, and scroll down till you see the specifications. Now click on the show more button. Once the specifications have been expanded, switch browse mode off.
- While using the Select command, click on the first element of the list. In this case, it will be the dimensions
- Like we have done before, keep clicking on the items in the table until they all turn green. Rename this selection to specifications
Now, you might want to scrape several pages worth of data for this project. So far, we are only scraping page 1 of the search results. Let’s set up ParseHub to navigate to the next 5 results pages.
- On the left sidebar, return to the search_results_page template. You might also need to change the browser tab to the search results page.
- Click on the PLUS(+) sign next to the page selection and choose the Select command. Then select the Next page link at the bottom of the target page. Rename the selection to next.
- By default, ParseHub will extract the text and URL from this link, so expand your new selection and remove these 2 extract commands.
- Now, click on the PLUS(+) sign of your next selection and use the Click command.
- A pop-up will appear asking if this is a “Next” link. Click Yes and enter the number of pages you’d like to navigate to. In this case, we will scrape 5 additional pages.
Running your Target web scraping project
Now that we are done setting up the project, it’s time to run our scrape job.
On the left sidebar, click on the Get Data button and click on the Run button to run your scrape. For longer projects, we recommend doing a Test Run to verify that your data will be formatted correctly.
After the scrape job is completed, you will be able to download all the information you’ve requested as a handy spreadsheet or as a JSON file.
You now know how to scrape product data from target and export it into an excel or JSON file
However, you might be looking to scrape a website we haven’t gone over yet or is giving you trouble while scraping.
In any case, feel free to reach out to us via the live chat on our site. We’ll be happy to assist you with any of your web scraping projects.
You can view our other guides on scraping product data from specific websites