How to Scrape Target.com Product Details (2025 Guide)
Today we're exploring how to scrape product information from a popular online retailer in America called Target. Whether you're looking for comfort wear or have run out of supplies, Target is a favorite choice and has been serving America with fast delivery at affordable prices.
Since most sites these days are SPAs and fetch their data via XHR/Ajax requests to server side APIs rather than serving server side rendered HTML, we will start by find the API responsible for sending product info to the site.
For web scraping, this means you can access structured JSON data directly—if you can get past the site’s anti-bot protections.
In this tutorial, we will show you how to scrape Target.com using its API:
- Find Target’s API and extract product URLs
- Scrape full product details (name, price, ratings, features)
- Save the data to a JSON file
Finding Target’s API Endpoint
To scrape data from Target.com, we need to locate the API endpoint that provides product details. This process involves using browser developer tools to capture network requests.
Step 1: Search for a Product on Target.com
Start by visiting Target.com and searching for any product using the search bar.
Step 2: Locate the API Request Using Developer Tools
- Open Developer Tools by pressing
F12
. - Click on the Network tab.
- Filter by XHR/Fetch requests.
- Look for a request named product_summary_with_fulfillment.
- Copy the full request URL. It contains essential query parameters like
tcins
,store_id
, andzip
.
Step 3: Understanding the API Request
The product_summary_with_fulfillment API call retrieves product details such as:
- Product Title
- Product URL
However, this request does not include complete product details like price, ratings, or features. To extract additional information, we need to send a separate request to each product’s individual page.
Step 4: Example API Request URL
A typical request URL looks like this:
https://redsky.target.com/redsky_aggregations/v1/web/product_summary_with_fulfillment_v1?key=9f36aeafbe60771e321a7cc95a78140772ab3e96&tcins=90381165,90381177,90471876,90471877,90471880&store_id=3230&zip=36100
This request returns basic product details, including the product title and URL. However, it does not provide full product details such as price, description, features, or ratings.
To extract complete product data, we need to:
-
Extract product URLs from the API response.
-
Make an HTTP request to each product page to fetch the full HTML source code.
-
Scrape the product page to retrieve Target product data:
- Name
- Price
- Description
- Features
- Ratings
- Product URL
Extracting Product URLs from Target’s API
To extract product URLs from Target’s API, we need to make an HTTP request to the API endpoint and parse the JSON response. The extracted URLs will be used to fetch full product details.
Required Library
We need the requests
library to handle API requests. If you haven’t installed it, run:
Making the API Request
To fetch product URLs, we send a request to the product_summary_with_fulfillment API. The request must include headers to avoid being blocked.
Scraping Full Product Details from Target Pages
Once we have the product URLs, the next step is to extract details such as name, description, price, features, and ratings. The product data is embedded within a <script>
tag on each product page.
Locating the Product Data in HTML
- Open the product page in a browser.
- Right-click and select View Page Source.
- Search for a known value, such as the price, to locate the script containing the product data.
- The relevant data is stored inside a JavaScript variable named TGT_DATA.
Extracting Product Details
To extract product details, iterate through the list of product URLs. For each product page:
Full Python Code to Scrape Target.com Product Data
This is how json response would look like:
Now that you have structured product data ready, you can use it for analysis or further processing.
Code Limitations
- The script depends on Target’s current JSON structure and webpage elements, meaning any changes to the website could break it.
- It lacks built-in measures to handle CAPTCHAs, rate limits, or bot detection, making it vulnerable to being blocked after repeated use.
- High request volumes can slow down responses and increase the risk of IP bans.
Need a Simpler Solution? Use Unwrangle API
Manually scraping Target can be time-consuming and complex. Unwrangle APIs provide a simple alternative. With just an API key, you can access Target’s data without dealing with scrapers or anti-bot measures.
Target Product Search API | Target Product Data API | Target Product Reviews API
-
Instantly retrieve product details like prices, images, and descriptions.
-
Easily fetch customer reviews, including ratings and review text.
-
Get structured JSON responses that are easy to integrate into your code.