# Google Drive API

> Returns the name, view link and direct download link of a public Google Drive file from its share URL or id.

Category: Utilities. Region: global. 1 endpoint at `https://api.hoshime.com/v1/googledrive/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/googledrive
## GET /v1/googledrive/file

A public Google Drive file by its share URL or id: name, view link and direct download link.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes | Drive file URL (https://drive.google.com/file/d/<id>/view) or the file id. (e.g. https://drive.google.com/file/d/1CaJig7lPfOqKGtsv34jWophJ1Q1LLhJC/view) |
| `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: `downloadUrl` (string), `id` (string), `name` (string), `viewUrl` (string)

```bash
curl "https://api.hoshime.com/v1/googledrive/file?url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1CaJig7lPfOqKGtsv34jWophJ1Q1LLhJC%2Fview" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
