Skip to content

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 URL on Tesco.com in real-time.

Example

Here's an example showing how you can scrape details about a specific product from Tesco, you can use the following command:

1
curl 'https://data.unwrangle.com/api/getter/?platform=tesco_detail&url=https%3A%2F%2Fwww.tesco.com%2Fgroceries%2Fen-GB%2Fproducts%2F256092964&api_key=API_KEY'
1
2
3
4
5
import requests

url = 'https://data.unwrangle.com/api/getter/?platform=tesco_detail&url=https%3A%2F%2Fwww.tesco.com%2Fgroceries%2Fen-GB%2Fproducts%2F256092964&api_key=API_KEY'
response = requests.get(url)
print(response.json())
1
2
3
const response = await fetch('https://data.unwrangle.com/api/getter/?platform=tesco_detail&url=https%3A%2F%2Fwww.tesco.com%2Fgroceries%2Fen-GB%2Fproducts%2F256092964&api_key=API_KEY')
const data = await response.json()
console.log(data)
1
2
3
4
5
6
<?php
$url = 'https://data.unwrangle.com/api/getter/?platform=tesco_detail&url=https%3A%2F%2Fwww.tesco.com%2Fgroceries%2Fen-GB%2Fproducts%2F256092964&api_key=API_KEY';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
1
2
3
4
5
6
require 'net/http'
require 'uri'

uri = URI.parse('https://data.unwrangle.com/api/getter/?platform=tesco_detail&url=https%3A%2F%2Fwww.tesco.com%2Fgroceries%2Fen-GB%2Fproducts%2F256092964&api_key=API_KEY')
response = Net::HTTP.get(uri)
puts response

Query Parameters

As you can see in the example above, our endpoint needs the following query parameters:

Product URL

url

Required

Product listing's URL on Tesco. Please remove unnecessary query parameters and encode the URL.

Other Required Parameters

platform

Required

Specifies the scraping engine you wish to invoke. In this case, the value should be tesco_detail.

api_key

Required

Your account's token—which can be obtained by signing up here.

Note

The value of the query parameter url must be URL or percent encoded. If you're using Python, this can be done with the function urlencode.

Results

The response will include the following attributes for the product:

Attributes Returned Data Type Information Represented
id string Unique identifier of the product
name string Name of product listing
brand string Brand of product listing
url string URL of the product listing
images list List of product listing's image URLs
price float Current price of product
currency string Currency of the price
currency_symbol string Symbol of the currency
gtin string Global Trade Item Number
tpnb string Tesco Product Number (TPN)
description list List of description strings
pack_size list List of pack size details
storage list List of storage instructions
nutrition list List of nutritional information
rating float Average rating of product
total_ratings int Total number of ratings received
reviews list List of reviews with rating, author, status, summary, and text

Response Example

Here's the response you will receive for the request showcased above:

{
    "success": true,
    "product_url": "https://www.tesco.com/groceries/en-GB/products/256092964",
    "detail": {
        "id": "256092964",
        "name": "Tetley 80 Tea Bags 250G",
        "brand": "TETLEY",
        "url": "https://www.tesco.com/groceries/en-GB/products/256092964",
        "images": [
            "https://digitalcontent.api.tesco.com/v2/media/ghs/150dd9ad-8928-4d1f-9dfd-3cf77ffdc6dc/c82f2e15-ccaa-4fa5-b616-b328e79acf30_986414239.jpeg?h=225&w=225"
        ],
        "price": 3,
        "currency": "GBP",
        "currency_symbol": "£",
        "gtin": "05000208030699",
        "tpnb": "53441318",
        "description": [
            "Black Tea",
            "Find all your favourites - plus our newest teas at tetley.shop",
            "For the Love of the Planet",
            "Creating the perfect cuppa should also be kind to the planet. So we take care at every stage from crop to cup.",
            "Our factory uses 100% green electricity and sends zero waste-to-landfill.",
            "For the Love of People",
            "Not only does every Tetley cuppa taste good - we make sure it does good too. That's why we source our leaves from Rainforest Alliance Certified tea gardens, and why we're working hard with the Ethical Tea Partnership to make life better for the farmers, families and communities that help make our tea.",
            "Find out more at ra.org"
        ],
        "pack_size": [
            {
                "value": "250",
                "units": "G"
            }
        ],
        "storage": [
            "Store in a cool, dry place"
        ],
        "nutrition": [
            {
                "name": "Typical Values",
                "value": "Per 100ml Infusion"
            },
            {
                "name": "Energy",
                "value": "4kJ 1kcal"
            },
            {
                "name": "Fat",
                "value": "0g"
            },
            {
                "name": "of which saturates",
                "value": "0g"
            },
            {
                "name": "Carbohydrate",
                "value": "0.3g"
            },
            {
                "name": "of which sugars",
                "value": "0g"
            },
            {
                "name": "Protein",
                "value": "0g"
            },
            {
                "name": "Salt",
                "value": "0g"
            }
        ],
        "rating": 3.3,
        "total_ratings": 6,
        "reviews": [
            {
                "rating": 1,
                "author": null,
                "status": "Approved",
                "summary": null,
                "text": "I just noticed this tea is so bad, I'm suspicion the new packaging will ruin Tetley, metallic flavour",
                "is_syndicated": false,
                "syndication_source": null
            },
            {
                "rating": 4,
                "author": null,
                "status": "Approved",
                "summary": "Nice tea!",
                "text": "Lovely flavour tea, they're on offer at the moment, 20 free teabags. Therefore disappointed to receive a standard box of 80!",
                "is_syndicated": false,
                "syndication_source": null
            },
            {
                "rating": 5,
                "author": null,
                "status": "Approved",
                "summary": "Value and great flavour",
                "text": "I love these tea bags great flavour and value for money ",
                "is_syndicated": false,
                "syndication_source": null
            },
            {
                "rating": 4,
                "author": null,
                "status": "Approved",
                "summary": "Better than PG Tips",
                "text": "These are ok if you use two bags per cup but still better than what PG Tips have become, hopefully the Tetley two cup teabags will be back in stock soon.",
                "is_syndicated": false,
                "syndication_source": null
            },
            {
                "rating": 5,
                "author": null,
                "status": "Approved",
                "summary": "Great cup of tea!",
                "text": "Best cup of tea around! Not sure why the other reviewer is going on about mentioning, Typhoon. That brand is like saw dust to drink! Stick with Tetley for a proper cuppa and stick 2 tea bags in your mug and make a really good strong brew....lovely! \nI wouldn't start my day any other way. ",
                "is_syndicated": false,
                "syndication_source": null
            },
            {
                "rating": 1,
                "author": null,
                "status": "Approved",
                "summary": null,
                "text": "I don't like Tetley I never have done and as you have removed Typhoo from your range I will just have to go elsewhere to get it!\n",
                "is_syndicated": false,
                "syndication_source": null
            }
        ]
    },
    "result_count": 1,
    "remaining_credits": 1955861
}

Request Cost

10 credits is deducted for each successful request

Support

If you want to add a parameter to our response, or have any question or feedback, please write to us at support@unwrangle.com