> For the complete documentation index, see [llms.txt](https://docs.pullbay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pullbay.com/documentation/guides/how-to-guides-for-google-maps/how-to-find-local-competitors-on-google-maps.md).

# How to Find Local Competitors on Google Maps

Local competitor research often starts with a simple Google Maps search: “dentist near me”, “flower shop in istanbul”, “coffee shop in brooklyn”, or “pilates studio in berlin”. The problem is that manual research does not scale when you need structured competitor data across many categories, cities, or neighborhoods.

Pullbay’s Google Maps API lets you search places by keyword and collect structured business listing data such as name, address, website, phone, rating, review count, categories, opening hours, Google Maps URL, and FID.

This guide shows how to find local competitors on Google Maps using Pullbay.

### The Competitor Research Workflow

A simple local competitor workflow looks like this:

1. Search Google Maps by business category and location
2. Collect structured place results
3. Deduplicate places by fid or placeId
4. Compare rating, review count, categories, address, website, and phone
5. Optionally fetch full place details by fid
6. Optionally fetch reviews by Google Maps place URL

### Endpoint

```
GET https://dashboard.pullbay.com/api/google-maps/place/search

Authorization: Bearer YOUR_API_KEY
```

### Basic Competitor Search

```python
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://dashboard.pullbay.com/api"

headers = {
    "Authorization": f"Bearer {API_KEY}"
}

params = {
    "query": "flower shop in istanbul",
    "countryCode": "tr",
    "languageCode": "en",
    "maxItems": 50
}

response = requests.get(
    f"{BASE_URL}/google-maps/place/search",
    headers=headers,
    params=params
)

response.raise_for_status()
data = response.json()
competitors = data.get("data", [])

for place in competitors:
    print({
        "name": place.get("title"),
        "address": place.get("address"),
        "rating": place.get("totalScore"),
        "reviews": place.get("reviewsCount"),
        "website": place.get("website"),
        "phone": place.get("phone"),
        "categories": place.get("categories"),
        "fid": place.get("fid"),
        "maps_url": place.get("url")
    })
```

### Search Multiple Categories or Areas

For broader competitor research, loop through multiple search queries.

```python
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://dashboard.pullbay.com/api"

headers = {
    "Authorization": f"Bearer {API_KEY}"
}

queries = [
    "flower shop in istanbul",
    "online flower delivery istanbul",
    "florist in kadikoy",
    "florist in besiktas"
]

seen_fids = set()
competitors = []

for query in queries:
    params = {
        "query": query,
        "countryCode": "tr",
        "languageCode": "en",
        "maxItems": 50
    }

    response = requests.get(
        f"{BASE_URL}/google-maps/place/search",
        headers=headers,
        params=params
    )

    response.raise_for_status()
    data = response.json()

    for place in data.get("data", []):
        fid = place.get("fid")
        if fid and fid not in seen_fids:
            seen_fids.add(fid)
            competitors.append({
                "query": query,
                "title": place.get("title"),
                "address": place.get("address"),
                "city": place.get("city"),
                "rating": place.get("totalScore"),
                "reviews": place.get("reviewsCount"),
                "website": place.get("website"),
                "phone": place.get("phone"),
                "categories": place.get("categories"),
                "fid": fid,
                "url": place.get("url")
            })

print(f"Unique competitors found: {len(competitors)}")
```

#### When to use this

Use this approach when you want to map competitors across multiple search terms, neighborhoods, or service categories.

### Optional: Bias Competitor Search Toward a Map Viewport

If your research is focused on a specific map area, use latitude, longitude, and zoom.

```python
params = {
    "query": "dentist",
    "countryCode": "us",
    "languageCode": "en",
    "latitude": "40.730610",
    "longitude": "-73.935242",
    "zoom": "13",
    "maxItems": 100
}
```

These parameters bias the search toward the provided viewport.

### Save Competitor Results to CSV

```python
import csv

with open("google_maps_competitors.csv", "w", newline="", encoding="utf-8") as file:
    writer = csv.DictWriter(
        file,
        fieldnames=[
            "query",
            "title",
            "address",
            "city",
            "rating",
            "reviews",
            "website",
            "phone",
            "categories",
            "fid",
            "url"
        ]
    )

    writer.writeheader()

    for competitor in competitors:
        row = competitor.copy()
        row["categories"] = ", ".join(row.get("categories") or [])
        writer.writerow(row)

print("Saved competitors to google_maps_competitors.csv")
```

### What to Compare

Once you have competitor data, you can compare:

| Field        | Why It Matters                                      |
| ------------ | --------------------------------------------------- |
| totalScore   | Shows average customer rating                       |
| reviewsCount | Shows review volume                                 |
| categories   | Shows how the business is categorized               |
| website      | Helps identify businesses with or without a website |
| phone        | Useful for lead enrichment or contact research      |
| address      | Useful for local market mapping                     |
| location     | Useful for plotting places on your own map          |
| openingHours | Useful for comparing availability                   |

### Important Identifier Rules

Pullbay’s Google Maps endpoints use different identifiers:

* Use `fid` to fetch full place details with `/google-maps/place/{fid}`
* Use `url` as `placeUrl` to fetch reviews with `/google-maps/place/reviews`

Do not pass an FID to the reviews endpoint. Reviews require the full Google Maps place URL.

### Credit Considerations

Every response includes:

```
pricing.creditsCharged
```

Credit cost is dynamic. Store this value if you want to track usage per query.

### Troubleshooting

| Problem                  | Possible Cause                                          | Fix                                     |
| ------------------------ | ------------------------------------------------------- | --------------------------------------- |
| Duplicate businesses     | Same place appears across multiple queries              | Deduplicate with fid or placeId         |
| Missing website or phone | Field may be unavailable for that place                 | Treat nullable fields as optional       |
| 400 Bad request          | Invalid parameter or incompatible pagination parameters | Do not use offset and maxItems together |
| 402 Insufficient credits | Not enough Pullbay credits                              | Check account credits                   |
| 404 Not found            | Place or review set not found                           | Try another query or place URL          |

### Next Steps

After building your local competitor list, you can:

* Fetch full place details by fid
* Fetch customer reviews using each place’s Google Maps url
* Store competitors in SQLite, Postgres, BigQuery, or your BI workflow
* Repeat the same queries over time to monitor changes


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pullbay.com/documentation/guides/how-to-guides-for-google-maps/how-to-find-local-competitors-on-google-maps.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
