Quotas and limits
This page identifies the request quotas and limits for Firestore.
Free Tier usage
Firestore offers a free tier that lets you get started with Firestore at no cost. The free tier amounts are listed in the following table.
Free tier amounts are applied daily and reset at midnight Pacific time.
The free tier applies to only one Firestore database per project. The first database that is created in a project without a free tier database will get the free tier. If the database with the free tier applied is deleted, the next database created will receive the free tier.
Standard edition
| Free tier | Quota |
|---|---|
| Stored data | 1 GiB |
| Document reads | 50,000 per day |
| Document writes | 20,000 per day |
| Document deletes | 20,000 per day |
| Outbound data transfer | 10 GiB per month |
Enterprise edition
| Free tier | Quota |
|---|---|
| Stored data | 1 GiB |
| Read units | 50,000 per day |
| Real-time update units | 50,000 per day |
| Write units | 40,000 per day |
| Outbound data transfer | 10 GiB per month |
The following operations and features don't include free usage. You must enable billing to use these features:
- Managed deletes (TTL)
- PITR data
- Backup data
- Restore operations
- Clone operations
Limits
The following tables show the limits that apply to Firestore. These are hard limits unless otherwise noted.
Databases
Standard edition
| Limit | Details |
|---|---|
| Maximum number of databases per project |
100 You can contact support to request an increase to this limit. |
| Maximum number of customer-managed encryption keys (CMEK) databases per project |
0 By default the quota is 0 because this feature is behind an allowlist. You can request to increase the quota by filling in the CMEK access request form. |
Enterprise edition
| Limit | Details |
|---|---|
| Maximum number of databases per project |
100 You can contact support to request an increase to this limit. |
| Maximum number of customer-managed encryption keys (CMEK) databases per project |
0 By default the quota is 0 because this feature is behind an allowlist. You can request to increase the quota by filling in the CMEK access request form. |
Collections, documents, and fields
Standard edition
| Limit | Details |
|---|---|
| Constraints on collection IDs |
|
| Maximum depth of subcollections | 100 |
| Constraints on document IDs |
|
| Maximum size for a document name | 6 KiB |
| Maximum size for a document | 1 MiB (1,048,576 bytes) |
| Constraints on field names |
|
| Maximum size of a field name | 1,500 bytes |
| Constraints on field paths |
`). For example, foo.`x&y` refers to the x&y field nested under the foo field. To construct a field name with the backtick character, escape the backtick character with the backslash character (\). For convenience, you can avoid quoted field names by passing the field path as a FieldPath object (for example, see JavaScript FieldPath).
|
| Maximum size of a field path | 1,500 bytes |
| Maximum size of a field value | 1 MiB - 89 bytes (1,048,487 bytes) |
| Maximum depth of fields in a map or array | 20 Map and array fields add one level to the overall depth of an object. For example, the following object has a total depth of three levels: |
Enterprise edition
| Limit | Details |
|---|---|
| Constraints on collection IDs |
|
| Maximum depth of subcollections | 100 |
| Constraints on document IDs |
|
| Maximum size for a document name | 6 KiB |
| Maximum size for a document | 1 MiB (1,048,576 bytes) |
| Constraints on field names |
|
| Maximum size of a field name | 1,500 bytes |
| Constraints on field paths |
`). For example, foo.`x&y` refers to the x&y field nested under the foo field. To construct a field name with the backtick character, escape the backtick character with the backslash character (\). For convenience, you can avoid quoted field names by passing the field path as a FieldPath object (for example, see JavaScript FieldPath).
|
| Maximum size of a field path | 1,500 bytes |
| Maximum size of a field value | 1 MiB - 89 bytes (1,048,487 bytes) |
| Maximum depth of fields in a map or array | 20 Map and array fields add one level to the overall depth of an object. For example, the following object has a total depth of three levels: |
Writes and transactions
Standard edition
| Limit | Details |
|---|---|
| Maximum API request size | 10 MiB |
| Time limit for a transaction | 270 seconds, with a 60-second idle expiration time |
Maximum number of field transformations that can be performed on a
single document in a Commit operation or in a
transaction |
500 |
Enterprise edition
| Limit | Details |
|---|---|
| Maximum API request size | 10 MiB |
| Time limit for a transaction | 270 seconds, with a 60-second idle expiration time |
Maximum number of field transformations that can be performed on a
single document in a Commit operation or in a
transaction |
500 |
Indexes
Standard edition
| Limit | Details |
|---|---|
| Maximum number of composite indexes for a database |
|
| Maximum number of single-field configurations for a database |
One field level configuration can contain multiple configurations for the same field. For example, a single-field indexing exemption and a TTL policy on the same field count as one field configuration towards the limit. |
|
Maximum number of index entries for each document |
40,000 The number of index entries is the sum of the following for a document:
To see how Firestore turns a document and a set of indexes into index entries, see this index entry count example. |
| Maximum number of fields in a composite index | 100 |
| Maximum size of an index entry |
7.5 KiB To see how Firestore calculates index entry size, see index entry size. |
| Maximum sum of the sizes of a document's index entries |
8 MiB The total size is the sum of the following for a document: |
| Maximum size of an indexed field value |
1500 bytes Field values over 1500 bytes are truncated. Queries involving truncated field values may return inconsistent results. |
Enterprise edition
| Limit | Details |
|---|---|
| Maximum number of indexes for a database |
|
|
Maximum number of index entries for each document |
40,000 |
| Maximum number of fields in an index | 100 |
| Maximum size of an index entry |
7.5 KiB To see how Firestore calculates index entry size, see index entry size. |
| Maximum sum of the sizes of a document's index entries |
8 MiB |
Time-to-live (TTL)
Standard edition
| Limit | Details |
|---|---|
| Maximum number of TTL configurations for a database |
|
Enterprise edition
| Limit | Details |
|---|---|
| Maximum number of single-field configurations for a database |
One field level configuration can contain multiple configurations for the same field. For example, a single-field indexing exemption and a TTL policy on the same field count as one field configuration towards the limit. |
Export/Import
The following limits apply to managed import and export operations:
Standard edition
| Limit | Details |
|---|---|
| Maximum total number of both export and import requests for a project allowed per minute | 20 |
| Maximum number of concurrent exports and imports | 50 |
| Maximum number of collection ID filters for export and import requests | 100 |
Enterprise edition
| Limit | Details |
|---|---|
| Maximum total number of both export and import requests for a project allowed per minute | 20 |
| Maximum number of concurrent exports and imports | 50 |
| Maximum number of collection ID filters for export and import requests | 100 |
Security rules
Standard edition
| Limit | Details |
|---|---|
Maximum number of exists(), get(), and getAfter() calls per request |
Exceeding either limit results in a permission denied error. Some document access calls may be cached, and cached calls do not count towards the limits. |
Maximum nested match statement depth |
10 |
Maximum path length, in path segments, allowed within a set of nested
match statements |
100 |
Maximum number of path capture variables allowed within a set of
nested match statements |
20 |
| Maximum function call depth | 20 |
| Maximum number of function arguments | 7 |
Maximum number of let variable bindings per function |
10 |
| Maximum number of recursive or cyclical function calls | 0 (not permitted) |
| Maximum number of expressions evaluated per request | 1,000 |
| Maximum size of a ruleset | Rulesets must obey two size limits:
|
Enterprise edition
| Limit | Details |
|---|---|
Maximum number of exists(), get(), and getAfter() calls per request |
Exceeding either limit results in a permission denied error. Some document access calls may be cached, and cached calls do not count towards the limits. |
Maximum nested match statement depth |
10 |
Maximum path length, in path segments, allowed within a set of nested
match statements |
100 |
Maximum number of path capture variables allowed within a set of
nested match statements |
20 |
| Maximum function call depth | 20 |
| Maximum number of function arguments | 7 |
Maximum number of let variable bindings per function |
10 |
| Maximum number of recursive or cyclical function calls | 0 (not permitted) |
| Maximum number of expressions evaluated per request | 1,000 |
| Maximum size of a ruleset | Rulesets must obey two size limits:
|