Google Colab Files API

Notebook file operations

Operations 6

GET /files Google Colab List Colab notebooks #
POST /files Google Colab Create a Colab notebook #
GET /files/{fileId} Google Colab Get notebook metadata #
PATCH /files/{fileId} Google Colab Update notebook metadata #
DELETE /files/{fileId} Google Colab Delete a notebook #
POST /files/{fileId}/copy Google Colab Copy a notebook #

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-colab-files-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

google-colab-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Google Colab Notebooks via Drive Files API
  description: Colab notebooks are stored as Google Drive files with the MIME type application/vnd.google.colaboratory. This API specification covers the Google Drive v3 endpoints commonly used to manage Colab notebooks, including listing, creating, updating, and sharing notebooks.
  version: v3
  contact:
    name: Google Developers
    url: https://developers.google.com/drive
  termsOfService: https://cloud.google.com/terms
servers:
- url: https://www.googleapis.com/drive/v3
  description: Google Drive API v3
security:
- oauth2: []
tags:
- name: Files
  description: Notebook file operations
paths:
  /files:
    get:
      operationId: listNotebooks
      summary: Google Colab List Colab notebooks
      description: Lists Colab notebooks in Google Drive. Use the q parameter with mimeType='application/vnd.google.colaboratory' to filter for notebook files.
      tags:
      - Files
      parameters:
      - name: q
        in: query
        description: Query string for filtering (e.g. mimeType filter for Colab files)
        schema:
          type: string
          default: mimeType='application/vnd.google.colaboratory'
      - name: pageSize
        in: query
        description: Maximum number of files to return
        schema:
          type: integer
          minimum: 1
          maximum: 1000
      - name: pageToken
        in: query
        description: Token for next page of results
        schema:
          type: string
      - name: fields
        in: query
        description: Fields to include in the response
        schema:
          type: string
      - name: orderBy
        in: query
        description: Sort order (e.g. modifiedTime desc)
        schema:
          type: string
      responses:
        '200':
          description: List of Colab notebook files
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileList'
        '401':
          description: Unauthorized
    post:
      operationId: createNotebook
      summary: Google Colab Create a Colab notebook
      description: Creates a new Colab notebook in Google Drive by uploading metadata with the Colab MIME type.
      tags:
      - Files
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/File'
      responses:
        '200':
          description: Notebook created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/File'
        '400':
          description: Invalid request
  /files/{fileId}:
    get:
      operationId: getNotebook
      summary: Google Colab Get notebook metadata
      description: Retrieves metadata for a Colab notebook file.
      tags:
      - Files
      parameters:
      - $ref: '#/components/parameters/fileId'
      - name: fields
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Notebook file metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/File'
        '404':
          description: File not found
    patch:
      operationId: updateNotebook
      summary: Google Colab Update notebook metadata
      description: Updates the metadata of a Colab notebook file.
      tags:
      - Files
      parameters:
      - $ref: '#/components/parameters/fileId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/File'
      responses:
        '200':
          description: Notebook updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/File'
    delete:
      operationId: deleteNotebook
      summary: Google Colab Delete a notebook
      description: Permanently deletes a Colab notebook file.
      tags:
      - Files
      parameters:
      - $ref: '#/components/parameters/fileId'
      responses:
        '204':
          description: Notebook deleted
        '404':
          description: File not found
  /files/{fileId}/copy:
    post:
      operationId: copyNotebook
      summary: Google Colab Copy a notebook
      description: Creates a copy of a Colab notebook, useful for templating workflows.
      tags:
      - Files
      parameters:
      - $ref: '#/components/parameters/fileId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/File'
      responses:
        '200':
          description: Notebook copied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/File'
components:
  schemas:
    FileList:
      type: object
      properties:
        files:
          type: array
          items:
            $ref: '#/components/schemas/File'
        nextPageToken:
          type: string
        kind:
          type: string
          default: drive#fileList
    File:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
          description: The notebook file name
        mimeType:
          type: string
          description: MIME type (application/vnd.google.colaboratory for Colab notebooks)
          default: application/vnd.google.colaboratory
        description:
          type: string
        parents:
          type: array
          items:
            type: string
          description: Parent folder IDs
        createdTime:
          type: string
          format: date-time
          readOnly: true
        modifiedTime:
          type: string
          format: date-time
          readOnly: true
        owners:
          type: array
          readOnly: true
          items:
            type: object
            properties:
              displayName:
                type: string
              emailAddress:
                type: string
        webViewLink:
          type: string
          format: uri
          readOnly: true
        starred:
          type: boolean
        trashed:
          type: boolean
  parameters:
    fileId:
      name: fileId
      in: path
      required: true
      description: The ID of the notebook file
      schema:
        type: string
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/drive: Full Drive access
            https://www.googleapis.com/auth/drive.file: Per-file access
externalDocs:
  description: Google Drive API Reference
  url: https://developers.google.com/drive/api/reference/rest/v3