> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stophy.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Maps

> Read a Google Maps search page that names a place after in as JSON with the google-maps parser. $1 per 1,000 calls. Send the page to scrape.

Reads a Google Maps search page that names a place after in, near or around, and returns a list of places as JSON.

## Make a request

Send the page's URL to [scrape](https://docs.stophy.dev/api-reference/endpoint/scrape.md) with a `json` format that names the parser. This parser works without an API key when you send no options, up to 10 calls a minute and 50 calls a day per IP address. See [Rate limits](https://docs.stophy.dev/production/rate-limits.md). To lift the limits, get an API key in the [Quickstart](https://docs.stophy.dev/quickstart).

```bash cURL theme={null}
curl -X POST https://api.stophy.dev/v1/scrape \
  -H "Authorization: Bearer $STOPHY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.google.com/maps/search/dentists+in+Ljubljana","formats":[{"type":"json","parser":"google-maps"}]}'
```

```typescript TypeScript theme={null}
const response = await fetch("https://api.stophy.dev/v1/scrape", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.STOPHY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://www.google.com/maps/search/dentists+in+Ljubljana",
    formats: [{ type: "json", parser: "google-maps" }],
  }),
});
console.log(await response.json());
```

```python Python theme={null}
import os

import requests

response = requests.post(
    "https://api.stophy.dev/v1/scrape",
    headers={"Authorization": f"Bearer {os.environ['STOPHY_API_KEY']}"},
    json={
        "url": "https://www.google.com/maps/search/dentists+in+Ljubljana",
        "formats": [{"type": "json", "parser": "google-maps"}],
    },
)
print(response.json())
```

## Read the response

The parser's data is in `data.json`. Its fields include `results`, `cursor`, `page` and `total`. This sample is cut to the first items.

```json theme={null}
{
  "success": true,
  "data": {
    "json": {
      "results": [
        {
          "id": "0x47653296b2abdbc7:0x49588016d0bf3f31",
          "url": "https://www.google.com/maps?cid=5285114998199107377",
          "name": "OrthoDental",
          "categories": [
            "Dentist",
            "Dental clinic",
            "Dental implants periodontist"
          ],
          "address": "Vilharjeva cesta 42, 1000 Ljubljana, Slovenia",
          "location": {
            "latitude": 46.0595907,
            "longitude": 14.5190697
          },
          "phone": "+1 555 0100",
          "website": "https://orthodental.si/",
          "description": null,
          "rating": 4.9,
          "reviewCount": 845,
          "priceLevel": null,
          "hours": [
            {
              "days": "Thursday",
              "times": [
                "7 AM-8 PM"
              ]
            }
          ],
          "images": [
            "https://lh3.googleusercontent.com/grass-cs/AABkmLdBhaKXYHqK_5Aj1bnahBGOIT1sRrAAJnXe3Rmn96rrVp4oGovG0IIlCy2N9ZA74ppszS7_…"
          ],
          "googlePlaceId": "ChIJx9urspYyZUcRMT-_0BaAWEk",
          "photos": 57,
          "hoursToday": "7 AM-8 PM",
          "openStatus": "Closed · Opens 7 AM",
          "timezone": "Europe/Ljubljana",
          "reservationUrl": null,
          "attributes": [
            "Wheelchair accessible entrance",
            "Wheelchair accessible parking lot",
            "Wheelchair accessible restroom"
          ],
          "emails": [
            "name@example.com"
          ],
          "socials": [
            "https://www.facebook.com/1504012583193091"
          ],
          "brand": null,
          "filledFrom": {
            "overtureId": "d8e5202d-d84a-42fc-bed5-786cbdc35f81",
            "fields": [
              "emails",
              "socials"
            ],
            "datasets": [
              "Overture",
              "meta"
            ]
          }
        }
      ],
      "cursor": null,
      "page": 1,
      "total": null
    }
  }
}
```

## Options

Send options in the `options` object of the `json` format.

| Option | What it does |
| - | - |
| `openNow` | Google Maps' own Hours filter, Open now: only places open at the moment of the search. |
| `country` | ISO 3166-1 alpha-2 country code, e.g. us. Any case is accepted. |
| `language` | BCP 47 language tag, e.g. en or pt-BR. Any case is accepted. |
| `page` | Page number, starting at 1. |

It also takes `minRating`.

## Price

\$1 per 1,000 calls. Works without an API key, within the free limits. See [Pricing](https://docs.stophy.dev/account/pricing.md).

## Limits and errors

* The URL must be a Google Maps search page that names a place after in, near or around. Any other URL fails with `invalidRequest`.
* The answer comes back in `data.json`. If the page cannot be read, the call fails with an error code from [Errors](https://docs.stophy.dev/api-reference/errors.md).

## Related

* [Pre-built parsers](https://docs.stophy.dev/scrape/prebuilt-parsers) lists every parser.
* [Scrape](https://docs.stophy.dev/scrape/overview) has the options every scrape takes.
* [Google Maps place](https://docs.stophy.dev/scrape/prebuilt-parsers/places-and-travel/google-maps-place.md)
* [Google Maps reviews](https://docs.stophy.dev/scrape/prebuilt-parsers/places-and-travel/google-maps-reviews.md)
* [Google Patents](https://docs.stophy.dev/scrape/prebuilt-parsers/web/google-patents.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.