drive.files.download
Downloads a Google Drive file by ID, letting you retrieve file content or export Workspace documents with an optional MIME type and revision.
Instructions
Downloads the content of a file. For more information, see Download and export files. Operations are valid for 24 hours from the time of creation [HTTP POST] — creates or triggers a change; refused under --readonly safety profiles. Returns the API's response resource as JSON — request bodies are built from the typed parameters (typed flags win over the params map), or read whole from body_file Siblings over the same resource: copy, create, delete, emptyTrash, export, generateCseToken, generateIds, get, list, listLabels, modifyLabels, update, watch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Extra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe. | |
| fileId | Yes | [URL path segment] Required. The ID of the file to download. | |
| params | No | Parameter map merged into the request; typed parameters win. | |
| dry_run | No | Return the request that would be sent, without sending it. | |
| mimeType | No | [query parameter] Optional. The MIME type the file should be downloaded as. This field can only be set when downloading Google Workspace documents. For a list of supported MIME t | |
| body_file | No | Read the request body from this file ('-' for stdin) instead of building one from the parameters. | |
| revisionId | No | [query parameter] Optional. The revision ID of the file to download. This field can only be set when downloading blob files, Google Docs, and Google Sheets. Returns `INVALID_ARGU |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| done | No | ||
| name | No | ||
| error | No | ||
| metadata | No | ||
| response | No |