gmapsleadfinder / google-maps-scraper
Google Maps Scraper / Extractor / Lead Scraper SDK for the GMaps Lead Finder Agent HTTP API
Package info
github.com/gmaps-lead-finder/google-maps-scraper-php
pkg:composer/gmapsleadfinder/google-maps-scraper
Requires
- php: ^8.1
- ext-curl: *
- ext-json: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Google Maps Extractor · Google Maps Lead Scraper · Google Maps Lead Extractor
PHP SDK to scrape Google Maps places (leads), reviews, and photos through a hosted Agent HTTP API. Powered by GMaps Lead Finder. This is not a local browser crawler — jobs run in the cloud scrape-and-enrich pipeline.
- Packagist:
gmapsleadfinder/google-maps-scraper - GitHub: https://github.com/gmaps-lead-finder/google-maps-scraper-php
- CLI:
gmaps-scraper
Get an API key
- Sign in at gmapsleadfinder.com.
- Use a plan with Agent API (Growth or higher) — see Pricing.
- Open Account → API key and copy your
gmf_…key.
export GMF_API_KEY=gmf_your_key_here
Install
composer require gmapsleadfinder/google-maps-scraper
Requires PHP 8.1+ with ext-curl and ext-json.
Quickstart
<?php use GmapsLeadFinder\GoogleMapsScraper\Client; $client = new Client(); // reads GMF_API_KEY $me = $client->me(); echo $me['plan'], ' ', $me['creditsRemaining'], "\n"; $rows = $client->scrape('dentists in Austin TX'); echo count($rows), "\n"; // Single-place reviews / photos (run sequentially — one in-flight job per user) $reviews = $client->scrapeReviews('https://maps.google.com/?cid=…'); $photos = $client->scrapePhotos('ChIJ…'); // Place ID, URL, or business_id echo count($reviews), ' ', count($photos), "\n";
CLI (after Composer install):
vendor/bin/gmaps-scraper me
vendor/bin/gmaps-scraper scrape "dentists in Austin TX" --out leads.json
From this repo:
composer install php examples/quickstart.php php bin/gmaps-scraper me
Client API
| Method | Description |
|---|---|
new Client($options) |
From env / apiKey / baseUrl / timeoutMs |
me() |
Plan & credits |
createJob($keyword) |
Queue one-keyword leads job |
getJob($jobId) |
Poll leads status |
getResults($jobId, $options) |
Paginated leads rows (limit, cursor) |
scrape($keyword, $options) |
Create → poll → all leads rows |
createReviewsJob($place) |
Queue single-place reviews job |
getReviewsJob($jobId) |
Poll reviews status |
getReviewsResults($jobId, $options) |
Paginated review rows |
scrapeReviews($place, $options) |
Create → poll → all review rows |
createPhotosJob($place) |
Queue single-place photos job |
getPhotosJob($jobId) |
Poll photos status |
getPhotosResults($jobId, $options) |
Paginated photo rows |
scrapePhotos($place, $options) |
Create → poll → all photo rows |
scrape / scrapeReviews / scrapePhotos options: pollIntervalMs (default 2000), timeoutMs (default 600000), resultLimit (default 100).
Errors
Exceptions under GmapsLeadFinder\GoogleMapsScraper\Exceptions\:
| HTTP | Class |
|---|---|
| 400 | BadRequestException |
| 401 | AuthenticationException |
| 402 | InsufficientCreditsException |
| 403 | PlanNotAllowedException |
| 404 | NotFoundException |
| 409 | JobConflictException |
| — | TimeoutException, ApiException |
Limits
- Exactly one keyword per leads job; exactly one place per reviews or photos job
- One running job per user (
409if busy); run keywords/places sequentially - 1 credit = 1 place row; Growth+ required
Publish to Packagist
git tag v0.1.2 git push origin main --tags
Then submit https://github.com/gmaps-lead-finder/google-maps-scraper-php at packagist.org.
Links
| Resource | URL |
|---|---|
| Website | https://gmapsleadfinder.com |
| HTTP API | https://gmapsleadfinder.com/docs/api |
| Packagist | https://packagist.org/packages/gmapsleadfinder/google-maps-scraper |
| Multi-language kit | https://github.com/gmaps-lead-finder/google-maps-scraper |
License
MIT
