Google Comments API

Operations related to Comments

Operations 5

GET /files/{fileId}/comments Google Get Files Fileid Comments #
POST /files/{fileId}/comments Google Post Files Fileid Comments #
GET /files/{fileId}/comments/{commentId} Google Get Files Fileid Comments Commentid #
PATCH /files/{fileId}/comments/{commentId} Google Patch Files Fileid Comments Commentid #
DELETE /files/{fileId}/comments/{commentId} Google Delete Files Fileid Comments Commentid #

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-comments-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-comments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Google Drive Comments 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:
- name: Comments
  description: Operations related to Comments
paths:
  /files/{fileId}/comments:
    get:
      tags:
      - Comments
      summary: Google Get Files Fileid Comments
      description: Lists a file's comments.
      operationId: googleDriveCommentsList
      security:
      - Oauth2:
        - https://www.googleapis.com/auth/drive
        Oauth2c:
        - https://www.googleapis.com/auth/drive
      - Oauth2:
        - https://www.googleapis.com/auth/drive.file
        Oauth2c:
        - https://www.googleapis.com/auth/drive.file
      - Oauth2:
        - https://www.googleapis.com/auth/drive.readonly
        Oauth2c:
        - https://www.googleapis.com/auth/drive.readonly
      parameters:
      - description: The ID of the file.
        in: path
        name: fileId
        required: true
        schema:
          type: string
      - description: Whether to include deleted comments. Deleted comments will not include their original content.
        in: query
        name: includeDeleted
        schema:
          type: boolean
      - description: The maximum number of comments to return per page.
        in: query
        name: pageSize
        schema:
          maximum: 100
          minimum: 1
          type: integer
      - description: The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.
        in: query
        name: pageToken
        schema:
          type: string
      - description: The minimum value of 'modifiedTime' for the result comments (RFC 3339 date-time).
        in: query
        name: startModifiedTime
        schema:
          type: string
      - in: header
        name: Authorization
        schema:
          type: string
      - description: V1 error format.
        in: query
        name: $.xgafv
        schema:
          enum:
          - '1'
          - '2'
          type: string
      - description: OAuth access token.
        in: query
        name: access_token
        schema:
          type: string
      - description: Data format for response.
        in: query
        name: alt
        schema:
          enum:
          - json
          - media
          - proto
          type: string
      - description: JSONP
        in: query
        name: callback
        schema:
          type: string
      - description: Selector specifying which fields to include in a partial response.
        in: query
        name: fields
        schema:
          type: string
      - description: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        in: query
        name: key
        schema:
          type: string
      - description: OAuth 2.0 token for the current user.
        in: query
        name: oauth_token
        schema:
          type: string
      - description: Returns response with indentations and line breaks.
        in: query
        name: prettyPrint
        schema:
          type: boolean
      - description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        in: query
        name: quotaUser
        schema:
          type: string
      - description: Upload protocol for media (e.g. "raw", "multipart").
        in: query
        name: upload_protocol
        schema:
          type: string
      - description: Legacy upload protocol for media (e.g. "media", "multipart").
        in: query
        name: uploadType
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommentList'
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
    post:
      tags:
      - Comments
      summary: Google Post Files Fileid Comments
      description: Creates a comment on a file.
      operationId: googleDriveCommentsCreate
      security:
      - Oauth2:
        - https://www.googleapis.com/auth/drive
        Oauth2c:
        - https://www.googleapis.com/auth/drive
      - Oauth2:
        - https://www.googleapis.com/auth/drive.file
        Oauth2c:
        - https://www.googleapis.com/auth/drive.file
      parameters:
      - description: The ID of the file.
        in: path
        name: fileId
        required: true
        schema:
          type: string
      - in: header
        name: Authorization
        schema:
          type: string
      - description: V1 error format.
        in: query
        name: $.xgafv
        schema:
          enum:
          - '1'
          - '2'
          type: string
      - description: OAuth access token.
        in: query
        name: access_token
        schema:
          type: string
      - description: Data format for response.
        in: query
        name: alt
        schema:
          enum:
          - json
          - media
          - proto
          type: string
      - description: JSONP
        in: query
        name: callback
        schema:
          type: string
      - description: Selector specifying which fields to include in a partial response.
        in: query
        name: fields
        schema:
          type: string
      - description: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        in: query
        name: key
        schema:
          type: string
      - description: OAuth 2.0 token for the current user.
        in: query
        name: oauth_token
        schema:
          type: string
      - description: Returns response with indentations and line breaks.
        in: query
        name: prettyPrint
        schema:
          type: boolean
      - description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        in: query
        name: quotaUser
        schema:
          type: string
      - description: Upload protocol for media (e.g. "raw", "multipart").
        in: query
        name: upload_protocol
        schema:
          type: string
      - description: Legacy upload protocol for media (e.g. "media", "multipart").
        in: query
        name: uploadType
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Comment'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
  /files/{fileId}/comments/{commentId}:
    get:
      tags:
      - Comments
      summary: Google Get Files Fileid Comments Commentid
      description: Gets a comment by ID.
      operationId: googleDriveCommentsGet
      security:
      - Oauth2:
        - https://www.googleapis.com/auth/drive
        Oauth2c:
        - https://www.googleapis.com/auth/drive
      - Oauth2:
        - https://www.googleapis.com/auth/drive.file
        Oauth2c:
        - https://www.googleapis.com/auth/drive.file
      - Oauth2:
        - https://www.googleapis.com/auth/drive.readonly
        Oauth2c:
        - https://www.googleapis.com/auth/drive.readonly
      parameters:
      - description: The ID of the file.
        in: path
        name: fileId
        required: true
        schema:
          type: string
      - description: The ID of the comment.
        in: path
        name: commentId
        required: true
        schema:
          type: string
      - description: Whether to return deleted comments. Deleted comments will not include their original content.
        in: query
        name: includeDeleted
        schema:
          type: boolean
      - in: header
        name: Authorization
        schema:
          type: string
      - description: V1 error format.
        in: query
        name: $.xgafv
        schema:
          enum:
          - '1'
          - '2'
          type: string
      - description: OAuth access token.
        in: query
        name: access_token
        schema:
          type: string
      - description: Data format for response.
        in: query
        name: alt
        schema:
          enum:
          - json
          - media
          - proto
          type: string
      - description: JSONP
        in: query
        name: callback
        schema:
          type: string
      - description: Selector specifying which fields to include in a partial response.
        in: query
        name: fields
        schema:
          type: string
      - description: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        in: query
        name: key
        schema:
          type: string
      - description: OAuth 2.0 token for the current user.
        in: query
        name: oauth_token
        schema:
          type: string
      - description: Returns response with indentations and line breaks.
        in: query
        name: prettyPrint
        schema:
          type: boolean
      - description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        in: query
        name: quotaUser
        schema:
          type: string
      - description: Upload protocol for media (e.g. "raw", "multipart").
        in: query
        name: upload_protocol
        schema:
          type: string
      - description: Legacy upload protocol for media (e.g. "media", "multipart").
        in: query
        name: uploadType
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
    patch:
      tags:
      - Comments
      summary: Google Patch Files Fileid Comments Commentid
      description: Updates a comment with patch semantics.
      operationId: googleDriveCommentsUpdate
      security:
      - Oauth2:
        - https://www.googleapis.com/auth/drive
        Oauth2c:
        - https://www.googleapis.com/auth/drive
      - Oauth2:
        - https://www.googleapis.com/auth/drive.file
        Oauth2c:
        - https://www.googleapis.com/auth/drive.file
      parameters:
      - description: The ID of the file.
        in: path
        name: fileId
        required: true
        schema:
          type: string
      - description: The ID of the comment.
        in: path
        name: commentId
        required: true
        schema:
          type: string
      - in: header
        name: Authorization
        schema:
          type: string
      - description: V1 error format.
        in: query
        name: $.xgafv
        schema:
          enum:
          - '1'
          - '2'
          type: string
      - description: OAuth access token.
        in: query
        name: access_token
        schema:
          type: string
      - description: Data format for response.
        in: query
        name: alt
        schema:
          enum:
          - json
          - media
          - proto
          type: string
      - description: JSONP
        in: query
        name: callback
        schema:
          type: string
      - description: Selector specifying which fields to include in a partial response.
        in: query
        name: fields
        schema:
          type: string
      - description: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        in: query
        name: key
        schema:
          type: string
      - description: OAuth 2.0 token for the current user.
        in: query
        name: oauth_token
        schema:
          type: string
      - description: Returns response with indentations and line breaks.
        in: query
        name: prettyPrint
        schema:
          type: boolean
      - description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        in: query
        name: quotaUser
        schema:
          type: string
      - description: Upload protocol for media (e.g. "raw", "multipart").
        in: query
        name: upload_protocol
        schema:
          type: string
      - description: Legacy upload protocol for media (e.g. "media", "multipart").
        in: query
        name: uploadType
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Comment'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
    delete:
      tags:
      - Comments
      summary: Google Delete Files Fileid Comments Commentid
      description: Deletes a comment.
      operationId: googleDriveCommentsDelete
      security:
      - Oauth2:
        - https://www.googleapis.com/auth/drive
        Oauth2c:
        - https://www.googleapis.com/auth/drive
      - Oauth2:
        - https://www.googleapis.com/auth/drive.file
        Oauth2c:
        - https://www.googleapis.com/auth/drive.file
      parameters:
      - description: The ID of the file.
        in: path
        name: fileId
        required: true
        schema:
          type: string
      - description: The ID of the comment.
        in: path
        name: commentId
        required: true
        schema:
          type: string
      - in: header
        name: Authorization
        schema:
          type: string
      - description: V1 error format.
        in: query
        name: $.xgafv
        schema:
          enum:
          - '1'
          - '2'
          type: string
      - description: OAuth access token.
        in: query
        name: access_token
        schema:
          type: string
      - description: Data format for response.
        in: query
        name: alt
        schema:
          enum:
          - json
          - media
          - proto
          type: string
      - description: JSONP
        in: query
        name: callback
        schema:
          type: string
      - description: Selector specifying which fields to include in a partial response.
        in: query
        name: fields
        schema:
          type: string
      - description: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        in: query
        name: key
        schema:
          type: string
      - description: OAuth 2.0 token for the current user.
        in: query
        name: oauth_token
        schema:
          type: string
      - description: Returns response with indentations and line breaks.
        in: query
        name: prettyPrint
        schema:
          type: boolean
      - description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        in: query
        name: quotaUser
        schema:
          type: string
      - description: Upload protocol for media (e.g. "raw", "multipart").
        in: query
        name: upload_protocol
        schema:
          type: string
      - description: Legacy upload protocol for media (e.g. "media", "multipart").
        in: query
        name: uploadType
        schema:
          type: string
      responses:
        '200':
          description: Successful response
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
components:
  schemas:
    User:
      description: Information about a Drive user.
      properties:
        displayName:
          description: Output only. A plain text displayable name for this user.
          type: string
        emailAddress:
          description: Output only. The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
          type: string
        kind:
          default: drive#user
          description: 'Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#user"`.'
          type: string
        me:
          description: Output only. Whether this user is the requesting user.
          type: boolean
        permissionId:
          description: Output only. The user's ID as visible in Permission resources.
          type: string
        photoLink:
          description: Output only. A link to the user's profile photo, if available.
          type: string
      type: object
    Comment:
      description: A comment on a file. Some resource methods (such as `comments.update`) require a `commentId`. Use the `comments.list` method to retrieve the ID for a comment in a file.
      properties:
        anchor:
          description: A region of the document represented as a JSON string. For details on defining anchor properties, refer to [Manage comments and replies](https://developers.google.com/drive/api/v3/manage-comments).
          type: string
        author:
          $ref: '#/components/schemas/User'
          description: Output only. The author of the comment. The author's email address and permission ID will not be populated.
        content:
          description: The plain text content of the comment. This field is used for setting the content, while `htmlContent` should be displayed.
          type: string
        createdTime:
          description: The time at which the comment was created (RFC 3339 date-time).
          format: date-time
          type: string
        deleted:
          description: Output only. Whether the comment has been deleted. A deleted comment has no content.
          type: boolean
        htmlContent:
          description: Output only. The content of the comment with HTML formatting.
          type: string
        id:
          description: Output only. The ID of the comment.
          type: string
        kind:
          default: drive#comment
          description: 'Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#comment"`.'
          type: string
        modifiedTime:
          description: The last time the comment or any of its replies was modified (RFC 3339 date-time).
          format: date-time
          type: string
        quotedFileContent:
          description: The file content to which the comment refers, typically within the anchor region. For a text file, for example, this would be the text at the location of the comment.
          properties:
            mimeType:
              description: The MIME type of the quoted content.
              type: string
            value:
              description: The quoted content itself. This is interpreted as plain text if set through the API.
              type: string
          type: object
        replies:
          description: Output only. The full list of replies to the comment in chronological order.
          items:
            $ref: '#/components/schemas/Reply'
          type: array
        resolved:
          description: Output only. Whether the comment has been resolved by one of its replies.
          type: boolean
      type: object
    Reply:
      description: A reply to a comment on a file. Some resource methods (such as `replies.update`) require a `replyId`. Use the `replies.list` method to retrieve the ID for a reply.
      properties:
        action:
          description: 'The action the reply performed to the parent comment. Valid values are: * `resolve` * `reopen`'
          type: string
        author:
          $ref: '#/components/schemas/User'
          description: Output only. The author of the reply. The author's email address and permission ID will not be populated.
        content:
          description: The plain text content of the reply. This field is used for setting the content, while `htmlContent` should be displayed. This is required on creates if no `action` is specified.
          type: string
        createdTime:
          description: The time at which the reply was created (RFC 3339 date-time).
          format: date-time
          type: string
        deleted:
          description: Output only. Whether the reply has been deleted. A deleted reply has no content.
          type: boolean
        htmlContent:
          description: Output only. The content of the reply with HTML formatting.
          type: string
        id:
          description: Output only. The ID of the reply.
          type: string
        kind:
          default: drive#reply
          description: 'Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#reply"`.'
          type: string
        modifiedTime:
          description: The last time the reply was modified (RFC 3339 date-time).
          format: date-time
          type: string
      type: object
    CommentList:
      description: A list of comments on a file.
      properties:
        comments:
          description: The list of comments. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
          items:
            $ref: '#/components/schemas/Comment'
          type: array
        kind:
          default: drive#commentList
          description: 'Identifies what kind of resource this is. Value: the fixed string `"drive#commentList"`.'
          type: string
        nextPageToken:
          description: The page token for the next page of comments. This will be absent if the end of the comments list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. The page token is typically valid for several hours. However, if new items are added or removed, your expected results might differ.
          type: string
      type: object
  securitySchemes:
    Oauth2:
      description: Oauth 2.0 implicit authentication
      flows:
        implicit:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          scopes:
            https://www.googleapis.com/auth/drive: See, edit, create, and delete all of your Google Drive files
            https://www.googleapis.com/auth/drive.appdata: See, create, and delete its own configuration data in your Google Drive
            https://www.googleapis.com/auth/drive.apps.readonly: View your Google Drive apps
            https://www.googleapis.com/auth/drive.file: See, edit, create, and delete only the specific Google Drive files you use with this app
            https://www.googleapis.com/auth/drive.metadata: View and manage metadata of files in your Google Drive
            https://www.googleapis.com/auth/drive.metadata.readonly: See information about your Google Drive files
            https://www.googleapis.com/auth/drive.photos.readonly: View the photos, videos and albums in your Google Photos
            https://www.googleapis.com/auth/drive.readonly: See and download all your Google Drive files
            https://www.googleapis.com/auth/drive.scripts: Modify your Google Apps Script scripts' behavior
      type: oauth2
    Oauth2c:
      description: Oauth 2.0 authorizationCode authentication
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          scopes:
            https://www.googleapis.com/auth/drive: See, edit, create, and delete all of your Google Drive files
            https://www.googleapis.com/auth/drive.appdata: See, create, and delete its own configuration data in your Google Drive
            https://www.googleapis.com/auth/drive.apps.readonly: View your Google Drive apps
            https://www.googleapis.com/auth/drive.file: See, edit, create, and delete only the specific Google Drive files you use with this app
            https://www.googleapis.com/auth/drive.metadata: View and manage metadata of files in your Google Drive
            https://www.googleapis.com/auth/drive.metadata.readonly: See information about your Google Drive files
            https://www.googleapis.com/auth/drive.photos.readonly: View the photos, videos and albums in your Google Photos
            https://www.googleapis.com/auth/drive.readonly: See and download all your Google Drive files
            https://www.googleapis.com/auth/drive.scripts: Modify your Google Apps Script scripts' behavior
          tokenUrl: https://accounts.google.com/o/oauth2/token
      type: oauth2
externalDocs:
  url: https://developers.google.com/drive/