serpapi / public-roadmap

Public Roadmap for SerpApi, LLC (https://serpapi.com)
55 stars 5 forks source link

[Google Shopping API] Fix Pagination Parameters and Clarify Documentation #1858

Closed schaferyan closed 6 days ago

schaferyan commented 2 months ago

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:

Screenshot 2024-08-20 at 4 13 34 PM

Front | Documentation | Playground

schaferyan commented 2 months ago

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).

initial page start=10 start=30 start=40

hilmanski commented 2 months ago

The user shared another example of another weird behavior related to Google Shopping's pagination.

2e45b9cb0121c864f617c88b93eccbbe7386a130

Inspect

hilmanski commented 1 month ago

A customer reported a similar bug in their search.

Inspect

sonika-serpapi commented 1 month ago

A customer reached out about this: Intercom

sharjeelm commented 1 month ago

@Krugloff Any estimate on the completion of this issue

sonika-serpapi commented 1 month ago

@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.

sharjeelm commented 3 weeks ago

@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

martin-serpapi commented 3 weeks ago

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.

sharjeelm commented 1 week ago

@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 .

marm123 commented 1 week ago

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?

tanys123 commented 1 week ago

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 terry@serpapi.com.

sharjeelm commented 6 days ago

Thanks a lot for update @Krugloff

Krugloff commented 6 days ago

@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
sharjeelm commented 6 days ago

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: @.***>

schaferyan commented 6 days ago

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.