# Google Maps API

> Returns Google Maps places for a search or by id, with address, phone, website, rating, category, opening hours and coordinates, and a place's reviews with photos and the owner's replies.

Category: Travel, Maps & Weather. Region: global. 3 endpoints at `https://api.hoshime.com/v1/googlemaps/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/googlemaps
## GET /v1/googlemaps/search

Places on Google Maps that match a search, such as coffee in Jakarta: name, address, phone, website, rating, category, opening hours and coordinates. Up to 20 per call; no further pages.

Scope: `social:read` · Units: 5 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | What to look for, such as coffee or hotel. (e.g. coffee jakarta) |
| `location` | string | no | Place to search in, such as Jakarta. Added to the query as "in <location>". |
| `lat` | string | no | Latitude of the point to search around, in decimal degrees. Give it with lng. |
| `lng` | string | no | Longitude of the point to search around, in decimal degrees. Give it with lat. |
| `limit` | integer | no | Items per page, 1 to 20. (default 10) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `address` (string), `categories` (string[]), `category` (string), `cid` (string), `description` (string), `hours` (Hours[]), `hours[].day` (string), `hours[].hours` (string), `id` (string), `latitude` (number (double)), `longitude` (number (double)), `name` (string), `phone` (string), `placeId` (string), `rating` (number (double)), `reviewCount` (integer (int64)), `timezone` (string), `url` (string), `website` (string)

```bash
curl "https://api.hoshime.com/v1/googlemaps/search?query=coffee+jakarta" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/googlemaps/place

One place on Google Maps by id: name, address, phone, website, rating, review count, category, opening hours and coordinates. The id is the 0x…:0x… of a search result, a numeric cid, or a Google Maps place URL.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Place id as 0x…:0x… (from search), a numeric cid, or a Google Maps place URL. (e.g. 0x2e69f5d2e764b12d:0x3d2ad6e1e0e9bcc8) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `address` (string), `categories` (string[]), `category` (string), `cid` (string), `description` (string), `hours` (Hours[]), `hours[].day` (string), `hours[].hours` (string), `id` (string), `latitude` (number (double)), `longitude` (number (double)), `name` (string), `phone` (string), `placeId` (string), `rating` (number (double)), `reviewCount` (integer (int64)), `timezone` (string), `url` (string), `website` (string)

```bash
curl "https://api.hoshime.com/v1/googlemaps/place?id=0x2e69f5d2e764b12d%3A0x3d2ad6e1e0e9bcc8" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/googlemaps/reviews

Reviews of one place on Google Maps, with the rating, text, photos and the owner's reply, newest or most relevant first.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Place id as 0x…:0x… (from search), a numeric cid, or a Google Maps place URL. (e.g. 0x2e69f5d2e764b12d:0x3d2ad6e1e0e9bcc8) |
| `sort` | string | no | Order of the reviews. Keep it the same across pages. (one of newest, relevant, highest, lowest; default newest) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `limit` | integer | no | Items per page, 1 to 20. (default 10) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (ReviewAuthor), `author.avatarUrl` (string), `author.id` (string), `author.localGuide` (boolean), `author.name` (string), `author.photoCount` (integer (int64)), `author.reviewCount` (integer (int64)), `author.url` (string), `author.username` (string), `createdAt` (string), `edited` (boolean), `id` (string), `language` (string), `ownerReply` (OwnerReply | null), `ownerReply.publishedText` (string), `ownerReply.text` (string), `photos` (Image[]), `photos[].height` (any), `photos[].url` (string), `photos[].width` (any), `rating` (integer (int64)), `text` (string), `translatedText` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/googlemaps/reviews?id=0x2e69f5d2e764b12d%3A0x3d2ad6e1e0e9bcc8" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
