Google Maps Scraper avatar

Google Maps Scraper

Try for free

No credit card required

View all Actors
Google Maps Scraper

Google Maps Scraper

compass/crawler-google-places
Try for free

No credit card required

Extract data from hundreds of Google Maps locations and businesses. Get Google Maps data including reviews, images, contact info, opening hours, location, popular times, prices & more. Export scraped data, run the scraper via API, schedule and monitor runs, or integrate with other tools.

Do you want to learn more about this Actor?

Get a demo
GB

searchString does not always return Google URL provided

Closed

gabagoolsoup opened this issue
7 days ago

When crawling, we build the Google URLs using the CID or PlaceId. Here are some examples:

1"startUrls": [
2    {
3      "url": "https://www.google.com/maps/search/?api=1&query=Google&query_place_id=ChIJYRk05VFbwokRhgaIgY6Hed4"
4    },
5    {
6      "url": "https://www.google.com/maps/search/?api=1&query=Google&query_place_id=ChIJ9ZMFcBExlkYRTRgMHyTbm3Q"
7    },
8    {
9      "url": "https://www.google.com/maps/search/?api=1&query=Google&query_place_id=ChIJq6qqGoOCOIwRNrhovQ9AjMg"
10    }
11  ]

Then, when we get the responses, we use an internal matching mechanism where the given CID/PlaceId is used to match the responses with the URLs provided. To give you some context, here are the steps we follow every time we crawl places:

1- Get a collection of places from our system.

2- Build the Google URLs using the CID or PlaceId, e.g., https://www.google.com/maps/search/?api=1&query=Google&query_place_id=ChIJq6qqGoOCOIwRNrhovQ9AjMg, https://maps.google.com/?cid=6929841930222513040.

3-Once the apify runs are complete, we pull the results along with the datasets for processing in our system.

4- We iterate over the dataset to match the responses with the CIDs/places we have, allowing us to associate each response with a corresponding place in our system.

We realized that some returned places might have their CID or PlaceId changed over time. To improve our matching mechanism, we started using the searchString property to match the URLs used during the crawling process with the URLs returned in the searchString. This usually contains the same URL that was used when fetching the place.

However, we have noticed that some places return either just "Google" or a new URL in the searchString, making it harder for us to find matches on our side.

Is it possible to always return the provided URL in the searchString when the scraper successfully processes it?

For example, if we provide the URL https://maps.google.com/?cid=6929841930222513040, we expect to receive the following value in the searchString: "Direct Detail URL: https://maps.google.com/?cid=6929841930222513040".

milunnn avatar

Hi,

thanks for your patience.

This bug has already been fixed in the latest release. Please try to do a test run if it works and if you come across any unwanted behavior, do not hesitate to reopen this issue or create a new one.

Developer
Maintained by Apify
Actor metrics
  • 3.2k monthly users
  • 391 stars
  • 98.1% runs succeeded
  • 3.7 days response time
  • Created in Nov 2018
  • Modified about 11 hours ago