---
title: "POST /v1/{+database}/documents:batchGet"
method: POST
path: "/v1/{+database}/documents:batchGet"
tags: ["projects"]
---

# POST /v1/{+database}/documents:batchGet

`POST /v1/{+database}/documents:batchGet`

Gets multiple documents. Documents returned by this method are not guaranteed to be returned in the same order that they were requested.

## Path parameters

- `database` string, required

## Request body

- BatchGetDocumentsRequest — The request for Firestore.BatchGetDocuments.
  - `transaction` string, byte — Reads documents in a transaction.
  - `newTransaction` TransactionOptions — Options for creating a new transaction.
    - `readOnly` ReadOnly — Options for a transaction that can only be used to read documents.
      - `readTime` string, google-datetime — Reads documents at the given time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.
    - `readWrite` ReadWrite — Options for a transaction that can be used to read and write documents.
      - `concurrencyMode` 'CONCURRENCY_MODE_UNSPECIFIED' | 'OPTIMISTIC' | 'PESSIMISTIC' — Optional. The concurrency control mode to use for this transaction. A database is able to use different concurrency modes for different transactions simultaneously. 3rd party auth requests are only allowed to create optimistic read-write transactions and must specify that here even if the database-level setting is already configured to optimistic.
      - `retryTransaction` string, byte — An optional transaction to retry.
  - `readTime` string, google-datetime — Reads documents as they were at the given time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.
  - `documents` string[] — The names of the documents to retrieve. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. The request will fail if any of the document is not a child resource of the given `database`. Duplicate names will be elided.
  - `requestOptions` RequestOptions — Options for a server request.
    - `requestTags` string[] — Optional. The request tags for the request.
  - `mask` DocumentMask — A set of field paths on a document. Used to restrict a get or update operation on a document to a subset of its fields. This is different from standard field masks, as this is always scoped to a Document, and takes in account the dynamic nature of Value.
    - `fieldPaths` string[] — The list of field paths in the mask. See Document.fields for a field path syntax reference.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/firestore.md) · [All operations](https://skmtc.net/google/apis/firestore/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/firestore/versions/11bc07a83431/schema)
