POST /google_maps_places_scraper_keyword • Credits: 0.1 credits per place returned
Google Maps Places (Keyword) searches Google Maps for a business keyword in a location. It returns a JSON array of places. Each place holds the business name, the street address, the phone number, the website, the category, the star rating and the review count. Each POST call costs 0.1 credits per place returned, which is $0.002 per place on the 1,000 and 5,000 credit packs.
What does Google Maps Places (Keyword) do?
Local sales teams need a list of every business of one type in one city. Google Maps Places (Keyword) builds that list from Google Maps. Send a business keyword such as "coffee shop" and a location such as "New York, NY". RichAPI runs the Google Maps search and returns each matching place as one object in a JSON array. The data source is the Google Maps place listing, so the phone number, the website and the rating come from the business profile. The limit parameter caps the number of places, and it therefore caps the cost of the call.
Which endpoint does Google Maps Places (Keyword) use?
Method:
POSTURL:
https://api.richapi.ai/api/v1/google_maps_places_scraper_keywordAuthentication:
x-api-keyheaderRequest format: JSON request body
Response: Synchronous JSON array
Default limit: 25 places
Maximum limit: 1000 places
Credits: 0.1 credits per place returned
Google Maps Places (Keyword) accepts the POST method only. If you send GET, the API returns 405.
How to send a Google Maps Places (Keyword) request
Copy your API key from the RichAPI dashboard.
Set
search_queryto the business type that you want to find, for example"coffee shop".Set
location_queryto the city or the area, for example"New York, NY".Set
limitto the maximum number of places that you want.Send a
POSTrequest tohttps://api.richapi.ai/api/v1/google_maps_places_scraper_keyword.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 (Keyword) request. A dense city returns thousands of places for one keyword, and each place costs 0.1 credits.
cURL
curl -X POST https://api.richapi.ai/api/v1/google_maps_places_scraper_keyword
-H "x-api-key: YOUR_API_KEY"
-H "Content-Type: application/json"
-d '{
"search_query": "coffee shop",
"location_query": "New York, NY",
"limit": 25
}'
Python
import requests
response = requests.post(
"https://api.richapi.ai/api/v1/google_maps_places_scraper_keyword",
headers={"x-api-key": "YOUR_API_KEY"},
json={
"search_query": "coffee shop",
"location_query": "New York, NY",
"limit": 25,
},
timeout=180,
)
response.raise_for_status()
for place in response.json():
print(place["title"], place.get("phone"), place.get("website"))
Node.js
const response = await fetch(
"https://api.richapi.ai/api/v1/google_maps_places_scraper_keyword",
{
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
search_query: "coffee shop",
location_query: "New York, NY",
limit: 25,
}),
}
);
const places = await response.json();
for (const place of places) {
console.log(place.title, place.phone, place.website);
}
Which parameters does Google Maps Places (Keyword) accept?
Parameter | Type | Required | Default | Description |
| string | Yes | none | The keyword search. It holds one business type or one business name, for example |
| string | No | none | The location search. It holds a city, an area or a region, for example |
| integer | Yes |
| The maximum number of places to return. The valid range is 1 to 1000. |
The schema marks limit as required and gives it the default value 25. If you omit limit, RichAPI applies 25. If limit falls outside the range 1 to 1000, the API returns 400 with the message limit must be between 1 and 1000.
Google Maps Places (Keyword) rejects any parameter name that is not in the table above. An unknown name returns 400 with the message Unknown input field(s).
How do I write the search_query and the location_query values?
search_query is one plain string. It holds the words that you type into the Google Maps search box, for example "coffee shop", "dentist" or "plumber". One call searches one keyword. To cover several business types, send one call per keyword.
location_query is one plain string. It holds a fuzzy location name, for example "Pune", "New York, NY" or "Brooklyn". location_query is optional. If you omit location_query, Google Maps resolves the location from the keyword alone, and the results spread across regions. Send location_query on every local search.
How do I control the cost with limit?
limit is the cost control for Google Maps Places (Keyword). 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 search a dense city. An uncapped run over a large metropolitan area returns thousands of places, and 1000 places cost 100 credits.
| Maximum credits reserved | Maximum cost |
25 (default) | 2.5 | $0.05 |
100 | 10 | $0.20 |
500 | 50 | $1.00 |
1000 (maximum) | 100 | $2.00 |
What does Google Maps Places (Keyword) return?
Google Maps Places (Keyword) returns a JSON array. Each entry is one Google Maps place. This example shows a real response for the keyword "coffee shop" in New York.
[
{
"title": "BUDDIES COFFEE",
"totalScore": 5,
"reviewsCount": 1255,
"street": "226 E 3rd St",
"city": "New York",
"state": "New York",
"countryCode": "US",
"website": "http://buddiescoffeenyc.com/",
"phone": "(212) 203-1918",
"categories": [
"Coffee shop",
"Coffee roastery",
"Coffee stand",
"Coffee store",
"Espresso bar"
],
"categoryName": "Coffee shop",
"url": "https://www.google.com/maps/search/?api=1&query=BUDDIES%20COFFEE&query_place_id=ChIJo20fEQpZwokRW7sSJjFierw"
},
{
"title": "Now or Never Coffee",
"totalScore": 4.6,
"reviewsCount": 416,
"street": "30 Grand St",
"city": "New York",
"state": "New York",
"countryCode": "US",
"website": "http://nowornevercoffee.com/",
"phone": "(347) 556-8312",
"categories": ["Coffee shop"],
"categoryName": "Coffee shop",
"url": "https://www.google.com/maps/search/?api=1&query=Now%20or%20Never%20Coffee&query_place_id=ChIJcQM_C4FZwokR0xEGxV7HeVM"
},
{
"title": "Coffee Project New York | East Village",
"totalScore": 4.6,
"reviewsCount": 823,
"street": "239 E 5th St",
"city": "New York",
"state": "New York",
"countryCode": "US",
"website": "https://coffeeprojectny.com/?utm_source=google&utm_medium=organic&utm_campaign=gmb_ev",
"phone": "(212) 228-7888",
"categories": ["Coffee shop", "Breakfast restaurant", "Cafe"],
"categoryName": "Coffee shop",
"url": "https://www.google.com/maps/search/?api=1&query=Coffee%20Project%20New%20York%20%7C%20East%20Village&query_place_id=ChIJ_dckWptZwokR_LkU9WxPNZ4"
},
{
"title": "Blackstone Coffee Roaster",
"totalScore": 4.7,
"reviewsCount": 316,
"street": "502 Hudson St",
"city": "New York",
"state": "New York",
"countryCode": "US",
"phone": "(212) 989-6131",
"categories": ["Coffee shop", "Cafe", "Deli"],
"categoryName": "Coffee shop",
"url": "https://www.google.com/maps/search/?api=1&query=Blackstone%20Coffee%20Roaster&query_place_id=ChIJMTPfU5NZwokRljkmneTlHNE"
},
{
"title": "Urban Backyard",
"totalScore": 4.7,
"reviewsCount": 742,
"street": "180 Mulberry St",
"city": "New York",
"state": "New York",
"countryCode": "US",
"website": "http://www.urbanbackyardnyc.com/",
"phone": "(646) 692-9957",
"categories": ["Coffee shop"],
"categoryName": "Coffee shop",
"url": "https://www.google.com/maps/search/?api=1&query=Urban%20Backyard&query_place_id=ChIJv6INkhtZwokR5Ol7iuc6TJc"
}
]
The fourth place in the example holds no website key. When the Google Maps listing carries no value for a field, Google Maps Places (Keyword) 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 |
| array of strings | Every category on the listing. The example holds five categories for one coffee roastery. |
| string | The street address line, for example |
| string | The city of the business, for example |
| string | The state or the region of the business, for example |
| string | The two-letter country code, for example |
| string | The formatted public phone number, for example |
| string | The website URL from the listing. When the listing holds no website, the key is absent. |
| 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 response?
The verified Google Maps Places (Keyword) response holds the twelve fields in the table above. It holds no geographic coordinates, no opening hours, no postal code and no separate place ID field. To read the Google place ID, take the query_place_id query parameter from the url value.
How do I build a local lead list with Google Maps Places (Keyword)?
Local lead generation is the core use case. One call returns every business of one type in one city, with the phone number and the website for each.
Choose one business type, for example
"dentist".Set
search_queryto that business type.Set
location_queryto the target city, for example"Austin, TX".Set
limitto the size of the list that you want, for example200.Send the request.
Read
title,street,city,phoneandwebsitefrom each place.Repeat the call with a second business type to widen the list.
To cover a large metropolitan area, send one call per district instead of one call for the whole city. Google Maps returns a limited result set per search, and district calls return more distinct businesses. To enrich each website with company data, pass the website value to the RichAPI Website Intelligence endpoint.
How much does Google Maps Places (Keyword) cost?
Google Maps Places (Keyword) 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 25 places costs 25 x 0.1 = 2.5 credits. That is $0.05.
Cost of one call, by the number of places returned:
Places returned | Credits | Cost |
0 | 0 | $0.00 |
1 | 0.1 | $0.002 |
10 | 1 | $0.02 |
25 (default limit) | 2.5 | $0.05 |
100 | 10 | $0.20 |
250 | 25 | $0.50 |
500 | 50 | $1.00 |
1000 (maximum limit) | 100 | $2.00 |
Cost of a lead list, across many calls:
Calls | Places per call | Places | Credits | Cost |
1 | 25 | 25 | 2.5 | $0.05 |
10 | 25 | 250 | 25 | $0.50 |
10 | 100 | 1,000 | 100 | $2.00 |
20 | 500 | 10,000 | 1,000 | $20.00 |
50 | 1000 | 50,000 | 5,000 | $100.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 (Keyword) 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 (Keyword) 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 (Keyword) charges no base credit per call, so a call that returns zero places costs zero credits.
How many places can Google Maps Places (Keyword) return in one call?
Google Maps Places (Keyword) returns up to 1000 places in one call. The limit parameter sets the cap, and the default value is 25.
Can I search several business types in one Google Maps Places (Keyword) request?
No. search_query holds one keyword string. To search several business types, send one call per business type.
Is location_query required for Google Maps Places (Keyword)?
No. location_query is optional. If you omit location_query, Google Maps resolves the location from the keyword alone, and the results spread across regions.
Does Google Maps Places (Keyword) return an email address?
No. The Google Maps place listing holds a phone number and a website, and not an email address. To find email addresses, pass each website value to the RichAPI Website Email Extractor endpoint.
Why does a place in the response hold no website field?
When the Google Maps listing carries no value for a field, Google Maps Places (Keyword) omits that key. A business without a website in its listing returns a place object with no website key.
How do I get the reviews for a place that Google Maps Places (Keyword) 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.
Related articles
Google Maps Places (URL) API — scrapes places from a Google Maps search results URL instead of a keyword. 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.
Website Intelligence API — enriches the
websitevalue of a place with company data.Website Email Extractor API — finds email addresses on the website of a place.
