Google oauthplayground - Shopping ProductId or even easier way to search for productids?

114 views Asked by At

A product like a shoe has many different sizes. The article number will be the same, but the EAN is changing for every size of the shoe. The EAN is there to identify every variant of a product. I’m searching for a way to more easily get the productpage/ productid  of a given variant.

 

contacted google and they said that the productid is a randomly generated number. There is no official way to obtain these.

Yet there are a few ways to scrape them.

I tried to scrape them with scrapy (python), but there a many obstacles.

For example, the search results are in a wide range of possible matching products.

Therefore, a pre-condition is a list of GTINs == “0”+EANs. With these given you can check for correct matches.

Searching with an EAN limits the search and is generally better than searching with article names.

Furthermore, you can limit the search results by passing the “merchagg” parameter. That way you can choose a company that is listing these articles (ex. football shoes) on google shopping. Chances are good that the search results are very limited and more accurate.

https://www.google.com/search?newwindow=1&rlz=1C1ONGR_deDE961DE961&tbm=shop&sxsrf=AOaemvJ4PdRz4nasxsxpcGZtDNefA7XfIA:1637870851407&q=nike+mercurial+superfly+8&tbs=vw:g,mr:1,merchagg:m111031460

 

Then the search for possible productid begins:

You can scrape your result and check for all provided hrefs containing a productid.

https://www.google.com/shopping/product/4900146535495143190 + /specs

You can append “/specs” to see more detailed info about this variant of product.

Next step would be to check all results and scrape them again to search for your given EAN search query. The product page is giving details about your product (variant) and is sharing info’s e.g.  EAN, color, variant, article numbers, etc.

 

As you can guess, possible productpagelinks can go high in numbers and google has bot protection to stop you from crawling their search results. Most likely you get Ip-banned for google search within a few searches…

Any ideas to share with me? thanks in advance

0

There are 0 answers