Google Files API

Operations related to 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 12

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 /files List the user's files · Google Get Files #
Ask an LLM
“How do I list all the files in my Google Drive?”
“Can I search my Drive files with a query like name or type?”
Tell an agent
List all my files.
Find files matching {q}.
POST /files Create a new file · Google Post Files #
Ask an LLM
“How do I upload a new file to Google Drive?”
“Can I create a shortcut to a folder in Drive?”
Tell an agent
Create a file named {name} in folder {parents}.
Create a shortcut to {shortcutDetails} called {name}.
GET /files/generateIds Generate file IDs for new files · Google Get Files Generateids #
Ask an LLM
“Can I get a batch of new file IDs before creating files?”
“What space and type do generated file IDs work in?”
Tell an agent
Generate {count} file IDs in {space}.
Generate {count} {type} IDs in {space}.
DELETE /files/trash Permanently empty the trash · Google Delete Files Trash #
Ask an LLM
“How do I permanently delete every file in my trash?”
“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}.
GET /files/{fileId} Get a file's metadata or content · Google Get Files Fileid #
Ask an LLM
“How do I download the content of a file by its ID?”
“Can I get the metadata of one file in Drive?”
Tell an agent
Get file {fileId}.
Download the content of file {fileId}.
PATCH /files/{fileId} Update a file's metadata or content · Google Patch Files Fileid #
Ask an LLM
“How do I rename a file or change its description in Drive?”
“Can I move a file to a different folder by patching it?”
Tell an agent
Rename file {fileId} to {name}.
Move file {fileId} to folder {parents}.
DELETE /files/{fileId} Permanently delete a file · Google Delete Files Fileid #
Ask an LLM
“How do I permanently delete a file from my Drive without moving it to trash?”
“What happens to a folder's children when I delete the folder?”
Tell an agent destructive · confirm first
Permanently delete file {fileId}.
Delete folder {fileId} and all its owned descendants.
POST /files/{fileId}/copy Copy a file · Google Post Files Fileid Copy #
Ask an LLM
“How do I make a copy of a document?”
“Can I copy a file into a specific folder and keep its revision history?”
Tell an agent
Copy file {fileId} to folder {parents}.
Make a copy of {fileId} named {name}.
GET /files/{fileId}/export Export a document to a format · Google Get Files Fileid Export #
Ask an LLM
“How do I download a Google Docs file as a PDF?”
“Is there a size limit on exported document content?”
Tell an agent
Export file {fileId} as {mimeType}.
Download the document {fileId} in {mimeType} format.
GET /files/{fileId}/listLabels List labels on a file · Google Get Files Fileid Listlabels #
Ask an LLM
“Which labels are applied to a file?”
“Can I page through the labels on a file?”
Tell an agent
List the labels on file {fileId}.
Show up to {maxResults} labels on {fileId}.
POST /files/{fileId}/modifyLabels Add or change labels on a file · Google Post Files Fileid Modifylabels #
Ask an LLM
“How do I tag a file with a new label?”
“Can I change several labels on a file in one call?”
Tell an agent
Apply label changes {labelModifications} to file {fileId}.
Label file {fileId} with {labelModifications}.
POST /files/{fileId}/watch Subscribe to changes on a file · Google Post Files Fileid Watch #
Ask an LLM
“How do I get notified when a file changes?”
“Can I watch a file and include its labels in the change notifications?”
Tell an agent
Watch file {fileId} for changes and notify {address}.
Subscribe to changes on file {fileId} with label info {includeLabels}.

Documentation

Specifications

Schemas & Data

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:google-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-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Google Drive Files API
  description: The Google Drive API allows clients to access resources from Google Drive.
  version: v3
  contact:
    name: Google
    url: https://google.com
    x-twitter: youtube
  license:
    name: Creative Commons Attribution 3.0
    url: http://creativecommons.org/licenses/by/3.0/
  termsOfService: https://developers.google.com/terms/
servers:
- url: https://www.googleapis.com/drive/v3
  description: Google Drive API Server
tags:


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