Actor picture

Google Maps Scraper

drobnikj/crawler-google-places

Extend the official Google Maps API and scrape reviews, photos, and popular times from Google Places. Google popular times API and more. Extract data from Google My Business. Download your data as HTML table, JSON, CSV, Excel, XML, and RSS feed.

No credit card required

Author's avatarJakub Drobník
  • Modified
  • Users9,783
  • Runs1,294,072
Actor picture

Google Maps Scraper

Start URLs

startUrls

Optional

array

List of URLs to be crawled. They can be search URLs or place URLs. The only valid format for URLs contains either /maps/search or /maps/place

Search Terms

searchStringsArray

Optional

array

Array of strings to be searched. It is also possible to fill in Google Place IDs in the format place_id:ChIJp4JiUCNP0xQR1JaSjpW_Hms. Setting geolocation input fields is more accurate than including location in the search string.

Max crawled places

maxCrawledPlaces

Optional

integer

Maximum number of places you scrape per whole run. If you want to scrape all available, set this to `9999999`.

Max crawled places per search

maxCrawledPlacesPerSearch

Optional

integer

Maximum number of places you scrape per search term. If you want to scrape all available, set this to `9999999`.

Language

language

Optional

string

Force showing results in this language.

Options:

"en", "af", "az", "id", "ms", "bs", "ca", "cs", "da", "de", "et", "es", "es-419", "eu", "fil", "fr", "gl", "hr", "zu", "is", "it", "sw", "lv", "lt", "hu", "nl", "no", "uz", "pl", "pt-BR", "pt-PT", "ro", "sq", "sk", "sl", "fi", "sv", "vi", "tr", "el", "bg", "ky", "kk", "mk", "mn", "ru", "sr", "uk", "ka", "hy", "iw", "ur", "ar", "fa", "am", "ne", "hi", "mr", "bn", "pa", "gu", "ta", "te", "kn", "ml", "si", "th", "lo", "my", "km", "ko", "ja", "zh-CN", "zh-TW"

Max reviews (slow)

maxReviews

Optional

integer

Max number of reviews per place to scrape. If you fill in 0 or nothing, no reviews will be scraped. For all reviews, just put 99999

Max Images (Slow for more than 1)

maxImages

Optional

integer

Max number of images per place to scrape. If you fill in 0 or nothing, no images will be scraped. For all images, just put 99999

Include popular times

includeHistogram

Optional

boolean

If checked, the crawler scrapes popular times for all places. You can speed up crawling if you disable this.

Include opening hours

includeOpeningHours

Optional

boolean

If checked, the crawler scrapes opening hours for all places. You can speed up crawling if you disable this.

Include people also search

includePeopleAlsoSearch

Optional

boolean

If checked, the crawler scrapes "people also search" for all places. You can speed up crawling if you disable this.

Additional Place Info

additionalInfo

Optional

boolean

Extract additional information about each place, e.g. Service Options, Highlights, Offerings, etc. You can speed up crawling if you disable this.

Sort reviews by

reviewsSort

Optional

string

Define how reviews should be sorted.

Options:

"mostRelevant", "newest", "highestRanking", "lowestRanking"

Reviews translation

reviewsTranslation

Optional

string

Google automatically adds translated text to the original. You can adjust this behavior here.

Options:

"originalAndTranslated", "onlyOriginal", "onlyTranslated"

Export place URLs only (skips place details)

exportPlaceUrls

Optional

boolean

Scraper will return only place URLs without crawling their details.

Country

country

Optional

string

Set the country where the search should be performed, e.g. 'USA'. For more accurate search, set state, city or lat + lng.

State

state

Optional

string

Set a state where the search should be performed, e.g. 'Massachusetts', 'England', 'Berlin', etc. For a more accurate search, set city or lat + lng.

County

county

Optional

string

Set the county where the search should be performed, e.g. 'washington'. For more accurate search, set state, city or lat + lng.

City

city

Optional

string

Set the city where the search should be performed, e.g. 'Pittsfield'. For a more accurate search, set lat and lng.

Postal code

postalCode

Optional

string

Set the postal code where the search should be performed, e.g. 10001. Select a country as well to ensure the correct postal code is used. For a more accurate search, set lat and lng.

Viewport point latitude

lat

Optional

string

Use in combination with longitude and zoom to set the viewport to search on. Has preference over country/state/city/postal.

Viewport point longitude

lng

Optional

string

Use in combination with latitude and zoom to set the viewport to search on. Has preference over country/state/city/postal.

Viewport zoom level

zoom

Optional

integer

Defines how detailed the scrape will be. A higher zoom level ensures that fewer known places are scraped, but will take more time to complete (with country/state/city) or extract smaller area (with lat + lng). Zoom 21 is a single street while zoom 1 is the whole planet. We recommend zoom 12-15 for most cases. You can test zoom by changing the number before 'z' in the URL: https://www.google.com/maps/@50.0860729,14.4135326,17z

Max automatic zoom out

maxAutomaticZoomOut

Optional

integer

Parameter to stop searching once Google zooms out too far. It counts how far it zoomed out compared to the first page. Keep in mind that `zoom: 1` is the whole world and `zoom: 21` is a tiny street. So usually you want `maxAutomaticZoomOut` to be between `0` and `5`. Also, keep in mind that Google zooms a bit differently in each run.

Manual polygon

polygon

Optional

object

Manual polygon to define exact search area if other geolocation parameters don't work well. See README for details.

Proxy configuration

proxyConfig

Required

object

You need to use Apify proxy or custom proxies. Automatic proxy works very well for Google Maps.

Max concurrency

maxConcurrency

Optional

integer

Maximum number of pages that will be processed in parallel. This is usually limited by the memory assigned to the run.

Max page retries

maxPageRetries

Optional

integer

Maximum number of retries when page scraping fails. Set to 0 if you are getting repeated errors where retrying does not help (and report to support@apify.com or create new issue)

Page load timeout seconds

pageLoadTimeoutSec

Optional

integer

Maximum time in seconds to wait for the page to load.

Max opened pages per browser

maxPagesPerBrowser

Optional

integer

How many pages can be opened at once for each browser. Having more pages in one browser is faster but can lead to increased blocking.

Use Chrome

useChrome

Optional

boolean

Uses full Chrome browser instead of Chromium. Be careful, it is not stable on some versions! Don't turn this on unless you know what you are doing.

Debug log

debug

Optional

boolean

Debug messages will be included in the log.

Use stealth

useStealth

Optional

boolean

Enable stealth if you're not using Chrome. Use only if you know what you are doing.

Reviewer name

scrapeReviewerName

Optional

boolean

Extract Reviewer name

Reviewer ID

scrapeReviewerId

Optional

boolean

Extract Reviewer ID

Reviewer URL

scrapeReviewerUrl

Optional

boolean

Extract Reviewer URL

Review ID

scrapeReviewId

Optional

boolean

Extract Review ID

Review URL

scrapeReviewUrl

Optional

boolean

Extract Review URL

Response from owner

scrapeResponseFromOwnerText

Optional

boolean

Extract Response from owner