[Google Shopping API] `link` and `links` are missing even though `direct_link=true` is included
One of our users reported that the link is not present for some products even though the direct_link=true parameter is included. I couldn't recreate the issue on my side, but this might come up more often in the future if we don't address it.
Product missing link and links:
Thank you for creating the ticket @marm123. I couldn't replicate this bug. Did you have more people reaching out about this issue?
Sorry for the late response @mikemorcerf. It was the only time someone reported it, I believe. I wasn't able to recreate it myself too.
Thanks @marm123. Let's wait to see if this problem will be reported again before doing more investigating.
@mikemorcerf I'm just tagging you to make sure you're aware of the increasing reports of this issue, since you had started working on it previously.
Thank you for tagging me, @schaferyan. I'll look into it.
The coffee example from @NateSkiles started working for me after I sent a request with no_cache.
@Krugloff Yeah, this seams to be working again this morning:
Thank you for creating the ticket @marm123. I couldn't replicate this bug. Did you have more people reaching out about this issue?
This issue appears to be sporadic, as @mikemorcerf couldn't reproduce this after it was initially reported.
@NateSkiles Yes, it's working again. Now I'm working on a change that I believe will generate more consistent results.
@mikemorcerf Here’s another Inspect. Interestingly, the second result includes a link.
https://serpapi.com/searches/22b134190b08b273/6736f57aa775f2df5421732d.html
The direct-links are here.
Thank you @Krugloff. These direct_links are actually injected into the html by us. If you look at the Google Shopping Page this div with #direct-links won't be there.
@NateSkiles, @hilmanski, @schaferyan, @sonika-serpapi, @marm123,
I spoke with @aciddjus and we came to the conclusion that unfortunately my solution is not viable because it uses one request per product to retrieve all direct_links.
I closed my PR Google Shopping API - use GET request to fetch direct_links, but it can still be used as a reference.
I'll unassign myself for this ticket.
@Krugloff @hilmanski @mikemorcerf @schaferyan Has the issue been resolved? We are still seeing this issue.
@KBCG Apologies for the confusion; we are currently still investigating this issue.
I did want to mention that this issue appears to be sporadic, as I'm seeing links returned at the moment:
https://serpapi.com/playground?engine=google_shopping&q=playstation+5&location=Austin%2C+Texas%2C+United+States&gl=us&hl=en&direct_link=true&num=100&device=desktop&direct_link=true&newPara=direct_link
Additionally, if links are not returned for a specific item, you can also retrieve them via the Google Products API:
https://serpapi.com/google-product-api
https://serpapi.com/playground?engine=google_product&product_id=4887235756540435899&gl=us&hl=en
We'll be sure to ping you once this issue has been resolved. In the meantime, please let us know if you have any questions.