Google Cloud Firestore Documents API

Operations on Firestore documents

Operations 6

GET /projects/{project}/databases/{database}/documents/{collectionId} Google Cloud Firestore List documents #
POST /projects/{project}/databases/{database}/documents/{collectionId} Google Cloud Firestore Create a document #
GET /projects/{project}/databases/{database}/documents/{collectionId}/{documentId} Google Cloud Firestore Get a document #
PATCH /projects/{project}/databases/{database}/documents/{collectionId}/{documentId} Google Cloud Firestore Update a document #
DELETE /projects/{project}/databases/{database}/documents/{collectionId}/{documentId} Google Cloud Firestore Delete a document #
POST /projects/{project}/databases/{database}/documents:runQuery Google Cloud Firestore Run a query #

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-cloud-firestore-documents-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-cloud-firestore-documents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Google Cloud Firestore Databases Documents API
  description: The Cloud Firestore API provides RESTful access to Google Cloud Firestore, a flexible, scalable NoSQL cloud database for storing and syncing data. It enables CRUD operations on documents and collections, querying with filters and ordering, managing indexes, and handling real-time data synchronization across client apps.
  version: v1
  contact:
    name: Google Cloud
    url: https://cloud.google.com/firestore/docs/reference/rest
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://firestore.googleapis.com/v1
  description: Cloud Firestore API v1
tags:
- name: Documents
  description: Operations on Firestore documents
paths:
  /projects/{project}/databases/{database}/documents/{collectionId}:
    get:
      tags:
      - Documents
      summary: Google Cloud Firestore List documents
      description: Lists documents in a collection.
      operationId: listDocuments
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      - name: database
        in: path
        required: true
        schema:
          type: string
      - name: collectionId
        in: path
        required: true
        schema:
          type: string
      - name: pageSize
        in: query
        schema:
          type: integer
      - name: pageToken
        in: query
        schema:
          type: string
      - name: orderBy
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDocumentsResponse'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/datastore
    post:
      tags:
      - Documents
      summary: Google Cloud Firestore Create a document
      description: Creates a new document in the specified collection.
      operationId: createDocument
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      - name: database
        in: path
        required: true
        schema:
          type: string
      - name: collectionId
        in: path
        required: true
        schema:
          type: string
      - name: documentId
        in: query
        description: Optional client-assigned document ID.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Document'
      responses:
        '200':
          description: Document created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/datastore
  /projects/{project}/databases/{database}/documents/{collectionId}/{documentId}:
    get:
      tags:
      - Documents
      summary: Google Cloud Firestore Get a document
      description: Gets a single document.
      operationId: getDocument
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      - name: database
        in: path
        required: true
        schema:
          type: string
      - name: collectionId
        in: path
        required: true
        schema:
          type: string
      - name: documentId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
        '404':
          description: Document not found
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/datastore
    patch:
      tags:
      - Documents
      summary: Google Cloud Firestore Update a document
      description: Updates or inserts a document.
      operationId: updateDocument
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      - name: database
        in: path
        required: true
        schema:
          type: string
      - name: collectionId
        in: path
        required: true
        schema:
          type: string
      - name: documentId
        in: path
        required: true
        schema:
          type: string
      - name: updateMask.fieldPaths
        in: query
        schema:
          type: array
          items:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Document'
      responses:
        '200':
          description: Document updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/datastore
    delete:
      tags:
      - Documents
      summary: Google Cloud Firestore Delete a document
      description: Deletes a document.
      operationId: deleteDocument
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      - name: database
        in: path
        required: true
        schema:
          type: string
      - name: collectionId
        in: path
        required: true
        schema:
          type: string
      - name: documentId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Document deleted successfully
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/datastore
  /projects/{project}/databases/{database}/documents:runQuery:
    post:
      tags:
      - Documents
      summary: Google Cloud Firestore Run a query
      description: Runs a structured query against a Firestore database.
      operationId: runQuery
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      - name: database
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunQueryRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RunQueryResponse'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/datastore
components:
  schemas:
    Document:
      type: object
      properties:
        name:
          type: string
          description: The resource name of the document.
        fields:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Value'
          description: The document's fields.
        createTime:
          type: string
          format: date-time
        updateTime:
          type: string
          format: date-time
    RunQueryResponse:
      type: object
      properties:
        document:
          $ref: '#/components/schemas/Document'
        readTime:
          type: string
          format: date-time
        skippedResults:
          type: integer
    Value:
      type: object
      properties:
        nullValue:
          type: string
        booleanValue:
          type: boolean
        integerValue:
          type: string
        doubleValue:
          type: number
        timestampValue:
          type: string
          format: date-time
        stringValue:
          type: string
        bytesValue:
          type: string
          format: byte
        referenceValue:
          type: string
        geoPointValue:
          type: object
          properties:
            latitude:
              type: number
            longitude:
              type: number
        arrayValue:
          type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/Value'
        mapValue:
          type: object
          properties:
            fields:
              type: object
              additionalProperties:
                $ref: '#/components/schemas/Value'
    ListDocumentsResponse:
      type: object
      properties:
        documents:
          type: array
          items:
            $ref: '#/components/schemas/Document'
        nextPageToken:
          type: string
    RunQueryRequest:
      type: object
      properties:
        structuredQuery:
          type: object
          properties:
            from:
              type: array
              items:
                type: object
                properties:
                  collectionId:
                    type: string
                  allDescendants:
                    type: boolean
            where:
              type: object
            orderBy:
              type: array
              items:
                type: object
            limit:
              type: integer
            offset:
              type: integer
  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/cloud-platform: Full access to Cloud Platform
            https://www.googleapis.com/auth/datastore: View and manage Firestore data