# Google API

> Returns Google search autocomplete suggestions, Google News articles and daily trending searches by country.

Category: Search & Knowledge. Region: global. 4 endpoints at `https://api.hoshime.com/v1/google/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/google
## GET /v1/google/autocomplete

Search suggestions Google shows for the start of a query.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | The start of a search. (e.g. weather) |
| `lang` | string | no | Interface language, such as en or de. (default en) |
| `gl` | string | no | Country code, such as US or DE. (default US) |
| `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: `text` (string)

```bash
curl "https://api.hoshime.com/v1/google/autocomplete?query=weather" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/google/news

Google News articles for a search, or the top headlines when no query is given. Up to 100 per call.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | no | Search terms. Omit it for the top headlines. |
| `lang` | string | no | Interface language, such as en-US or de-DE. (default en-US) |
| `gl` | string | no | Country code, such as US or DE. (default US) |
| `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: `publishedAt` (string), `source` (string), `sourceUrl` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/google/news" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/google/newsTopic

Google News articles of one section, such as TECHNOLOGY or SPORTS, newest first. Up to 100 per call.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `topic` | string | yes | Section: WORLD, NATION, BUSINESS, TECHNOLOGY, ENTERTAINMENT, SCIENCE, SPORTS or HEALTH. (one of WORLD, NATION, BUSINESS, TECHNOLOGY, ENTERTAINMENT, SCIENCE, SPORTS, HEALTH; e.g. TECHNOLOGY) |
| `lang` | string | no | Interface language, such as en-US or de-DE. (default en-US) |
| `gl` | string | no | Country code, such as US or DE. (default US) |
| `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: `publishedAt` (string), `source` (string), `sourceUrl` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/google/newsTopic?topic=TECHNOLOGY" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/google/trends

Daily trending searches of one country, with their traffic and the news behind them.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `geo` | string | no | Country code, such as US or DE. (default US) |
| `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: `news` (TrendNews[]), `news[].source` (string), `news[].title` (string), `news[].url` (string), `publishedAt` (string), `query` (string), `traffic` (integer (int64)), `trafficText` (string)

```bash
curl "https://api.hoshime.com/v1/google/trends" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
