DEV Community

Cover image for Scrape Google Shopping Product Results
Serpdog
Serpdog

Posted on • Updated on

Scrape Google Shopping Product Results

Introduction

Google Shopping Product Data is a crucial piece of data for pricing software companies and sentimental analysis as it covers information about the product price, description, user reviews, price comparisons, and related products.

In this tutorial, we will learn how to scrape this valuable Google Product information with the help of Node JS. And at the end, we will see how Serpdog's | Google Product API can help you scrape Google Product Results without any extra effort, which we require in scraping Google.

Google Shopping Logo

Table Of Contents

1 Requirements
1.1 Web Parsing with CSS selectors
1.2 User Agents
1.3 Install Libraries
2 Target
3 Process
4 With Google Product API
5 Conclusion
6 Additional Resources
7 Donation Appeal

Requirements:

Web Parsing with CSS selectors

To search the tags from the HTML files is not only a difficult thing to do but also a time-consuming process. It is better to use the CSS Selectors Gadget for selecting the perfect tags to make your web scraping journey easier.

This gadget can help you to come up with the perfect CSS selector for your need. Here is the link to the tutorial, which will teach you to use this gadget for selecting the best CSS selectors according to your needs.

User Agents

User-Agent is used to identify the application, operating system, vendor, and version of the requesting user agent, which can save help in making a fake visit to Google by acting as a real user.
You can also rotate User Agents, read more about this in this article: How to fake and rotate User Agents using Python 3.

If you want to further safeguard your IP from being blocked by Google, you can try these 10 Tips to avoid getting Blocked while Scraping Websites.

Install Libraries

Before we begin, install these libraries so we can move forward and prepare our scraper.

  1. Unirest JS
  2. Cheerio JS

Or you can type the below commands in your project terminal to install the libraries:

npm i unirest
npm i cheerio
Enter fullscreen mode Exit fullscreen mode

To extract our HTML data, we will use Unirest JS, and for parsing the HTML data, we will use Cheerio JS.

Target:

Google Shopping Product Results

Process:

Copy the below target URL to extract the HTML data using the help of Unirest JS:

https://www.google.com/shopping/product/1741888852360229737

Then we will parse each marked container in the above image with the help of Cheerio. Here is our code:

const cheerio = require("cheerio");
const unirest = requre("unirest")


const getShoppingData = async() => {
try
{
const url = "https://www.google.com/shopping/product/1741888852360229737?sourceid=chrome&ie=UTF-8";

const response = await unirest
.get(url)
.headers({
    "User-Agent":
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36" 
})

const $ = cheerio.load(response.body)

let product_results = {};

product_results.title = $(".sh-t__title").text();

let prices = [];
let conditions = [];

$(".TZeISb").each((i,el) => {
    prices[i] = $(el).find(".g9WBQb").text();
    conditions[i] = $(el).find(".pp-bubble-cont").text().length ? $(el).find(".pp-bubble-cont .XI4N6c").text() : $(el).find(".Yy9sbf").text();
})

product_results.prices = prices;
product_results.conditions = conditions

product_results.typical_prices = {};
product_results.typical_prices.low = $(".KaGvqb .qYlANb").text().replace("A" , "");
product_results.typical_prices.high = $(".xyYTQb .qYlANb").text().replace("A" , "");
product_results.typical_prices.shown_price = $(".FYiaub").text().replace("A" , "");
product_results.reviews = $(".qIEPib").text().length ? $(".qIEPib").text().split(" ")[0] : "";
product_results.rating = $(".uYNZm").text();

if($(".vqSBk").length)
{
    let features =[];
    $(".vqSBk .KgL16d").each((i,el) => {
        features[i] = $(el).text()
    })
    product_results.features = features
}


if($(".Qo4JI").length)
{
let extensions = [];
$(".Qo4JI .OA4wid").each((i,el) => {
    extensions[i] = $(el).text();
})

product_results.extensions = extensions
}

product_results.descriptions = $(".sh-ds__full-txt").text();

    if($(".HE4Qgd").length)
    {
    let media = [];
    $(".HE4Qgd img").each((i,el) => {
        media.push({
            type: "image",
            link: $(el).attr("src")
        })
    })

    product_results.media = media
    }



Object.keys(product_results).forEach(key => {
    if (product_results[key] === '' || product_results[key] === undefined) {
    delete product_results[key];
    }
});

console.log(product_results);

let reviews_results = {};
let ratings = [];

$(".l1agtd .internal-link").each((i,el) => {
    ratings.push({
        name: $(el).find(".rOdmxf").text().split(" ")[0],
        amount: $(el).find(".vL3wxf").text().split(" ")[0]
    })
})

for (let i = 0; i < ratings.length; i++) {
    Object.keys(ratings[i]).forEach(key => ratings[i][key] === "" ? delete ratings[i][key] : {});  
}

let reviews = [];

$(".XBANlb").each((i,el) => {
    reviews.push({
        position: i+1,
        title: $(el).find(".P3O8Ne").text(),
        date: $(el).find(".ff3bE").text(),
        rating: $(el).find(".UzThIf").length ? $(el).find(".UzThIf").attr("aria-label").split(" ")[0] : "",
        source: $(el).find(".sPPcBf").text(),
        description: $(el).find(".g1lvWe div").text()
    })
})

for (let i = 0; i < reviews.length; i++) {
    Object.keys(reviews[i]).forEach(key => reviews[i][key] === "" ? delete reviews[i][key] : {});  
}

reviews_results.ratings = ratings;
reviews_results.reviews = reviews

Object.keys(reviews_results).forEach(key => {
    if (reviews_results[key] === []) {
    delete reviews_results[key];
    }
});

console.log(reviews_results);

}
catch(e)
{
    console.log(e)
}
getShoppingData();  
Enter fullscreen mode Exit fullscreen mode

Results:

Our result should look like this 👇🏻:

{
    title: 'Apple iPhone 13 Pro Max 1 TB, Gold',
    prices: [ 'â‚ą1,74,503.00', 'â‚ą1,67,307.00', 'â‚ą1,73,900.00' ],
    conditions: [ '', '', '' ],
    typical_prices: {
    low: 'â‚ą1,68,683.57',
    high: 'â‚ą1,74,502.70',
    shown_price: 'â‚ą1,74,503.00 at Flipkart'
    },
    reviews: '12,235',
    rating: '4.6',
    features: [
    '17 cm (6.7-inch) Super Retina XDR display with ProMotion for a faster, more responsive feel',
    'Cinematic mode adds shallow depth of field and shifts focus automatically in your videos',
    '12MP TrueDepth front camera with Night mode, 4K Dolby Vision HDR recording',
    'A15 Bionic chip for lightning-fast performance',
    'Up to 28 hours of video playback, the best battery life ever in an iPhone',
    '17 cm (6.7-inch) Super Retina XDR display with ProMotion for a faster, more responsive feel',
    'Cinematic mode adds shallow depth of field and shifts focus automatically in your videos',
    '12MP TrueDepth front camera with Night mode, 4K Dolby Vision HDR recording',
    'A15 Bionic chip for lightning-fast performance',
    'Up to 28 hours of video playback, the best battery life ever in an iPhone',
    'Durable design with Ceramic Shield'
    ],
    extensions: [
    'Smartphone',
    'Dual SIM',
    'iOS',
    '5G',
    'Wireless Charging',
    'With Fast Charging',
    'With OLED Display',
    'Facial Recognition',
    '2778 x 1284',
    'Water Resistant'
    ]
  }
  [
    {
    position: 1,
    date: '7 December, 2021',
    rating: '5',
    source: 'chantal.v · Review provided by   influenster.com',
    description: `THE BOTTOM LINE Apple's iPhone 13 Pro Max is the ultimate mobile content creation machine, with the best camera and longest battery life of any iPhone. The ultimate phone for photo and video creators! The iPhone 13 Pro Max (starting at $1,099) is the ultimate professional content creator's phone. It combines Apple's excellent camera algorithms and software support with true two-day battery life for a massive phone that's always ready to realize your dreams. While the standard iPhone 13 (starting at $799) seems to be the best choice for most people, with a terrific balance of size, power, battery life, and price, the iPhone 13 Pro Max is a terrific alternative for heavy users and artists, with its killer cameras and beautiful buttress of a battery. The iPhone 13 Pro ... MoreTHE BOTTOM LINE Apple's iPhone 13 Pro Max is the ultimate mobile content creation machine, with the best camera and longest battery life of any iPhone. The ultimate phone for photo and video creators! The iPhone 13 Pro Max (starting at $1,099) is the ultimate professional content creator's phone. It combines Apple's excellent camera algorithms and software support with true two-day battery life for a massive phone that's always ready to realize your dreams. While the standard iPhone 13 (starting at $799) seems to be the best choice for most people, with a terrific balance of size, power, battery life, and price, the iPhone 13 Pro Max is a terrific alternative for heavy users and artists, with its killer cameras and beautiful buttress of a battery. The iPhone 13 Pro Max is, well, max. At 6.3 by 3.1 by 0.3 inches and 8.5 ounces, it's a large, heavy phone that you won't want to use in one hand. That's the price you pay (along with your $1,100) for this kind of battery life. But you're probably used to it already, as it's almost exactly the same size as the 12 Pro Max. It's a little heavier than last year's model, though, which weighed 8.0 ounces. It’s roomy, narrow-bezel screen gets a little bit more real estate from a slightly smaller notch than on the iPhone 12 Pro Max. Apple has said in numerous articles- the notch is 20% smaller than before. On the back, the Pro Max's triple-camera system juts out noticeably. I'd smooth it out with a case, although you don't necessarily need one for protection—the phone carries IP68 waterproofing and has Apple's tough "ceramic shield" screen coating. (with a phone this nice I still like to always get a screen protector, they have awesome designs and custom ones for cases sold on castify.com I even found cute little sparkle individual camera lens covers to put on for extra protection (and it's a cute touch! They have tons of colors on Amazon that will work with any Apple 11 up! The 13 Pro Max comes in four colors, including blue, gold, graphite (gray), and silver. The blue is very cool and elegant, as you can see below. CONS- BIG HEAVY Like other phones its size, this is more of a bag phone than a pocket phone. It fits in my coat and jacket pockets, but it'll stick out of most pants pockets but I've noticed over the years so did just about every iPhone from the 6 and up! OVERALL I RECOMMENDED THIS 100% I am an Mac/Apple user is all things from phones, watches, laptops, TVs. You name it if it has an apple on it, it’s definitely in our household! Less`
    }
  ]
Enter fullscreen mode Exit fullscreen mode

With Google Product API

Scraping, in the long run, can become a time-consuming process as it requires you to maintain the scraper according to changing CSS Selectors. To solve this problem we at Serpdog also offers Google Product API and Google Shopping API that returns the readymade structured JSON data to the users. It includes details like online sellers, product reviews, product variations, specifications, and many more.
Our users also get 100 free requests on the first sign-up.

  const axios = require('axios');

   axios.get('https://api.serpdog.io/product?product_id=2515929089120399478&api_key=APIKEY')
   .then(response => {
   console.log(response.data);
   })
   .catch(error => {
   console.log(error);
   });
Enter fullscreen mode Exit fullscreen mode

Result:


  {
    "meta": {
        "api_key": "APIKEY",
        "product_id": "2515929089120399478"
    },
    "product_results": {
        "title": "Google Pixel 6 Pro 5G Unlocked (128GB) - Cloudy White",
        "prices": [
        "$899.00",
        "$888.00",
        "$609.99"
        ],
        "conditions": [
        "Refurbished item"
        ],
        "typical_prices": {
        "low": "$649.00",
        "high": "$899.00",
        "shown_price": "$899.00 at Google Store"
        },
        "reviews": "3,963",
        "rating": "3.7",
        "features": [
        "The powerful Google Tensor processor is the first processor designed by Google and made for Pixel; takes performance to a whole new level",
        "Advanced camera system with wide and ultrawide lenses, 4x optical zoom, and a main sensor that captures 150% more light",
        "Pixel’s fast charging all day battery adapts to you and saves power for apps you use the most",
        "Keeps your phone protected with the next gen Titan M2 chip, 5 years of security updates, and the most hardware layers of any phone",
        "What's in the box: USB Cable & Cell Phone"
        ],
        "extensions": [
        "Smartphone",
        "Dual SIM",
        "Android",
        "5G",
        "With Wireless Charging",
        "With Fast Charging",
        "Triple Lens",
        "GSM",
        "With OLED Display",
        "Fingerprint Scanner"
        ]
    },
    "online_sellers": [
        {
        "position": 1,
        "name": "store.google.com",
        "link": "https://google.com/url?q=https://store.google.com/us/config/pixel_6_pro%3Fhl%3Den-US&sa=U&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQ2ykIbQ&usg=AOvVaw0ls6g_Q7lmXUA-8N0xv7yX",
        "delivery": "Free delivery by Sun, Oct 9",
        "base_price": "$899.00",
        "total_price": "$968.67"
        },
        {
        "position": 2,
        "name": "www.visible.com",
        "link": "https://google.com/url?q=https://www.visible.com/shop/smartphones/google-pixel-6-pro/%3Fsku%3DGA03150-US%3Futm_source%3Dgoogle_feed%26utm_medium%3Dsurfaces%26utm_campaign%3Dshopping_feed%26utm_term%3Dunpaid%26utm_content%3Dgoogle_unpaid_shopping&sa=U&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQ2ykIcA&usg=AOvVaw248BJdz66UYDTpYA5l-69U",
        "delivery": "Free delivery by tomorrow14-day returns",
        "base_price": "$888.00",
        "total_price": "$956.82"
        },
        {
        "position": 3,
        "name": "www.ebay.com",
        "link": "https://google.com/url?q=https://www.ebay.com/itm/165641118590%3Fchn%3Dps%26mkevt%3D1%26mkcid%3D28%26var%3D465154727621&sa=U&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQ2ykIdw&usg=AOvVaw0znhyVTnuMwX-X9UrCzyPG",
        "delivery": "Free delivery by Wed, Sep 21",
        "base_price": "$609.99",
        "total_price": "$657.26"
        },
        {
        "position": 4,
        "name": "www.shopping.com",
        "link": "https://google.com/url?q=https://www.shopping.com/item.html%3Fid%3Dv1-304453355887-0%26offer%3Dtrue%26provider%3D0%26itemId%3Dv1-304453355887-0%26a%3DitemName_Google%2BPixel%2B6%2BPro%2B128GB%2B(Unlocked)%2B6.7%2522%2BCloudy%2BWhite%2BGA03150-US%2B-%2BSealed!%26zipCode%3D95125%26trackableItemId%3Dv1-304453355887-0%26trackFor%3DEPN&sa=U&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQ2ykIfA&usg=AOvVaw36Xzm7xkLVB5QQepyXoaap",
        "delivery": "Delivery date & cost shown at checkout",
        "base_price": "$749.99",
        "total_price": "$808.11"
        },
        {
        "position": 5,
        "name": "www.newegg.com",
        "link": "https://google.com/url?q=https://www.newegg.com/p/23B-001E-00311%3Fitem%3D9SIAEJWG9S7520%26nm_mc%3Dknc-googleadwords%26cm_mmc%3Dknc-googleadwords-_-cell%2520phones%2520-%2520unlocked%2520cell%2520phones-_-google-_-9SIAEJWG9S7520%26source%3Dregion&sa=U&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQ2ykIfw&usg=AOvVaw3rVJ7nEMODNGPVJBXKs1RA",
        "delivery": "Free delivery",
        "base_price": "$965.00",
        "total_price": "$1,039.79"
        },
        {
        "position": 6,
        "name": "fusionelectronix.com",
        "link": "https://google.com/url?q=https://fusionelectronix.com/google-pixel-6-pro-5g-android-phone-unlocked-smartphone-with-advanced-pixel-camera-and-telephoto-lens/%3Fsku%3DGA03150-US%26srsltid%3DAdGWZVRzWpdUEMLahHsKdQRMV8gVdrJKSwfFWD2tAb8JvAOt8UIpVVbupZE&sa=U&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQ2ykIggE&usg=AOvVaw2BZuMz993whf8B776krIdW",
        "delivery": "Free delivery by Thu, Sep 2230-day returns",
        "base_price": "$849.99",
        "total_price": "$926.49"
        },
        {
        "position": 7,
        "link": "https://google.comundefined",
        "delivery": "Free delivery by Thu, Sep 22Free deliveryFree delivery means no shipping and service fees. Orders must meet store minimums before taxes and fees in select delivery areas.Discount shown at checkout30-day returnsReturn policyIf anything goes wrong with this order, you can count on Google to help.",
        "base_price": "$849.99",
        "total_price": "$915.86"
        },
        {
        "position": 8,
        "name": "www.designinfo.in",
        "link": "https://google.com/url?q=https://www.designinfo.in/google-pixel-smartphone/google-pixel-6-pro-5g-android-phone-unlocked-smartphone-with-advanced-pixel-camera-and-telephoto-lens-128gb-cloudy-white-Buy-India-12292.html%3FSubmitCurrency%3D1%26id_currency%3D3&sa=U&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQ2ykIpwE&usg=AOvVaw3OU429UoWYFBn6KC-D6nEC",
        "delivery": "Free delivery by Wed, Sep 14Free 7-day returns",
        "base_price": "$1,038.16",
        "total_price": "$1,038.16"
        },
        {
        "position": 9,
        "name": "brookpad.com",
        "link": "https://google.com/url?q=https://brookpad.com/products/google-pixel-6-pro-5g-android-phone-unlocked-smartphone-with-advanced-pixel-camera-and-telephoto-lens-128gb-cloudy-white%3Fvariant%3D42795043422447%26currency%3DUSD%26utm_source%3Dgoogle%26utm_medium%3Dorganic%26utm_campaign%3DEFLcomEN%2520USD%26utm_content%3DGoogle%2520Pixel%25206%2520Pro%2520-%25205G%2520Android%2520Phone%2520-%2520Unlocked%2520Smartphone%2520with%2520Advanced%2520Pixel%2520Camera%2520and%2520Telephoto%2520Lens%2520-%2520128GB%2520-%2520Cloudy%2520White&sa=U&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQ2ykIrgE&usg=AOvVaw2Y8vMFR7WWCHbJkaWXnYrY",
        "delivery": "Free delivery",
        "base_price": "$779.00",
        "total_price": "$839.37"
        }
    ],
    "related_products": [
        {
        "title": "Apple iPhone 11 64GB A2223 Dual ...",
        "link": "https://google.com/shopping/product/15803068371519325321?gl=us&hl=en&sourceid=chrome&ie=UTF-8&prds=epd:10631478861498867201,oid:10631478861498867201,pid:8943183604683076901,rsk:PC_8023149794696260886&sa=X&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQrhIIvAE",
        "price": "$383.00"
        },
        {
        "title": "Apple iPhone 13 Pro Max - 128 ...",
        "link": "https://google.com/shopping/product/437651240330897754?gl=us&hl=en&sourceid=chrome&ie=UTF-8&prds=epd:12092745641898811330,oid:12092745641898811330,pid:16627194887412580682,rsk:PC_8217023720749633348&sa=X&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQrhIIwAE",
        "price": "$1,505.00"
        },
        {
        "title": "Samsung Galaxy Z Flip4 256GB ...",
        "link": "https://google.com/shopping/product/7122562219288976666?gl=us&hl=en&sourceid=chrome&ie=UTF-8&prds=epd:16920866743550249733,oid:16920866743550249733,pid:3561175075735285781,rsk:PC_2259866432285326910&sa=X&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQrhIIxAE",
        "price": "$1,039.99"
        },
        {
        "title": "Apple iPhone 13 Pro - 128 GB ...",
        "link": "https://google.com/shopping/product/3687170449830135457?gl=us&hl=en&sourceid=chrome&ie=UTF-8&prds=epd:16656761546560440730,oid:16656761546560440730,pid:12785372938347343599,rsk:PC_12721096405768421674&sa=X&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQrhIIyAE",
        "price": "$1,150.00"
        },
        {
        "title": "Apple iPhone 13 Mini - 128 GB ...",
        "link": "https://google.com/shopping/product/9605877161972811703?gl=us&hl=en&sourceid=chrome&ie=UTF-8&prds=epd:8491221753191645156,oid:8491221753191645156,pid:17062421298967806788,rsk:PC_1686283355608115465&sa=X&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQrhIIzAE",
        "price": "$569.99"
        },
        {
        "title": "Apple iPhone 13 - 128 GB - Green",
        "link": "https://google.com/shopping/product/3628886803268507508?gl=us&hl=en&sourceid=chrome&ie=UTF-8&prds=epd:14568268246630545116,oid:14568268246630545116,pid:11865528305208463674,rsk:PC_8971650804785857268&sa=X&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQrhII0AE",
        "price": "$1,065.00"
        },
        {
        "title": "Samsung Galaxy Z Flip3 5G 256GB ...",
        "link": "https://google.com/shopping/product/13312216002509535198?gl=us&hl=en&sourceid=chrome&ie=UTF-8&prds=epd:11624618888767727737,oid:11624618888767727737,pid:16540539309733388515,rsk:PC_16887429298718313848&sa=X&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQrhII1AE",
        "price": "$849.99"
        },
        {
        "title": "Apple iPhone 12 Pro Max - 128 ...",
        "link": "https://google.com/shopping/product/5492645873506991877?gl=us&hl=en&sourceid=chrome&ie=UTF-8&prds=epd:15728576390396903694,oid:15728576390396903694,pid:8785319130127152524,rsk:PC_8614981451121089051&sa=X&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQrhII2AE",
        "price": "$949.00"
        },
        {
        "title": "Google Pixel 6 5G Unlocked ...",
        "link": "https://google.com/shopping/product/11209475922215274808?gl=us&hl=en&sourceid=chrome&ie=UTF-8&prds=epd:8502432159441856059,oid:8502432159441856059,pid:11873849009401935557,rsk:PC_18445383168216468507&sa=X&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQrhII3AE",
        "price": "$722.00"
        },
        {
        "title": "Samsung Galaxy S21 FE 5G - 128 ...",
        "link": "https://google.comhttps://www.bestbuy.com/site/samsung-galaxy-s21-fe-5g-128gb-unlocked-graphite/6466003.p?skuId=6466003&contractId=unactivated&ref=NS&loc=101&extStoreId=1021&sa=X&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQrhII4AE",
        "price": "$599.99"
        }
    ],
    "specifications": {
        "details": {
        "Manufacturer Part Number": "GA03150-US",
        "Product Line": "Pixel 6 Pro",
        "Product Name": "Pixel 6 Pro Smartphone",
        "Product Type": "Smartphone",
        "Phone Style": "Bar"
        }
    },
    "reviews_results": {
        "ratings": [
        {
            "name": "5",
            "amount": "1,800"
        },
        {
            "name": "4",
            "amount": "754"
        },
        {
            "name": "3",
            "amount": "488"
        },
        {
            "name": "2",
            "amount": "351"
        },
        {
            "name": "1",
            "amount": "570"
        }
        ],
        "reviews": [
        {
            "position": 1,
            "title": "Next-Generation Features in a Beautiful Package",
            "date": "February 10, 2022",
            "rating": "5",
            "source": "Garrett111 · Review provided by  store.google.com",
            "description": "Pros Easy data transfer Great speaker Sharp, high-resolution screen Seamless integration with pixel buds Great design Responsive fingerprint reader Ip68 water/dust resistance UI is fast and easy to use Fantastic camera and camera software Reasonable price for a flagship phone Improved security with Tensor chip Cons Some software issues The all-glass body feels fragile Screen brightness seems low From first unboxing I’ve been in love with this phone! It is a dream to hold and the 2k screen is the sharpest I’ve had the pleasure of using. The included USB-C to USB-C cable made transferring data from my old phone (Samsung S21 5G) fast and easy. With the camera and software, I am taking photos that are on par with or even better than my DSLR. It’s incredible what Google ... MorePros Easy data transfer Great speaker Sharp, high-resolution screen Seamless integration with pixel buds Great design Responsive fingerprint reader Ip68 water/dust resistance UI is fast and easy to use Fantastic camera and camera software Reasonable price for a flagship phone Improved security with Tensor chip Cons Some software issues The all-glass body feels fragile Screen brightness seems low From first unboxing I’ve been in love with this phone! It is a dream to hold and the 2k screen is the sharpest I’ve had the pleasure of using. The included USB-C to USB-C cable made transferring data from my old phone (Samsung S21 5G) fast and easy. With the camera and software, I am taking photos that are on par with or even better than my DSLR. It’s incredible what Google has done tailoring the software to work with their new Tensor chip. I haven’t had a chance to use the live transcribe/translate feature yet, but I am encouraged to book a trip in the future knowing I have such capabilities in my pocket. The fingerprint reader has worked flawlessly, though it does light up the screen in that area, which was a surprise the first time I unlocked it in the dark. Compared to my S21, the screen brightness has to be turned up further in order to have a comparable brightness, though at maximum brightness there is little difference between phones. I suspect the brightness curve is just calibrated differently, possibly to improve battery life. The battery easily lasts a whole day for me and I love the feature where it will sync the charging speed to finish right as your morning alarm goes off, saving unnecessary battery wear. The speaker is the best I have experienced on a phone. I was surprised at the dynamic range the first time I turned on some music; this has by far the best bass/mid response I’ve ever heard from a phone speaker, and the treble side holds its own too. While I love the feel of this phone in my hand, I’d recommend a case for long term use as it is a glass body. I have encountered a few bugs and software hiccups so far, but there have already been several updates, so I see no reason to believe that things won’t be polished. Overall, this phone provides top of the line security, hardware, and software in a beautiful package. It truly lives up to Flagship status. Less"
        }
        ]
    },
    "product_variations": [
        {
        "thumbnail": "https://encrypted-tbn2.gstatic.com/shopping?q=tbn:ANd9GcTYdUS0M3Qssgzn_ALynruF40QacaALu-TNnmVI49IqaOttbMr1sIBX5LJL4vWfGf5yzhGk-Cpm8qbptz4gs2kBUCA8S6uE1j9oFGRyUoqpiG1vtiyDtQ&usqp=CAY"
        },
        {
        "link": "https://google.com/shopping/product/7259312469429982789?gl=us&hl=en&sourceid=chrome&ie=UTF-8&prds=opd:11506453431541392925,rsk:PC_5803332436479017245&sa=X&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQlIUHCD4oAQ",
        "product_id": "https://api.serpdog.io/product?api_key=APIKEY&hl=en&gl=us&product_id=7259312469429982789",
        "thumbnail": "https://encrypted-tbn0.gstatic.com/shopping?q=tbn:ANd9GcRTUYAWQ6jsqpKzBg7H9AEn0bxjcIvhOPQ9LTSa9ZrwJwQGIKiBDh3StyOcXbdHXAa9eSf4jSe4VkUTHl9f56zhBsqHPKoZk_GrgGifU0rPryIbdV9SrA&usqp=CAY"
        },
        {
        "link": "https://google.com/shopping/product/2940402033531438677?gl=us&hl=en&sourceid=chrome&ie=UTF-8&prds=opd:11506453431541392925,rsk:PC_5803332436479017245&sa=X&ved=0ahUKEwjhh8_wtY_6AhWGmmoFHSBYD_oQlIUHCD8oAg",
        "product_id": "https://api.serpdog.io/product?api_key=APIKEY&hl=en&gl=us&product_id=2940402033531438677",
        "thumbnail": "https://encrypted-tbn2.gstatic.com/shopping?q=tbn:ANd9GcRYNdGaeo4kqCW5NEH-Neb5_OkntVfV0t6VVO4jNvhGF7Nd3ql-Af1rZITttD7ovisbtlqGlMJjCHWJwO8k_sOBSY1pdpK6H6tDEmhe0Q&usqp=CAY"
        }
    ]
   } 
Enter fullscreen mode Exit fullscreen mode

Conclusion:

In this tutorial, we learned to scrape Google Product Results using Node JS. Feel free to ask me anything you need clarification on. Follow me on Twitter Thanks for reading!

Additional Resources

  1. Scrape Google Organic Search Results
  2. Scrape Google Shopping Results
  3. Scrape Google News Results
  4. Scrape Google Maps Reviews

Author

My name is Darshan, and I am the founder of serpdog.io. I love to create scrapers. I am currently working for several MNCs to provide them with Google Search Data through a seamless data pipeline.

Also published here.

Top comments (0)