Skip to main content
ScrapingRabbit

Blog · · 4 min read

Find Local Businesses With the Google Maps API

Search Google Maps as JSON: business name, rating, review count, address, website and hours for any type of business in any place. Code and the limits to plan for.

Google Maps holds the most complete public list of local businesses. Sales teams build lead lists from it, agencies check how a client ranks against nearby competitors, and researchers map where a kind of shop is found. This guide shows how to search it with a single GET request, what each field means, and how to pick the businesses worth contacting from the list.

Send what you want and where, in one search text, as query. Every call needs an API key. New accounts get 100 free credits and a first key is created automatically on sign-up (it is shown once on the dashboard). Sign in at scrapingrabbit.com/login, then send the key in the x-api-key header (a Bearer token also works). The code below reads it from the SCRAPINGRABBIT_API_KEY environment variable, so no key is ever written into your code.

curl -H "x-api-key: $SCRAPINGRABBIT_API_KEY" "https://api.scrapingrabbit.com/v1/google/maps?query=bakery%20in%20portland%20maine"

A successful call costs 5 credits, as the OpenAPI file lists it. Failed calls are not charged.

A shortened real answer, read on 3 December 2026. The answer held 20 businesses. We kept three, and left out the phone numbers, opening hours, map coordinates and image links, which every listing also carries when the business has them:

{
  "success": true,
  "data": {
    "query": "bakery in portland maine",
    "local_results": [
      {
        "position": 1,
        "title": "Standard Baking Co",
        "rating": 4.7,
        "reviews": 1560,
        "type": "Bakery",
        "address": "75 Commercial St, Portland, ME 04101",
        "neighborhood": "Old Port",
        "website": "https://standardbakingco.com/",
        "open_state": "Closed · Opens 7:30 AM"
      },
      {
        "position": 7,
        "title": "ZUbakery",
        "rating": 4.9,
        "reviews": 141,
        "type": "Bakery",
        "address": "81 Clark St, Portland, ME 04102",
        "neighborhood": "West End",
        "website": "http://www.zubakery.com/contact.html",
        "open_state": "Closed · Opens 9 AM"
      },
      {
        "position": 12,
        "title": "LB. MINI-MART",
        "rating": 4.8,
        "reviews": 10,
        "type": "Bakery",
        "address": "235 Vaughan St, Portland, ME 04102",
        "neighborhood": "West End",
        "website": "https://www.lbminimart.com/",
        "open_state": "Closed · Opens 7 AM"
      }
    ]
  }
}

What the fields mean

FieldMeaning
positionThe business's place in the results, starting at 1
titleThe business name
ratingThe average star rating, from 1 to 5
reviewsHow many reviews the rating is based on
typeThe main category, such as Bakery or Coffee shop
address and neighborhoodWhere the business is
websiteThe business's own site, when it published one
open_stateWhether it is open right now, and when it next opens or closes

Read rating together with reviews. In the answer above, a 4.8 from 10 reviews sits at position 12, below a 4.7 from 1,560 reviews. The first number alone does not tell you which business is better known.

Pick the businesses worth contacting

This code searches, keeps businesses with a good rating and a real number of reviews, and lists those that have a website, most reviewed first.

async function findBusinesses(query) {
  const url = `https://api.scrapingrabbit.com/v1/google/maps?query=${encodeURIComponent(query)}`;
  const res = await fetch(url, { headers: { "x-api-key": process.env.SCRAPINGRABBIT_API_KEY } });
  const body = await res.json();
  if (!body.success) return [];

  return body.data.local_results
    .filter((place) => (place.rating ?? 0) >= 4.5 && (place.reviews ?? 0) >= 100 && place.website)
    .sort((a, b) => b.reviews - a.reviews)
    .map((place) => ({ name: place.title, rating: place.rating, reviews: place.reviews, website: place.website }));
}

console.table(await findBusinesses("bakery in portland maine"));

The code returns an empty list when the call fails. It skips businesses without a website, because only some listings have one. A business can also have no rating yet, so the code treats a missing rating or reviews as 0.

The same in Python:

import os
import requests

res = requests.get(
    "https://api.scrapingrabbit.com/v1/google/maps",
    params={"query": "bakery in portland maine"},
    headers={"x-api-key": os.environ["SCRAPINGRABBIT_API_KEY"]},
    timeout=60,
)
body = res.json()
if body.get("success"):
    places = [
        p for p in body["data"]["local_results"]
        if (p.get("rating") or 0) >= 4.5 and (p.get("reviews") or 0) >= 100 and p.get("website")
    ]
    for p in sorted(places, key=lambda p: p["reviews"], reverse=True):
        print(p["title"], p["rating"], p["reviews"], p["website"])

Cover a whole region

One search returns about 20 businesses. To cover more ground, search each neighborhood or nearby town on its own, for example bakery in south portland maine, and join the lists. Remove repeats by title and address, because the same business can show up in two searches. Each search costs 5 credits, so ten towns cost 50.

Things to plan for

  • About 20 businesses per search. Search smaller areas to get more.
  • Not every listing has a phone or website. Skip or flag the ones that do not.
  • Ratings need review counts. A high rating from a handful of reviews is weak evidence.
  • The categories are loose. In our test, a coffee shop appeared in a search for bakeries, so check type before you rely on it.
  • Opening hours move. open_state is relative to when you read it, so store the time of your search.
  • Contact rules. Business listings are public, but the rules for contacting people from a list differ by country. Check them before you send anything.
  • Rate limits and credits. Each key is limited per minute: 10 requests on the free plan, 60 on Starter, 120 on Pro and 300 on Scale. A call costs 5 credits, so cache a search you will repeat.
  • Always check success. A failed request returns success: false, a code such as RATE_LIMITED or INVALID_API_KEY, and a message. Failed calls are not charged.

Try it without code

The free Google Maps business search works in the browser with no key and shows businesses for any type and place you type.

Try it yourself

Frequently asked questions

How do I say where to search?

Put the place in the search text, the way you would on Google Maps. For example bakery in portland maine.

How many businesses come back?

One page of about 20 businesses for each search.

Does every business have a phone number and website?

No. Phone numbers and websites appear only where the business published them. Some listings in the same search have neither.

More guides