serpapi / serpapi-javascript

Scrape and parse search engine results using SerpApi.
https://serpapi.com
MIT License
45 stars 4 forks source link

Support pagination for `getJson` #3

Closed sebastianquek closed 1 year ago

sebastianquek commented 1 year ago

Handles #2

This PR implements "Approach 2: Next method" as mentioned in the above issue. Main reasons are that it supports callbacks and it can be used to create an approach similar to Approach 3.

Note that this PR doesn't cover pagination support for getJsonBySearchId.

Tests

I've added tests for 6 of the 7 types of pagination approaches:

Additional notes