How to Scrape Tesco Product, and Review Details
Tesco is one of the largest grocery and retail chains in the UK which offers a large selection of products ranging from fresh produce to electronics. Since its founding in 1919, Tesco has grown to include:
- Over 4,000 stores across the UK and beyond
- A massive online marketplace featuring thousands of grocery and non-grocery products
With millions of transactions happening on Tesco’s platform every month, its data provides valuable insights for brands, market researchers, and analysts. Companies can track product availability, monitor pricing trends, and analyze customer sentiment through reviews and ratings.
However, scraping Tesco data presents challenges. Like many e-commerce platforms, Tesco employs anti-scraping measures such as rate-limiting, CAPTCHA challenges, and IP blocking. This makes data extraction difficult without a robust scraping solution.
Why Use Unwrangle?
Manually scraping Tesco data can be time-consuming and technically challenging due to anti-scraping protections. Unwrangle eliminates these complexities, offering a seamless way to access Tesco products and review data.
With Unwrangle, you get:
-
Hassle-Free Scraping: No need to deal with CAPTCHAs, rate limits, or IP bans.
-
Reliable & Up-to-date Data: Get accurate pricing, descriptions, and customer reviews without interruptions.
-
Structured JSON Responses: Easily integrate the data into your applications without messy parsing.
-
Time & Cost Efficiency: Save development time and resources by using a ready-made solution.
In this tutorial, we’ll walk you through scraping Tesco’s product data and customer reviews using Unwrangle API with Python.
Scraping Tesco with Unwrangle API Using Python
Step 1: Prerequisites
Before getting started, ensure you have the following:
-
API Key: Sign up on Unwrangle to get your API key.
-
Python Installed: Ensure Python 3.x is installed on your system.
-
Requests Library: Install the requests library if you don’t already have it by running:
pip install requests
Step 2: Making a Basic API Request
To scrape Tesco data, you need to make a GET request to the /api/getter endpoint with the following query parameters:
-
Platform: Specifies the API type (tesco_detail for product data, tesco_reviews for reviews).
-
URL or TPN: Provide the product URL or Tesco Product Number (TPN) depending on the API type.
-
API Key: Include your Unwrangle API key for authentication.
Tesco API Query Parameters
Here is a breakdown of the essential query parameters for scraping Tesco data:
Parameter | Description | Required/Optional | Default Value |
---|---|---|---|
platform | Specifies the scraping engine to use (tesco_detail or tesco_reviews ). |
Required | None |
api_key | Your API token for accessing the Tesco APIs. | Required | None |
url | URL of the product listing on Tesco.com. Remove unnecessary query parameters and percent-encode the URL. | Required (for product data) | None |
tpn | Tesco Product Number, used for fetching reviews. | Required (for reviews) | None |
Tesco Product Data API
Scrape detailed Tesco product information instantly with a simple API call.
A GET request to the /api/getter/?platform="tesco_detail"
endpoint allows you to scrape product data for any product listing on Tesco.com in real-time.
Example:
Response Attributes
The response will include details such as:
- id: Unique product identifier
- name: Product name
- brand: Brand of the product
- price: Current product price
- currency: Currency of the price
- images: List of image URLs
- GTIN: Global Trade Item Number
- description: Product Description
- pack_size: List of pack size details
- rating: Average customer rating
- reviews: List of customer reviews
Results:
Tesco Product Reviews API
Scrape Tesco product reviews instantly with a simple API call.
A GET request to the /api/getter/?platform="tesco_reviews" endpoint allows you to scrape customer reviews using the Tesco Product Number (TPN).
Example:
Response Attributes
Each request returns up to 6 reviews with attributes such as:
- review_id: Unique ID of the review
- date: Review publication date
- rating: Rating given by the reviewer
- review_title: Review title (if available)
- review_text: Review content
- author_name: Name of the reviewer
- meta_data: Metadata like verified purchase status
Results:
Need a Complete E-commerce Data Solution? Try Unwrangle
Unwrangle's E-commerce APIs provide a simple solution:
-
Fetch real-time product details, search results, and customer reviews
-
Skip the hassle of configuring parsers, rotating proxies, or solving CAPTCHAs
-
Get structured JSON responses with a simple HTTP request
Sign up today and start scraping data from major e-commerce retailers.