[Google Search API] `shopping_results` `link` field returns a Google URL instead of direct product link
A customer reported that the link field for shopping_results in normal Google Search is coming back as a Google URL instead of the direct link to the seller. The customer's queries as recently as Jan 16th, 2025 were all returning direct links.
For example: https://www.google.es/aclk?sa=...
Issue is intermittent. Some queries still return direct links.
Can we still scrape the direct link as we did previously? Or is it technically possible to do what we did with direct_link=true on the Google Shopping API?
Previous link example:
Current link example with Google URL:
Current link example with correct direct link:
Public links: Playground w/ Google link | Playground w/ direct link | Documentation
Internal links: Intercom | Search Inspect w/ direct link | Search Inspect w/ Google link
We are also influenced by that. Even when specifying the direct_link param - the link is not present or is directing to the google page - not the product page.
Hi @roman-bartusiak-yohana I wanted to mention it sounds like the issue you've described is closer to #1889, as the Google Search API does not support a direct_link param.
We are able to workaround it
async def get_redirect_url(session, url): res = await session.head(url, allow_redirects=True) return res.url
But we would prefer to get the direct url from API call in the first place.
Thank you for sharing your workaround @99xAgency. We'll let you know once we have any update on this.
@NateSkiles oh, i see now, yep that is true, it is same as #1889
After investigating the issue, I found that it specifically affects mobile layouts. When the device is set to desktop, the link points directly to the product. However, on mobile, the link redirects through a Google URL instead.
As for retrieving direct links in the mobile layout, I’m fairly certain it’s not possible with the current version Google is serving, as the direct URLs simply aren’t present in the page content—unlike in the desktop version.
Another user reported this. Their example is a desktop search. I was able to replicate it as well.