Google Drive Files API

The Files API from Google Drive — 11 operation(s) for files.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 14

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /drive/v3/files/{fileId}/export Export a Google Workspace document · Export files #
Ask an LLM
“How do I export a Google Docs, Sheets or Slides file to PDF or another format?”
“Is there a size limit on exported files?”
Tell an agent
Export file {file} as {mimeType}.
Download the exported content of document {file} in {mimeType} format.
POST /drive/v3/files Create a file · Create files #
Ask an LLM
“How do I upload a new file to Drive?”
“Can I create a file in a specific folder?”
Tell an agent
Create a file named {name}.
Create file {name} in folder {parent}.
GET /drive/v3/files List files · List files #
Ask an LLM
“How do I find files by name or type in Drive?”
“Can I search files across all my drives and shared drives?”
Tell an agent
List my files matching {q}.
Find files in shared drive {drive}.
GET /drive/v3/files/generateCseToken Generate a CSE token for a file · Generate cse token files #
Ask an LLM
“How do I generate a token to create a CSE file?”
“Can I generate a CSE token for a new file in a shared drive?”
Tell an agent
Generate a CSE token for file {file}.
Generate a CSE token for a new file under parent {parent}.
POST /drive/v3/files/{fileId}/watch Watch a file for changes · Watch files #
Ask an LLM
“How do I get notified when a file changes?”
“Can I watch a single file instead of my whole Drive?”
Tell an agent
Watch file {file} for changes.
Notify me at {address} when file {file} changes.
POST /drive/v3/files/{fileId}/modifyLabels Set or clear labels on a file · Modify labels files #
Ask an LLM
“How do I set a custom label on a file?”
“Can I clear a label from a file?”
Tell an agent
Set label modifications {mods} on file {file}.
Apply label changes {mods} to file {file}.
PATCH /drive/v3/files/{fileId} Update a file's metadata or content · Update files #
Ask an LLM
“How do I rename a file or change its description?”
“Can I move a file to a different folder by updating it?”
Tell an agent
Rename file {fileId} to {name}.
Move file {fileId} into folder {parents}.
DELETE /drive/v3/files/{fileId} Permanently delete a file · Delete files #
Ask an LLM
“How do I permanently delete a file instead of trashing it?”
“Does deleting a folder also delete its contents?”
Tell an agent destructive · confirm first
Permanently delete file {file}.
Delete file {file} without moving it to the trash.
GET /drive/v3/files/{fileId} Get a file's metadata or content · Get files #
Ask an LLM
“How do I download the content of a file by ID?”
“Can I fetch a file's metadata without downloading it?”
Tell an agent
Get file {file}.
Show the metadata of file {file}.
POST /drive/v3/files/{fileId}/download Download a file's content · Download files #
Ask an LLM
“How do I download the actual content of a file?”
“Can I download an older revision of a file?”
Tell an agent
Download the content of file {fileId}.
Download revision {revisionId} of file {fileId}.
GET /drive/v3/files/generateIds Generate file IDs for new files · Generate ids files #
Ask an LLM
“How do I get a new file ID before creating a file?”
“Can I generate IDs for shortcuts instead of files?”
Tell an agent
Generate {count} new file IDs.
Generate {count} shortcut IDs in the {space} space.
POST /drive/v3/files/{fileId}/copy Copy a file · Copy files #
Ask an LLM
“How do I make a copy of a file?”
“Can I copy a file into a different folder and keep its comments?”
Tell an agent
Copy file {fileId}.
Copy file {fileId} into folder {parents} and copy its comments.
GET /drive/v3/files/{fileId}/listLabels List labels on a file · List labels files #
Ask an LLM
“Which labels are applied to a file?”
“Can I see all the labels on one file?”
Tell an agent
List the labels on file {fileId}.
Show up to {maxResults} labels on file {fileId}.
DELETE /drive/v3/files/trash Empty the trash · Empty trash files #
Ask an LLM
“How do I permanently delete all trashed files?”
“Can I empty the trash of a shared drive?”
Tell an agent destructive · confirm first
Empty my trash.
Empty the trash of shared drive {driveId}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/google-drive:google-drive-files-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

google-drive-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Google Drive Files API
  version: v3
  description: Generated from Google's published Discovery document for Google Drive API (drive v3, revision 20261106). 14 operation(s).
  contact:
    name: Google
    url: https://developers.google.com/
  termsOfService: https://developers.google.com/terms
servers:
- url: https://www.googleapis.com
tags:


# --- truncated at 32 KB (100 KB total) ---
# Full source: https://artifacts.apis.io/google-drive/openapi/google-drive-files-api-openapi.yml