POST /google_maps_places_scraper_sync_using_url • Credits: 0.1 credits per place returned
Google Maps Places (URL) scrapes the places from a Google Maps search results URL. It returns a JSON array. Each place holds the business name, the address, the Google Maps category, the star rating, the review count and the place URL. Each place costs 0.1 credits, which is $0.002 on the 1,000 and 5,000 credit packs.
What does Google Maps Places (URL) do?
Google Maps Places (URL) reads a Google Maps search results URL and returns the places on that map view. The URL is the input, so you control the exact search. Open Google Maps in a browser, run the search, then copy the URL from the address bar. Send that URL as google_map_search_url. RichAPI runs the Google Maps crawler over the URL and returns each place as one object in a JSON array. The limit parameter caps the number of places, and it therefore caps the cost of the call.
When do I use the URL endpoint and when the keyword endpoint?
RichAPI has two Google Maps place endpoints. They return the same kind of data and cost the same. The difference is the input.
Question | Google Maps Places (URL) | Google Maps Places (Keyword) |
Input | One Google Maps search results URL, in | A keyword in |
Best fit | You already have the Google Maps search open in a browser | You start from scratch and want to discover businesses |
Who builds the search | You build it in Google Maps, then copy the URL | RichAPI builds it from your two strings |
Map area control | The URL holds the map center and the zoom level | Google Maps resolves the area from |
Repeat across many cities | One URL is one map view. Copy a new URL for each city | Change |
Cost | 0.1 credits per place | 0.1 credits per place |
When a person already found the right map view by hand, use Google Maps Places (URL). When a program builds the search from a keyword list and a city list, use Google Maps Places (Keyword) API.
Which endpoint does Google Maps Places (URL) use?
Method:
POSTURL:
https://api.richapi.ai/api/v1/google_maps_places_scraper_sync_using_urlAuthentication:
x-api-keyheaderRequest format: JSON request body
Response: Synchronous JSON array
Default limit: 5 places
Credits: 0.1 credits per place returned
Google Maps Places (URL) accepts the POST method only. If you send GET, the API returns 405 with the message google_maps_places_scraper_sync_using_url only supports POST.
How to send a Google Maps Places (URL) request
Copy your API key from the RichAPI dashboard.
Open Google Maps in a browser and run the search that you want.
Copy the URL from the browser address bar.
Set
google_map_search_urlto that URL.Set
limitto the maximum number of places that you want.Send a
POSTrequest tohttps://api.richapi.ai/api/v1/google_maps_places_scraper_sync_using_url.Send the API key in the
x-api-keyheader.Read the places from the JSON array in the response.
CAUTION: Set limit on every Google Maps Places (URL) request. RichAPI charges 0.1 credits for each place in the response.
Which Google Maps URL do I send?
google_map_search_url takes a Google Maps search results URL. The example URL is https://www.google.com/maps/search/coffee+shop/@40.7128,-74.0060,14z. That URL holds three parts. coffee+shop is the search text. @40.7128,-74.0060 is the center of the map. 14z is the zoom level.
The zoom level sets the area of the search. A high zoom number covers a small area and returns fewer places. A low zoom number covers a wide area and returns more places. To split a large city into districts, copy one URL per district at a high zoom level.
How do I control the cost with limit?
limit is the cost control for Google Maps Places (URL). RichAPI charges 0.1 credits for each place in the response, so the maximum cost of one call is limit x 0.1 credits. RichAPI reserves that maximum before the call. RichAPI then charges for the number of places that the response holds, and it refunds the rest of the reservation.
CAUTION: Cap limit before you scrape a URL that covers a dense area. A low zoom level over a large metropolitan area returns thousands of places, and 1,000 places cost 100 credits.
| Maximum credits reserved | Maximum cost |
5 (default) | 0.5 | $0.01 |
25 | 2.5 | $0.05 |
100 | 10 | $0.20 |
500 | 50 | $1.00 |
1000 | 100 | $2.00 |
What does Google Maps Places (URL) return?
Google Maps Places (URL) returns a JSON array. Each entry is one Google Maps place. This example shows the response shape for a coffee shop search in New York.
[
{
"title": "Brooklyn Roasting Company",
"categoryName": "Coffee shop",
"address": "25 Jay St, Brooklyn, NY 11201",
"totalScore": 4.5,
"reviewsCount": 2841,
"url": "https://www.google.com/maps/search/?api=1&query=Brooklyn%20Roasting%20Company&query_place_id=ChIJ3fL5nEZawokRQxYcRVBjJZg"
},
{
"title": "Stumptown Coffee Roasters",
"categoryName": "Coffee shop",
"address": "30 W 8th St, New York, NY 10011",
"totalScore": 4.4,
"reviewsCount": 1893,
"url": "https://www.google.com/maps/search/?api=1&query=Stumptown%20Coffee%20Roasters&query_place_id=ChIJVXOTAABZwokRUPMQ0ubmSuA"
},
{
"title": "Birch Coffee",
"categoryName": "Espresso bar",
"address": "21 E 27th St, New York, NY 10016",
"totalScore": 4.4,
"reviewsCount": 987,
"url": "https://www.google.com/maps/search/?api=1&query=Birch%20Coffee&query_place_id=ChIJz2gGH5FZwokRLdxHPPRfMKI"
}
]
The values above are illustrative. When the Google Maps listing carries no value for a field, Google Maps Places (URL) omits that key.
Which fields does each Google Maps place hold?
Field | Type | Description |
| string | The business name on the Google Maps listing, for example |
| string | The primary Google Maps category of the business, for example |
| string | The full address of the business on one line, for example |
| number | The average star rating of the business, for example |
| integer | The number of Google reviews, for example |
| string | The Google Maps URL of the place. Its |
Which place fields are not in the documented response?
The documented response holds the six fields in the table above. It records no phone number, no website, no coordinates and no opening hours. To read the Google place ID, take the query_place_id query parameter from the url value.
How much does Google Maps Places (URL) cost?
Google Maps Places (URL) costs 0.1 credits per place returned. There is no base charge per call. At $0.02 a credit, the rate on the 1,000 and 5,000 credit packs, one place costs $0.002. Larger packs cost less per credit. A default call that returns 5 places costs 5 x 0.1 = 0.5 credits. That is $0.01.
Cost of one call, by the number of places returned:
Places returned | Credits | Cost |
0 | 0 | $0.00 |
1 | 0.1 | $0.002 |
5 (default limit) | 0.5 | $0.01 |
25 | 2.5 | $0.05 |
100 | 10 | $0.20 |
250 | 25 | $0.50 |
500 | 50 | $1.00 |
1000 | 100 | $2.00 |
Cost of a district sweep, across many calls:
Calls | Places per call | Places | Credits | Cost |
1 | 5 | 5 | 0.5 | $0.01 |
10 | 50 | 500 | 50 | $1.00 |
20 | 100 | 2,000 | 200 | $4.00 |
50 | 200 | 10,000 | 1,000 | $20.00 |
RichAPI reserves limit x 0.1 credits before the call. RichAPI then charges for the places in the response and refunds the rest. A call that returns zero places costs zero credits.
Which errors can Google Maps Places (URL) return?
Status | Meaning | What to do |
| The request body failed validation. A missing | Correct the parameter that the error message names. |
| The API key is missing or wrong. | Send a valid key in the |
| The organization has no credits left, or the team reached its monthly spend limit. | Buy credits in the RichAPI dashboard. |
| The API key has no access, or Google Maps Places (URL) is not on the plan. | Check the plan and the endpoint access in the RichAPI dashboard. |
| The request used a method other than | Send the request again with the |
| Too many requests. | Wait, then send the request again. |
| The API failed. | Send the request again. If the failure repeats, write to [email protected]. |
| The Google Maps search failed or refused the request. | Send the request again. If the failure repeats, write to [email protected]. |
| The search took too long. | Lower |
RichAPI refunds the credit reservation for every response outside the 200 range. A 400, 429 or 500 response costs no credits.
Frequently asked questions
How much does one Google Maps place cost?
One Google Maps place costs 0.1 credits, which is $0.002 on the 1,000 and 5,000 credit packs. Google Maps Places (URL) charges no base credit per call, so a call that returns zero places costs zero credits.
Do I send a keyword or a URL to Google Maps Places (URL)?
Send a URL. Google Maps Places (URL) takes a Google Maps search results URL in google_map_search_url. To search by a keyword and a city instead, use the Google Maps Places (Keyword) endpoint.
Where do I find the Google Maps search results URL?
Open Google Maps in a browser and run the search. The browser address bar then holds the search results URL. Copy that URL and send it as google_map_search_url.
What is the default limit for Google Maps Places (URL)?
The default value of limit is 5 places. If you omit limit, RichAPI applies 5, and the call costs 0.5 credits at most.
Does Google Maps Places (URL) return a phone number or a website?
The documented response holds six fields: title, categoryName, address, totalScore, reviewsCount and url. The Google Maps Places (Keyword) endpoint documents a phone field and a website field.
How do I get the reviews for a place that Google Maps Places (URL) returns?
Take the url value of the place. Send it as google_map_review_url to the RichAPI Google Maps Reviews endpoint, which costs 0.1 credits per review returned.
How do I cover a whole city with Google Maps Places (URL)?
One URL is one map view, and Google Maps returns a limited result set per view. Copy one URL per district at a high zoom level, then send one call per URL.
Related articles
Google Maps Places (Keyword) API — finds places from a keyword and a location instead of a URL. It costs 0.1 credits per place returned.
Google Maps Reviews API — returns the reviews of one Google Maps place URL. It costs 0.1 credits per review returned.
