How to scrape more than 120 Search Result's for a place #132
Unanswered
Chetan11-dev
asked this question in
Q&A
Replies: 1 comment
-
https://www.google.com/maps/search/Bus+stops+in+bangalore/@12.9004884,77.571466,14z/data=!3m1!4b1?authuser=0&entry=ttu Please check the address mannualy. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
By default, the Google Maps API limits search results to 120 per query and restricts the ability to scroll beyond this number. To obtain more than 120 search results, one must employ a strategy involving the zoom levels and geographic coordinates, and using multiple queries. This approach is done in three primary steps:
Determine Search Points: The first step involves identifying a list of geographic coordinates and corresponding zoom levels for the desired search area. For instance, to cover various parts of Bangalore, one might use the following sets of coordinates and zoom levels:
Execute Scraper: The next step is to run the scraper for each combination of coordinates and zoom levels to collect the search results.
Consolidate Results: Finally, the collected results need to be merged.
The second and third steps are relatively straightforward. However, the first step, involving the determination of search points, presents a challenge. If one can devise a solution to this problem, it becomes possible to scrape more than 120 search results. This step will likely require using an API, such as the Nominatim API, to accurately determine the coordinates of a place.
For those interested in solving this issue, a starting point is provided below. The primary task is to implement the
get_search_points
function, which generates a list of search points for a given city:Beta Was this translation helpful? Give feedback.
All reactions