# Google Maps Search API

> Search places on Google Maps by keyword around a location, with name, rating, reviews, address, hours, phone, website, GPS coordinates and place IDs.

Source: https://www.sandbase.ai/apis/google-maps/search
API reference: https://www.sandbase.ai/apis/google-maps/search#api

## Facts

- Provider: Google Maps
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/google-maps/search`
- Price: $0.01 per call
- Capabilities: api, google maps, maps, local
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/google-maps/search` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `type` | string | yes |  |
| `q` | string | no |  |
| `ll` | string | no |  |
| `location` | string | no |  |
| `lat` | string | no |  |
| `lon` | string | no |  |
| `z` | string | no |  |
| `m` | string | no |  |
| `nearby` | string | no |  |
| `google_domain` | string | no |  |
| `hl` | string | no |  |
| `gl` | string | no |  |
| `data` | string | no |  |
| `place_id` | string | no |  |
| `data_cid` | string | no |  |
| `min_price` | string | no |  |
| `max_price` | string | no |  |
| `min_rating` | string | no | 2.0, 2.5, 3.0, 3.5, 4.0, 4.5 |
| `open_state` | string | no | now, 24h |
| `open_on_day` | string | no | mon, tue, wed, thu, fri, sat, sun |
| `open_at_hour` | string | no | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 |
| `start` | string | no |  |
| `json_restrictor` | string | no |  |

## FAQ

### How do I use the Google Maps Search API?

Send a POST request to https://api.sandbase.ai/v1/api/google-maps/search with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Google Maps Search API cost?

$0.01 per call, billed from your SandBase balance. You are only charged for calls you make; there is no subscription.

### What parameters does the Google Maps Search API accept?

Required: type (string). Optional: q (string), ll (string), location (string), lat (string), lon (string) and z (string) and 16 more. The Parameters table and the Playground on this page list every field.

### What does the Google Maps Search API return?

A JSON response returned in the same HTTP request (synchronous).

### Do I need a Google Maps developer account or API key?

No. Google Maps Search runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Google Maps API access separately.

## README

### Google Maps Search

Search places on Google Maps by keyword around a location, with name, rating, reviews, address, hours, phone, website, GPS coordinates and place IDs.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/api/google-maps/search" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q": "coffee", "type": "search", "ll": "@30.2672,-97.7431,14z"}'
```

The result is returned in `outputs[0].data` as structured JSON.

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `type` | string | Yes | Parameter defines the type of search you want to make. It can be set to: `search` - returns a list of results for the set `q` parameter, `place` - returns results for a specific place when `data` parameter is set Parameter is not required w |
| `q` | string | No | Parameter defines the query you want to search. You can use anything that you would use in a regular Google Maps search. The parameter is only required if `type` is set to `search`. |
| `ll` | string | No | Parameter defines the GPS coordinates for the search origin. Its value must match the following format: `@` + `latitude` + `,` + `longitude` + `,` + `zoom/map_height` This will form a string that looks like: `@40.7455096,-74.0083012,14z` or |
| `location` | string | No | Parameter defines the location, whose GPS coordinates are used for the search origin. At the end, coordinates are encoded as part of the `ll` parameter. Parameter should be used with `z` or `m` parameter. Parameter can't be used with `ll`,  |
| `lat` | string | No | Parameter defines a GPS latitude for the search origin. At the end, it is encoded as part of the `ll` parameter. Parameter is required when using `lon` parameter. Parameter should be used with `z` or `m` parameter. Parameter can't be used w |
| `lon` | string | No | Parameter defines a GPS longitude for the search origin. At the end, it is encoded as part of the `ll` parameter. Parameter is required when using `lat` parameter. Parameter should be used with `z` or `m` parameter. Parameter can't be used  |
| `z` | string | No | Parameter defines a map zoom level. The minimum value is `3` (the map is completely zoomed out). The maximum effective value depends on the location, ranging from `18` to `23`. Some locations may support even higher values, so we allow valu |
| `m` | string | No | Parameter defines a map height in meters. The minimum value is `1`. The maximum value is `15028132`, which roughly equals `3z` on the equator. At the end, it is encoded as part of the `ll` parameter. Either `m` or `z` is required when using |
| `nearby` | string | No | Parameter forces to return search results closer to the specified location. Parameter is highly recommended when `q` parameter includes `near me` keywords. Parameter is not recommended when `q` parameter includes location. Parameter should  |
| `google_domain` | string | No | Parameter defines the Google domain to use. It defaults to `google.com`. Head to the Google domains page for a full list of supported Google domains. |
| `hl` | string | No | Parameter defines the language to use for the Google Maps search. It's a two or three-letter language code. (e.g., `en` for English, `es` for Spanish, or `fr` for French), optionally followed by a two-letter or three-digit region code (e.g. |
| `gl` | string | No | Parameter defines the country to use for the Google Maps search. It's a two-letter country code. (e.g., `us` for the United States, `uk` for United Kingdom, or `fr` for France). Head to the Google countries page for a full list of supported |
| `data` | string | No | This parameter is deprecated, please use `place_id` or `data_cid` instead. Parameter can be used to filter the search results. You can visit Google Maps website, set filters you want and simply copy the `data` value from their URL to the AP |
| `place_id` | string | No | Parameter defines the unique reference to a place in Google Maps. Place IDs are available for most locations, including businesses, landmarks, parks, and intersections. You can find the `place_id` using our Google Maps API. You can read mor |
| `data_cid` | string | No | Parameter defines the Google CID (customer identifier) of a place. This parameter can be found in Google Maps API local results, as well as in Google Search API and Google Local API local results under the name of `place_id`. You can also a |
| `min_price` | string | No | Parameter defines the lower bound of the place price range. The places with the price range overlapping with the specified one will be returned. Parameter is applicable to searches expected to return places with numerical `price` data (e.g. |
| `max_price` | string | No | Parameter defines the upper bound of the place price range. The places with the price range overlapping with the specified one will be returned. Parameter is applicable to searches expected to return places with numerical `price` data (e.g. |
| `min_rating` | string | No | Parameter defines the preferred minimum rating of the place. Places without a rating or with a rating below the specified value can still be returned, but with reduced relevance. Options: `2.0` - 2.0 `2.5` - 2.5 `3.0` - 3.0 `3.5` - 3.5 `4.0 |
| `open_state` | string | No | Parameter defines the open state of the place. Options: `now` - Open now `24h` - Open 24 hours Parameter can't be used with `open_on_day` or `open_at_hour` parameters. |
| `open_on_day` | string | No | Parameter defines the day on which the place is open. Options: `mon` - Monday `tue` - Tuesday `wed` - Wednesday `thu` - Thursday `fri` - Friday `sat` - Saturday `sun` - Sunday Parameter can't be used with `open_state` parameter. |
| `open_at_hour` | string | No | Parameter defines the hour at which the place is open. Options: `0` - Midnight `1` - 1:00 AM `2` - 2:00 AM `3` - 3:00 AM `4` - 4:00 AM `5` - 5:00 AM `6` - 6:00 AM `7` - 7:00 AM `8` - 8:00 AM `9` - 9:00 AM `10` - 10:00 AM `11` - 11:00 AM `12 |
| `start` | string | No | Parameter defines the result offset. It skips the given number of results. It's used for pagination. (e.g., `0` (default) is the first page of results, `20` is the 2nd page of results, `40` is the 3rd page of results, etc.). We recommend st |
| `json_restrictor` | string | No | Parameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details. |

#### Pricing

$0.010 per successful call. Failed calls are not charged.
