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

# Google Maps Platform

> Places search and details (Places API New), forward and reverse geocoding, and Street View coverage lookups.

![](https://mintcdn.com/webrouter/gPu3tCeozwRcDBjt/logo/data-apis/google-maps.webp?fit=max\&auto=format\&n=gPu3tCeozwRcDBjt\&q=85\&s=51de0446832b557266e8194321a2cc9c)

[Web Catalog · Maps](https://docs.webrouter.net/data-apis.md?category=maps)

Needs&#x20;

`GOOGLE_MAPS_API_KEY`

Endpoints

6

Auth

Key in query

[Vendor docs](https://developers.google.com/maps/documentation)

&#x20;·&#x20;

[Pricing](https://developers.google.com/maps/billing-and-pricing/pricing)

## Setup

| Variable | | What it is |
| - | - | - |
| `GOOGLE_MAPS_API_KEY` | required | a Google Maps Platform API key from a Cloud project with billing and the Places API (New), Geocoding API and Street View Static API enabled (Google Cloud console > Google Maps Platform > Keys & Credentials) |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* Billed per request by SKU, on a Cloud project with billing enabled; Places calls are billed by the most expensive field in the mask, so keep field masks short.
* Places (New) calls need a field mask (the fields parameter); without one they fail.
* Geocoding and Street View metadata answer HTTP 200 with a status field; read it.

## Endpoints

POST

Search places by text

Places matching a text query such as 'pizza in New York', with the fields you ask for.

[Open](#google-maps-places-text-search)

POST

Search places near a point

Places of given types within a circle, ranked by popularity or distance.

[Open](#google-maps-places-nearby-search)

GET

Get place details

One place by place id: name, address, location, hours, rating, website and any field in the mask.

[Open](#google-maps-places-details)

GET

Geocode an address

Coordinates, place id and structured address components for an address.

[Open](#google-maps-geocode-forward)

GET

Reverse geocode coordinates

Addresses for a latitude/longitude, most precise first.

[Open](#google-maps-geocode-reverse)

GET

Check Street View coverage

Whether a Street View panorama exists near a place, with its id, date and exact location. Free.

[Open](#google-maps-streetview-metadata)

### Search places by text

POST

`/places:searchText`

`google-maps.places.text_search`

Places matching a text query such as 'pizza in New York', with the fields you ask for.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`fields` required</td><td>string</td><td>query</td><td>Field mask, comma-separated with no spaces; required, there is no default. It sets the billing SKU, so ask only for what you need. '\*' is all fields. Example `places.id,places.displayName,places.formattedAddress`</td></tr>
    <tr><td>`textQuery` required</td><td>string</td><td>body</td><td>The query. Example `vegetarian restaurants in Austin`</td></tr>

    <tr>
      <td>
        `includedType`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        One place type from Table A to restrict to.
      </td>
    </tr>

    <tr>
      <td>
        `strictTypeFiltering`
      </td>

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Only places of includedType.
      </td>
    </tr>

    <tr>
      <td>
        `pageSize`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        Results per page, 1 to 20; default 20.
      </td>
    </tr>

    <tr>
      <td>
        `pageToken`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        nextPageToken from the previous response; every other parameter must be the same.
      </td>
    </tr>

    <tr>
      <td>
        `locationBias`
      </td>

      <td>
        object
      </td>

      <td>
        body
      </td>

      <td>
        \{circle: \{center: \{latitude, longitude}, radius: metres up to 50000}} or \{rectangle: \{low, high}}. Not with locationRestriction.
      </td>
    </tr>

    <tr>
      <td>
        `locationRestriction`
      </td>

      <td>
        object
      </td>

      <td>
        body
      </td>

      <td>
        \{rectangle: \{low: \{latitude, longitude}, high: \{...}}}; results outside are dropped.
      </td>
    </tr>

    <tr>
      <td>
        `openNow`
      </td>

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Only places open now.
      </td>
    </tr>

    <tr>
      <td>
        `minRating`
      </td>

      <td>
        number
      </td>

      <td>
        body
      </td>

      <td>
        Minimum average rating, 0.0 to 5.0 in steps of 0.5.
      </td>
    </tr>

    <tr>
      <td>
        `priceLevels`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Price levels to include, e.g. \['PRICE\_LEVEL\_MODERATE'].
      </td>
    </tr>

    <tr><td>`rankPreference`</td><td>string</td><td>body</td><td>Result order. One of `RELEVANCE`, `DISTANCE`</td></tr>

    <tr>
      <td>
        `languageCode`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Response language; default en.
      </td>
    </tr>

    <tr>
      <td>
        `regionCode`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Two-character CLDR region code; affects formatting and biases results.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://developers.google.com/maps/documentation/places/web-service/text-search) · Same job: [Amap (Gaode) Web Service](https://docs.webrouter.net/data-apis/amap.md#amap-places-search), [Atly](https://docs.webrouter.net/data-apis/atly.md#atly-places-search), [Best Buy](https://docs.webrouter.net/data-apis/bestbuy.md#bestbuy-stores-search), [FDIC BankFind Suite](https://docs.webrouter.net/data-apis/fdic.md#fdic-locations-search), [Foursquare Places API](https://docs.webrouter.net/data-apis/foursquare.md#foursquare-places-search), [Geoapify](https://docs.webrouter.net/data-apis/geoapify.md#geoapify-places-search)

```python Python theme={null}
router.call_data_api("google-maps.places.text_search", {'fields': 'places.id,places.displayName,places.formattedAddress', 'textQuery': 'vegetarian restaurants in Austin'})
```

```text MCP theme={null}
call_data_api(endpoint="google-maps.places.text_search", params={"fields": "places.id,places.displayName,places.formattedAddress", "textQuery": "vegetarian restaurants in Austin"})
```

> [!NOTE]
>
> * A read over POST.
> * At most 20 results per page and 60 across all pages.
> * Put nextPageToken in fields to be able to page.

### Search places near a point

POST

`/places:searchNearby`

`google-maps.places.nearby_search`

Places of given types within a circle, ranked by popularity or distance.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`fields` required</td><td>string</td><td>query</td><td>Field mask, comma-separated with no spaces; required, there is no default. It sets the billing SKU, so ask only for what you need. '\*' is all fields. Example `places.id,places.displayName,places.location`</td></tr>
    <tr><td>`locationRestriction` required</td><td>object</td><td>body</td><td>\{circle: \{center: \{latitude, longitude}, radius: metres, above 0 and at most 50000}}. Example `{"circle": {"center": {"latitude": 37.7937, "longitude": -122.3965}, "radius": 500.0}}`</td></tr>
    <tr><td>`includedTypes`</td><td>array</td><td>body</td><td>Table A place types to include, up to 50. Example `["restaurant"]`</td></tr>

    <tr>
      <td>
        `excludedTypes`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Table A place types to exclude, up to 50.
      </td>
    </tr>

    <tr>
      <td>
        `includedPrimaryTypes`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Primary types to include, up to 50.
      </td>
    </tr>

    <tr>
      <td>
        `excludedPrimaryTypes`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Primary types to exclude, up to 50.
      </td>
    </tr>

    <tr>
      <td>
        `maxResultCount`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        1 to 20; default 20.
      </td>
    </tr>

    <tr><td>`rankPreference`</td><td>string</td><td>body</td><td>Default POPULARITY. One of `POPULARITY`, `DISTANCE`</td></tr>

    <tr>
      <td>
        `languageCode`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Response language; default en.
      </td>
    </tr>

    <tr>
      <td>
        `regionCode`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Two-character CLDR region code; affects formatting and biases results.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://developers.google.com/maps/documentation/places/web-service/nearby-search) · Same job: [Amap (Gaode) Web Service](https://docs.webrouter.net/data-apis/amap.md#amap-places-search), [Atly](https://docs.webrouter.net/data-apis/atly.md#atly-places-search), [Best Buy](https://docs.webrouter.net/data-apis/bestbuy.md#bestbuy-stores-search), [FDIC BankFind Suite](https://docs.webrouter.net/data-apis/fdic.md#fdic-locations-search), [Foursquare Places API](https://docs.webrouter.net/data-apis/foursquare.md#foursquare-places-search), [Geoapify](https://docs.webrouter.net/data-apis/geoapify.md#geoapify-places-search)

```python Python theme={null}
router.call_data_api("google-maps.places.nearby_search", {'fields': 'places.id,places.displayName,places.location', 'locationRestriction': {'circle': {'center': {'latitude': 37.7937, 'longitude': -122.3965}, 'radius': 500.0}}, 'includedTypes': ['restaurant']})
```

```text MCP theme={null}
call_data_api(endpoint="google-maps.places.nearby_search", params={"fields": "places.id,places.displayName,places.location", "locationRestriction": {"circle": {"center": {"latitude": 37.7937, "longitude": -122.3965}, "radius": 500.0}}, "includedTypes": ["restaurant"]})
```

> [!NOTE]
>
> * A read over POST. No paging: at most 20 results.

### Get place details

GET

`/places/{place_id}`

`google-maps.places.details`

One place by place id: name, address, location, hours, rating, website and any field in the mask.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`place_id` required</td><td>string</td><td>path</td><td>The bare place id (not 'places/...'). Example `ChIJj61dQgK6j4AR4GeTYWZsKWw`</td></tr>
    <tr><td>`fields` required</td><td>string</td><td>query</td><td>Field mask, comma-separated with no spaces; required, there is no default. It sets the billing SKU, so ask only for what you need. '\*' is all fields. Example `id,displayName,formattedAddress,rating,websiteUri`</td></tr>

    <tr>
      <td>
        `languageCode`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Response language; default en.
      </td>
    </tr>

    <tr>
      <td>
        `regionCode`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Two-character CLDR region code.
      </td>
    </tr>

    <tr>
      <td>
        `sessionToken`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        The autocomplete session token this details call closes, for session billing.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://developers.google.com/maps/documentation/places/web-service/place-details) · Same job: [Atly](https://docs.webrouter.net/data-apis/atly.md#atly-places-get), [Foursquare Places API](https://docs.webrouter.net/data-apis/foursquare.md#foursquare-places-get), [Geoapify](https://docs.webrouter.net/data-apis/geoapify.md#geoapify-places-details), [HERE](https://docs.webrouter.net/data-apis/here-maps.md#here-maps-lookup), [Whitepages Pro](https://docs.webrouter.net/data-apis/whitepages.md#whitepages-property-owners), [Yelp Fusion](https://docs.webrouter.net/data-apis/yelp.md#yelp-businesses-get)

```python Python theme={null}
router.call_data_api("google-maps.places.details", {'place_id': 'ChIJj61dQgK6j4AR4GeTYWZsKWw', 'fields': 'id,displayName,formattedAddress,rating,websiteUri'})
```

```text MCP theme={null}
call_data_api(endpoint="google-maps.places.details", params={"place_id": "ChIJj61dQgK6j4AR4GeTYWZsKWw", "fields": "id,displayName,formattedAddress,rating,websiteUri"})
```

> [!NOTE]
>
> * Reviews are a field of the details response (reviews), billed at the Enterprise + Atmosphere SKU.

### Geocode an address

GET

`/geocode/json`

`google-maps.geocode.forward`

Coordinates, place id and structured address components for an address.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`address`</td><td>string</td><td>query</td><td>The address to geocode; this or components is required. Example `1600 Amphitheatre Parkway, Mountain View, CA`</td></tr>

    <tr>
      <td>
        `components`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Pipe-separated component:value filters that restrict results, e.g. 'country:GB|postal\_code:SW1A'.
      </td>
    </tr>

    <tr>
      <td>
        `bounds`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Viewport to bias toward, 'swLat,swLng|neLat,neLng'.
      </td>
    </tr>

    <tr>
      <td>
        `language`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Response language.
      </td>
    </tr>

    <tr>
      <td>
        `region`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        ccTLD-style region code to bias results.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://developers.google.com/maps/documentation/geocoding/requests-geocoding) · Same job: [Amap (Gaode) Web Service](https://docs.webrouter.net/data-apis/amap.md#amap-geocode), [API Ninjas](https://docs.webrouter.net/data-apis/apininjas.md#apininjas-geocode), [Geoapify](https://docs.webrouter.net/data-apis/geoapify.md#geoapify-geocode-search), [GraphHopper Directions API](https://docs.webrouter.net/data-apis/graphhopper.md#graphhopper-geocode-forward), [HERE](https://docs.webrouter.net/data-apis/here-maps.md#here-maps-geocode), [OpenCage Geocoding](https://docs.webrouter.net/data-apis/opencage.md#opencage-geocode-forward)

```python Python theme={null}
router.call_data_api("google-maps.geocode.forward", {'address': '1600 Amphitheatre Parkway, Mountain View, CA'})
```

```text MCP theme={null}
call_data_api(endpoint="google-maps.geocode.forward", params={"address": "1600 Amphitheatre Parkway, Mountain View, CA"})
```

> [!NOTE]
>
> * Errors come back as HTTP 200 with a status field: check status is OK (ZERO\_RESULTS, OVER\_QUERY\_LIMIT, REQUEST\_DENIED, INVALID\_REQUEST).

### Reverse geocode coordinates

GET

`/geocode/json`

`google-maps.geocode.reverse`

Addresses for a latitude/longitude, most precise first.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`latlng` required</td><td>string</td><td>query</td><td>'lat,lng' with no space. Example `40.714224,-73.961452`</td></tr>

    <tr>
      <td>
        `result_type`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Pipe-separated address types to keep, e.g. 'street\_address|locality'. A post-filter.
      </td>
    </tr>

    <tr>
      <td>
        `location_type`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Pipe-separated: ROOFTOP, RANGE\_INTERPOLATED, GEOMETRIC\_CENTER, APPROXIMATE. A post-filter.
      </td>
    </tr>

    <tr>
      <td>
        `language`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Response language.
      </td>
    </tr>

    <tr>
      <td>
        `region`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        ccTLD region code.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://developers.google.com/maps/documentation/geocoding/requests-reverse-geocoding) · Same job: [Geoapify](https://docs.webrouter.net/data-apis/geoapify.md#geoapify-geocode-reverse), [GraphHopper Directions API](https://docs.webrouter.net/data-apis/graphhopper.md#graphhopper-geocode-reverse), [HERE](https://docs.webrouter.net/data-apis/here-maps.md#here-maps-revgeocode), [OpenCage Geocoding](https://docs.webrouter.net/data-apis/opencage.md#opencage-geocode-reverse), [TomTom](https://docs.webrouter.net/data-apis/tomtom.md#tomtom-geocode-reverse)

```python Python theme={null}
router.call_data_api("google-maps.geocode.reverse", {'latlng': '40.714224,-73.961452'})
```

```text MCP theme={null}
call_data_api(endpoint="google-maps.geocode.reverse", params={"latlng": "40.714224,-73.961452"})
```

### Check Street View coverage

GET

`/streetview/metadata`

`google-maps.streetview.metadata`

Whether a Street View panorama exists near a place, with its id, date and exact location. Free.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`location`</td><td>string</td><td>query</td><td>An address, 'lat,lng' or 'place\_id:\<id>'. This or pano is required. Example `40.457375,-80.009353`</td></tr>

    <tr>
      <td>
        `pano`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        A panorama id.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://developers.google.com/maps/documentation/streetview/metadata)

```python Python theme={null}
router.call_data_api("google-maps.streetview.metadata", {'location': '40.457375,-80.009353'})
```

```text MCP theme={null}
call_data_api(endpoint="google-maps.streetview.metadata", params={"location": "40.457375,-80.009353"})
```

> [!NOTE]
>
> * No charge and no quota for metadata; only loading the image is billed. The image itself is the Street View Static API (binary JPEG), not in this entry.


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