[Google Shopping API] Fix Pagination Parameters and Clarify Documentation
A potential Enterprise Customer reached out to ask for clarification on the pagination for the Google Shopping API.
The num parameter currently seems to be ignored for US searches. If it's not possible to fix this, we should note this in the documentation and disable it in the Playground.
Also, our documentation now states that for searches in the US, start should be incremented by 10. This seems to be accurate but could use further clarification since 40 results are returned per page.
Here is a suggestion for what the revised documentation could look like:
The customer also noted that the serpapi_pagination.next URL also seems to have a value of start=20 on the first page.
I experimented in the playground and saw some strange behavior for serpapi_pagination. It seemed to increment by 20 for the first several pages, then stopped changing (the same start value was suggested to be used again).
The user shared another example of another weird behavior related to Google Shopping's pagination.
- pagination.next value showed a plain Google link
- serpapi_pagination showed the current link
A customer reached out about this: Intercom
@Krugloff Any estimate on the completion of this issue
@sharjeelm Thank you for your question. The documentation changes have been made. It's difficult to provide an ETA, but the other parts of this issue have been marked in progress and are still being worked on.
@sonika-serpapi Sorry to ping again shortly on this but I have a product build upon Google Shopping API section of SERP API and major section of that product is failing due to pagination issue. I hope you understand my stance as if you can prioritize the fixing of this issue
Thank you for following up with us @sharjeelm ! I'm really sorry for the inconvenience this is causing. There is a PR linked to this issue which is currently under review. Unfortunately, I cannot provide an ETA for when it will be merged. However, this issue has been labeled as prioritized and our engineers will try to merge the PR as soon as possible.
@martin-serpapi @sonika-serpapi Can I please get update on this . As our product is blocked due to pagination issue. If this can take longer I fear we will have to migrate to zenserp .
Hi @sharjeelm, thanks for reaching out.
We're still working on the pull request review. While I can't share the exact ETA, I hope this will be resolved sometime this week.
@Krugloff can you perhaps share more details or when we can potentially expect the PR to be merged?
Hi @sharjeelm, we are actively working on this issue. To further understand, I would like to discuss further to see if our latest solution could help. Could you please share more details about it? If you prefer, feel free to email me at [email protected].
Thanks a lot for update @Krugloff
@sharjeelm We've completed the Google Shopping pagination for the new layout. I recommend using it via the serpapi_pagination.next parameter. I hope it will work well for your needs, but please don’t hesitate to reach out if you encounter any issues!
One thing to note it always takes a difference of 10 in next and then next=20 while giving 40 products
On Mon, Oct 28, 2024 at 6:05 PM Alex Kruglov (Makeev) < @.***> wrote:
@sharjeelm https://github.com/sharjeelm We've completed the Google Shopping pagination for the new layout. I recommend using it via the serpapi_pagination.next parameter. I hope it will work well for your needs, but please don’t hesitate to reach out if you encounter any issues! Screenshot.2024-10-28.at.16.03.36.png (view on web) https://github.com/user-attachments/assets/eb5060ed-d61e-46c4-94ea-d2057b934e9c
— Reply to this email directly, view it on GitHub https://github.com/serpapi/public-roadmap/issues/1858#issuecomment-2441535695, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGFJKD3BLX33TE3LTWNL4XLZ5YZCDAVCNFSM6AAAAABM23IWJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBRGUZTKNRZGU . You are receiving this because you were mentioned.Message ID: @.***>
Thank you @sharjeelm. Yes, this is now how the start parameter now works on Google's side. We understand it's not intuitive, which is why we recommend using serpapi_pagination.next instead of incrementing start directly.
@schaferyan @Krugloff Can you please clarify one more thing how I can make sure that google shopping search API will always provide response as per new version of google shopping as I was unable to see any parameter in google shopping search api to do so .
Sorry to ping again Can you please clarify one more thing how I can make sure that google shopping search API will always provide response as per new version of google shopping as I was unable to see any parameter in google shopping search api to do so .
On Tue, Oct 29, 2024 at 12:26 AM Ryan Schafer @.***> wrote:
Thank you @sharjeelm https://github.com/sharjeelm. Yes, this is now how the start parameter now works on Google's side. We understand it's not intuitive, which is why we recommend using serpapi_pagination.next instead of incrementing start directly.
— Reply to this email directly, view it on GitHub https://github.com/serpapi/public-roadmap/issues/1858#issuecomment-2442441904, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGFJKD6EEDJ4YYN6EHAUCE3Z52FWBAVCNFSM6AAAAABM23IWJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBSGQ2DCOJQGQ . You are receiving this because you were mentioned.Message ID: @.***>
Hi @sharjeelm , thank you for your follow-up question.
Unfortunately, we don't support a parameter with our Google Shopping API that will force it to use the new layout for all of your searches. This depends on the actual Google Shopping engine and we don't have control over it. Whether results using the new layout are returned for your search depends on the location you used for it.
Google has released the new shopping layout in the US, and a few other countries. You can view a list of the countries supporting the new layout in our Google Shopping API documentation.
Searches for these locations will return results using the new shopping layout.
I hope this makes sense. If you have any follow-up questions, please let me know.
I am trying only for US still getting old version data
On Thu, Nov 14, 2024, 9:35 PM Martin Kaldramov @.***> wrote:
Hi @sharjeelm https://github.com/sharjeelm , thank you for your follow-up question.
Unfortunately, we don't support a parameter with our Google Shopping API that will force it to use the new layout for all of your searches. This depends on the actual Google Shopping engine and we don't have control over it. Whether results using the new layout are returned for your search depends on the location you used for it.
Google has released the new shopping layout in the US, and a few other countries. You can view a list of the countries supporting the new layout in our Google Shopping API documentation https://serpapi.com/google-shopping-api.
Searches for these locations will return results using the new shopping layout.
I hope this makes sense. If you have any follow-up questions, please let me know.
— Reply to this email directly, view it on GitHub https://github.com/serpapi/public-roadmap/issues/1858#issuecomment-2476891735, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGFJKD3ZMEQRE3G4CTDEPMT2ATGODAVCNFSM6AAAAABM23IWJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZWHA4TCNZTGU . You are receiving this because you were mentioned.Message ID: @.***>
Thank you for sharing this information @sharjeelm , and apologies for the inconvenience.
Can you please share the ID of a search for which you're experiencing this? It can be found at https://serpapi.com/searches or in the search_metadata block of the JSON response.