This document explains Cloud Firestore pricing details.
If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.
Pricing overview
When you use Cloud Firestore, you are charged for the following:
- The number of documents you read, write, and delete.
- The number of index entries read to satisfy a query. See more details about index reads.
- The amount of storage that your database uses, including overhead for metadata and indexes.
- The amount of network bandwidth that you use.
Storage and bandwidth usage are calculated in gibibytes (GiB), where 1 GiB = 230 bytes. All charges accrue daily.
The following sections provide details about how you are charged for your Cloud Firestore usage.
Free quota
Cloud Firestore offers free quota that allows you to get started with
your (default)
database at no cost. The free quota amounts are listed below.
If you need more quota, you must enable billing for your Google Cloud project.
Quotas are applied daily and reset around midnight Pacific time.
Only the (default)
database qualifies for the free quota.
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 |
The following operations and features do not include free usage. You must enable billing to use these features:
- Usage of named (non-default) databases
- TTL deletes
- PITR data
- Backup data
- Restore operations
For more information about how these features are billed, see Storage pricing.
Pricing by location
The following table lists pricing for reads, writes, deletes, and storage for each Cloud Firestore location:
Select region
US (multi-region)
US (multi-region)
Pricing beyond the free quota | |
---|---|
Document reads | $0.06 per 100,000 documents |
Document writes | $0.18 per 100,000 documents |
Document deletes | $0.02 per 100,000 documents |
TTL deletes | $0.02 per 100,000 documents |
Stored data | $0.18/GiB/month |
PITR data | $0.18/GiB/month |
Backup data | $0.03/GiB/month |
Restore operation | $0.4/GiB |
Oregon
Oregon
Pricing beyond the free quota | |
---|---|
Document reads | $0.03 per 100,000 documents |
Document writes | $0.09 per 100,000 documents |
Document deletes | $0.01 per 100,000 documents |
TTL deletes | $0.01 per 100,000 documents |
Stored data | $0.15/GiB/month |
PITR data | $0.15/GiB/month |
Backup data | $0.03/GiB/month |
Restore operation | $0.2/GiB |
Los Angeles
Los Angeles
Pricing beyond the free quota | |
---|---|
Document reads | $0.036 per 100,000 documents |
Document writes | $0.108 per 100,000 documents |
Document deletes | $0.012 per 100,000 documents |
TTL deletes | $0.012 per 100,000 documents |
Stored data | $0.108/GiB/month |
PITR | $0.108/GiB/month |
Backup data | $0.036/GiB/month |
Restore operation | $0.24/GiB |
Salt Lake City
Salt Lake City
Pricing beyond the free quota | ||
---|---|---|
Document reads | $0.036 per 100,000 documents | |
Document writes | $0.108 per 100,000 documents | |
Document deletes | $0.012 per 100,000 documents | |
TTL deletes | $0.012 per 100,000 documents | |
Stored data | $0.18/GiB/month | |
PITR data | $0.18/GiB/month | |
Backup data | $0.036/GiB/month | |
Restore operation | $0.24/GiB |
Northern Virginia
Northern Virginia
Pricing beyond the free quota | |
---|---|
Document reads | $0.033 per 100,000 documents |
Document writes | $0.099 per 100,000 documents |
Document deletes | $0.011 per 100,000 documents |
TTL deletes | $0.011 per 100,000 documents |
Stored data | $0.099/GiB/month |
PITR data | $0.099/GiB/month |
Backup data | $0.033/GiB/month |
Restore operation | $0.22/GiB |
Columbus
Columbus
Pricing beyond the free quota | |
---|---|
Document reads | $0.030 per 100,000 documents |
Document writes | $0.090 per 100,000 documents |
Document deletes | $0.010 per 100,000 documents |
TTL deletes | $0.010 per 100,000 documents |
Stored data | $0.150/GiB/month |
PITR data | $0.150/GiB/month |
Backup data | $0.030/GiB/month |
Restore operation | $0.200/GiB |
Dallas
Dallas
Pricing beyond the free quota | |
---|---|
Document reads | $0.035 per 100,000 documents |
Document writes | $0.106 per 100,000 documents |
Document deletes | $0.012 per 100,000 documents |
TTL deletes | $0.012 per 100,000 documents |
Stored data | $0.177/GiB/month |
PITR data | $0.177/GiB/month |
Backup data | $0.035/GiB/month |
Restore operation | $0.236/GiB |
Las Vegas
Las Vegas
Pricing beyond the free quota | |
---|---|
Document reads | $0.033 per 100,000 documents |
Document writes | $0.099 per 100,000 documents |
Document deletes | $0.011 per 100,000 documents |
TTL deletes | $0.011 per 100,000 documents |
Stored data | $0.165/GiB/month |
PITR data | $0.165/GiB/month |
Backup data | $0.033/GiB/month |
Restore operation | $0.22/GiB |
Iowa
Iowa
Pricing beyond the free quota | |
---|---|
Document reads | $0.030 per 100,000 documents |
Document writes | $0.090 per 100,000 documents |
Document deletes | $0.010 per 100,000 documents |
TTL deletes | $0.010 per 100,000 documents |
Stored data | $0.150/GiB/month |
PITR data | $0.150/GiB/month |
Backup data | $0.030/GiB/month |
Restore operation | $0.200/GiB |
South Carolina
South Carolina
Pricing beyond the free quota | |
---|---|
Document reads | $0.06 per 100,000 documents |
Document writes | $0.18 per 100,000 documents |
Document deletes | $0.02 per 100,000 documents |
TTL deletes | $0.02 per 100,000 documents |
Stored data | $0.18/GiB/month |
PITR data | $0.18/GiB/month |
Backup data | $0.03/GiB/month |
Restore operation | $0.4/GiB |
Montreal
Montreal
Pricing beyond the free quota | |
---|---|
Document reads | $0.033 per 100,000 documents |
Document writes | $0.099 per 100,000 documents |
Document deletes | $0.011 per 100,000 documents |
TTL deletes | $0.011 per 100,000 documents |
Stored data | $0.099/GiB/month |
PITR data | $0.099/GiB/month |
Backup data | $0.033/GiB/month |
Restore operation | $0.22/GiB |
Toronto
Toronto
Pricing beyond the free quota | |
---|---|
Document reads | $0.033 per 100,000 documents |
Document writes | $0.099 per 100,000 documents |
Document deletes | $0.011 per 100,000 documents |
TTL deletes | $0.011 per 100,000 documents |
Stored data | $0.165/GiB/month |
PITR data | $0.165/GiB/month |
Backup data | $0.033/GiB/month |
Restore operation | $0.22/GiB |
Santiago
Santiago
Pricing beyond the free quota | |
---|---|
Document reads | $0.043 per 100,000 documents |
Document writes | $0.129 per 100,000 documents |
Document deletes | $0.014 per 100,000 documents |
TTL deletes | $0.014 per 100,000 documents |
Stored data | $0.215/GiB/month |
PITR data | $0.215/GiB/month |
Backup data | $0.043/GiB/month |
Restore operation | $0.286/GiB |
São Paulo
São Paulo
Pricing beyond the free quota | |
---|---|
Document reads | $0.045 per 100,000 documents |
Document writes | $0.135 per 100,000 documents |
Document deletes | $0.015 per 100,000 documents |
TTL deletes | $0.015 per 100,000 documents |
Stored data | $0.135/GiB/month |
PITR data | $0.135/GiB/month |
Backup data | $0.045/GiB/month |
Restore operation | $0.3/GiB |
Europe (multi-region)
Europe (multi-region)
Pricing beyond the free quota | |
---|---|
Document reads | $0.06 per 100,000 documents |
Document writes | $0.18 per 100,000 documents |
Document deletes | $0.02 per 100,000 documents |
TTL deletes | $0.02 per 100,000 documents |
Stored data | $0.18/GiB/month |
PITR data | $0.18/GiB/month |
Backup data | $0.03/GiB/month |
Restore operation | $0.4/GiB |
Zürich
Zürich
Pricing beyond the free quota | |
---|---|
Document reads | $0.042 per 100,000 documents |
Document writes | $0.126 per 100,000 documents |
Document deletes | $0.014 per 100,000 documents |
TTL deletes | $0.014 per 100,000 documents |
Stored data | $0.210/GiB/month |
PITR data | $0.210/GiB/month |
Backup data | $0.042/GiB/month |
Restore operation | $0.28/GiB |
Finland
Finland
Pricing beyond the free quota | |
---|---|
Document reads | $0.033 per 100,000 documents |
Document writes | $0.099 per 100,000 documents |
Document deletes | $0.011 per 100,000 documents |
TTL deletes | $0.011 per 100,000 documents |
Stored data | $0.165/GiB/month |
PITR data | $0.165/GiB/month |
Backup data | $0.033/GiB/month |
Restore operation | $0.220/GiB |
Warsaw
Warsaw
Pricing beyond the free quota | |
---|---|
Document reads | $0.039 per 100,000 documents |
Document writes | $0.117 per 100,000 documents |
Document deletes | $0.013 per 100,000 documents |
TTL deletes | $0.013 per 100,000 documents |
Stored data | $0.195/GiB/month |
PITR data | $0.195/GiB/month |
Backup data | $0.039/GiB/month |
Restore operation | $0.26/GiB |
Frankfurt
Frankfurt
Pricing beyond the free quota | |
---|---|
Document reads | $0.039 per 100,000 documents |
Document writes | $0.117 per 100,000 documents |
Document deletes | $0.013 per 100,000 documents |
TTL deletes | $0.013 per 100,000 documents |
Stored data | $0.117/GiB/month |
PITR data | $0.117/GiB/month |
Backup data | $0.039/GiB/month |
Restore operation | $0.26/GiB |
Netherlands
Netherlands
Pricing beyond the free quota | |
---|---|
Document reads | $0.034 per 100,000 documents |
Document writes | $0.102 per 100,000 documents |
Document deletes | $0.011 per 100,000 documents |
TTL deletes | $0.011 per 100,000 documents |
Stored data | $0.170/GiB/month |
PITR data | $0.170/GiB/month |
Backup data | $0.035/GiB/month |
Restore operation | $0.23/GiB |
London
London
Pricing beyond the free quota | |
---|---|
Document reads | $0.039 per 100,000 documents |
Document writes | $0.117 per 100,000 documents |
Document deletes | $0.013 per 100,000 documents |
TTL deletes | $0.013 per 100,000 documents |
Stored data | $0.117/GiB/month |
PITR data | $0.117/GiB/month |
Backup data | $0.039/GiB/month |
Restore operation | $0.26/GiB |
Belgium
Belgium
Pricing beyond the free quota | |
---|---|
Document reads | $0.033 per 100,000 documents |
Document writes | $0.099 per 100,000 documents |
Document deletes | $0.011 per 100,000 documents |
TTL deletes | $0.011 per 100,000 documents |
Stored data | $0.165/GiB/month |
PITR data | $0.165/GiB/month |
Backup data | $0.033/GiB/month |
Restore operation | $0.220/GiB |
Milan
Milan
Pricing beyond the free quota | |
---|---|
Document reads | $0.035 per 100,000 documents |
Document writes | $0.104 per 100,000 documents |
Document deletes | $0.012 per 100,000 documents |
TTL deletes | $0.012 per 100,000 documents |
Stored data | $0.174/GiB/month |
PITR data | $0.174/GiB/month |
Backup data | $0.035/GiB/month |
Restore operation | $0.232/GiB |
Madrid
Madrid
Pricing beyond the free quota | |
---|---|
Document reads | $0.035 per 100,000 documents |
Document writes | $0.106 per 100,000 documents |
Document deletes | $0.012 per 100,000 documents |
TTL deletes | $0.012 per 100,000 documents |
Stored data | $0.177/GiB/month |
PITR data | $0.177/GiB/month |
Backup data | $0.035/GiB/month |
Restore operation | $0.236/GiB |
Paris
Paris
Pricing beyond the free quota | |
---|---|
Document reads | $0.036 per 100,000 documents |
Document writes | $0.107 per 100,000 documents |
Document deletes | $0.012 per 100,000 documents |
TTL deletes | $0.012 per 100,000 documents |
Stored data | $0.179/GiB/month |
PITR data | $0.179/GiB/month |
Backup data | $0.036/GiB/month |
Restore operation | $0.238/GiB |
Doha
Doha
Pricing beyond the free quota | |
---|---|
Document reads | $0.036 per 100,000 documents |
Document writes | $0.109 per 100,000 documents |
Document deletes | $0.012 per 100,000 documents |
TTL deletes | $0.012 per 100,000 documents |
Stored data | $0.182/GiB/month |
PITR data | $0.182/GiB/month |
Backup data | $0.036/GiB/month |
Restore operation | $0.243/GiB |
Turin
Turin
Pricing beyond the free quota | |
---|---|
Document reads | $0.039 per 100,000 documents |
Document writes | $0.116 per 100,000 documents |
Document deletes | $0.013 per 100,000 documents |
TTL deletes | $0.013 per 100,000 documents |
Stored data | $0.194/GiB/month |
PITR data | $0.194/GiB/month |
Backup data | $0.039/GiB/month |
Restore operation | $0.258/GiB |
Berlin
Berlin
Pricing beyond the free quota | |
---|---|
Document reads | $0.046 per 100,000 documents |
Document writes | $0.139 per 100,000 documents |
Document deletes | $0.015 per 100,000 documents |
TTL deletes | $0.015 per 100,000 documents |
Stored data | $0.231/GiB/month |
PITR data | $0.231/GiB/month |
Backup data | $0.046/GiB/month |
Restore operation | $0.308/GiB |
Dammam
Dammam
Pricing beyond the free quota | |
---|---|
Document reads | $0.048 per 100,000 documents |
Document writes | $0.144 per 100,000 documents |
Document deletes | $0.016 per 100,000 documents |
TTL deletes | $0.016 per 100,000 documents |
Stored data | $0.240/GiB/month |
PITR data | $0.240/GiB/month |
Backup data | $0.048/GiB/month |
Restore operation | $0.320/GiB |
Tel Aviv
Tel Aviv
Pricing beyond the free quota | |
---|---|
Document reads | $0.034 per 100,000 documents |
Document writes | $0.102 per 100,000 documents |
Document deletes | $0.011 per 100,000 documents |
TTL deletes | $0.011 per 100,000 documents |
Stored data | $0.170/GiB/month |
PITR data | $0.170/GiB/month |
Backup data | $0.034/GiB/month |
Restore operation | $0.226/GiB |
Mumbai
Mumbai
Pricing beyond the free quota | |
---|---|
Document reads | $0.035 per 100,000 documents |
Document writes | $0.104 per 100,000 documents |
Document deletes | $0.012 per 100,000 documents |
TTL deletes | $0.012 per 100,000 documents |
Stored data | $0.104/GiB/month |
PITR data | $0.104/GiB/month |
Backup data | $0.035/GiB/month |
Restore operation | $0.23/GiB |
Delhi
Delhi
Pricing beyond the free quota | |
---|---|
Document reads | $0.035 per 100,000 documents |
Document writes | $0.104 per 100,000 documents |
Document deletes | $0.012 per 100,000 documents |
TTL deletes | $0.012 per 100,000 documents |
Stored data | $0.173/GiB/month |
PITR data | $0.173/GiB/month |
Backup data | $0.035/GiB/month |
Restore operation | $0.23/GiB |
Sydney
Sydney
Pricing beyond the free quota | |
---|---|
Document reads | $0.038 per 100,000 documents |
Document writes | $0.115 per 100,000 documents |
Document deletes | $0.013 per 100,000 documents |
TTL deletes | $0.013 per 100,000 documents |
Stored data | $0.115/GiB/month |
PITR data | $0.115/GiB/month |
Backup data | $0.038/GiB/month |
Restore operation | $0.256/GiB |
Melbourne
Melbourne
Pricing beyond the free quota | |
---|---|
Document reads | $0.034 per 100,000 documents |
Document writes | $0.103 per 100,000 documents |
Document deletes | $0.011 per 100,000 documents |
TTL deletes | $0.011 per 100,000 documents |
Stored data | $0.171/GiB/month |
PITR data | $0.171/GiB/month |
Backup data | $0.034/GiB/month |
Restore operation | $0.228/GiB |
Hong Kong
Hong Kong
Pricing beyond the free quota | |
---|---|
Document reads | $0.06 per 100,000 documents |
Document writes | $0.18 per 100,000 documents |
Document deletes | $0.02 per 100,000 documents |
TTL deletes | $0.02 per 100,000 documents |
Stored data | $0.18/GiB/month |
PITR data | $0.18/GiB/month |
Backup data | $0.035/GiB/month |
Restore operation | $0.23/GiB |
Taiwan
Taiwan
Pricing beyond the free quota | |
---|---|
Document reads | $0.0345 per 100,000 documents |
Document writes | $0.1042 per 100,000 documents |
Document deletes | $0.0115 per 100,000 documents |
TTL deletes | $0.0115 per 100,000 documents |
Stored data | $0.1725/GiB/month |
PITR data | $0.1725/GiB/month |
Backup data | $0.035/GiB/month |
Restore operation | $0.23/GiB |
Tokyo
Tokyo
Pricing beyond the free quota | |
---|---|
Document reads | $0.038 per 100,000 documents |
Document writes | $0.115 per 100,000 documents |
Document deletes | $0.013 per 100,000 documents |
TTL deletes | $0.013 per 100,000 documents |
Stored data | $0.115/GiB/month |
PITR data | $0.115/GiB/month |
Backup data | $0.038/GiB/month |
Restore operation | $0.256/GiB |
Singapore
Singapore
Pricing beyond the free quota | |
---|---|
Document reads | $0.0369 per 100,000 documents |
Document writes | $0.1107 per 100,000 documents |
Document deletes | $0.0123 per 100,000 documents |
TTL deletes | $0.0123 per 100,000 documents |
Stored data | $0.1846/GiB/month |
PITR data | $0.1846/GiB/month |
Backup data | $0.037/GiB/month |
Restore operation | $0.246/GiB |
Jakarta
Jakarta
Pricing beyond the free quota | |
---|---|
Document reads | $0.038 per 100,000 documents |
Document writes | $0.115 per 100,000 documents |
Document deletes | $0.013 per 100,000 documents |
TTL deletes | $0.013 per 100,000 documents |
Stored data | $0.192/GiB/month |
PITR data | $0.192/GiB/month |
Backup data | $0.038/GiB/month |
Restore operation | $0.256/GiB |
Osaka
Osaka
Pricing beyond the free quota | |
---|---|
Document reads | $0.038 per 100,000 documents |
Document writes | $0.115 per 100,000 documents |
Document deletes | $0.013 per 100,000 documents |
TTL deletes | $0.013 per 100,000 documents |
Stored data | $0.195/GiB/month |
PITR data | $0.195/GiB/month |
Backup data | $0.038/GiB/month |
Restore operation | $0.256/GiB |
Seoul
Seoul
Pricing beyond the free quota | |
---|---|
Document reads | $0.038 per 100,000 documents |
Document writes | $0.115 per 100,000 documents |
Document deletes | $0.013 per 100,000 documents |
TTL deletes | $0.013 per 100,000 documents |
Stored data | $0.192/GiB/month |
PITR data | $0.192/GiB/month |
Backup data | $0.038/GiB/month |
Restore operation | $0.256/GiB |
Johannesburg
Johannesburg
Pricing beyond the free quota | |
---|---|
Document reads | $0.031 per 100,000 documents |
Document writes | $0.094 per 100,000 documents |
Document deletes | $0.010 per 100,000 documents |
TTL deletes | $0.010 per 100,000 documents |
Stored data | $0.156/GiB/month |
PITR data | $0.156/GiB/month |
Backup data | $0.031/GiB/month |
Restore operation | $0.208/GiB |
If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.
No free quota for named databases
To create a named (non-default) database, you must upgrade your project's billing plan.
There's no additional cost to you for creating or deleting the named databases, but those databases do not qualify for the free quota. Instead, you will be charged on usage incurred on those named databases.
Reads, writes, and deletes
You are charged for documents and index entries read to satisfy a query. You are charged for each document write and delete that you perform.
Charges for writes and deletes are straightforward. For writes, each set
or
update
operation counts as a single write.
Charges for read operations have some nuances that you should keep in mind. The following sections explain these nuances in detail.
Index entry reads
You are charged one read operation for each batch of up to 1000 index entries read by a query except in the following:
For K-nearest neighbor vector search queries, you are charged one read operation for each batch of up to 100 kNN vector index entries read by the query.
For example, if the following vector search query with
limit: 5
returns 5 documents and reads 1550 kNN vector index entries, you are billed 5 read operations for the documents returned and 16 read operations for the index entries:// Requires single-field vector index const vectorQuery: VectorQuery = db.collection('cities').findNearest('embedding_field', FieldValue.vector([3.0, 1.0, 2.0]), { limit: 5, distanceMeasure: 'EUCLIDEAN' });
Queries that have up to one range field are not charged for index entries read.
For example, the following query contains one equality field (
age
) and one range field (start_date
) and is not charged for index entries read:db.collection("employees").whereEqualTo("age", 35) .whereGreaterThanOrEqualTo("start_date", new Date(2020, 1, 1))
The following query contains two range fields (
age
andstart_date
) and is charged for index entries reads:db.collection("employees").whereGreaterThanOrEqualTo("age", 35) .whereGreaterThanOrEqualTo("start_date", new Date(2020, 1, 1))
A field that appears in the order by clause is considered a range field when there is at least one other range field in the query. Therefore the following query contains two range fields (
age
andstart_date
) and is charged for index entries reads:db.collection("employees").whereGreaterThanOrEqualTo("age", 35) .orderBy("start_date")
The
__name__
field is always considered a range field, even if it is only used in an equality filter. Therefore the following query contains two range fields (age
and__name__
) and is charged for index entries reads:db.collection("employees").whereIn("__name__", Arrays.asList("/employees/Alice", "/employees/Bob")) .orderBy("age")
Aggregation queries
For aggregation queries
such as count()
, sum()
, and avg()
,
you are charged for index entries read by the query as
described above. For aggregation queries that read 0 index
entries, there is a minimum charge of one document read.
For example, count()
operations that read between 0 and 1000 index entries
are billed for one document read. For a count()
operation that reads 1500
index entries, you are billed 2 document reads.
To learn more about the indexes used and the index entries read, use Query Explain.
Listening to query results
Cloud Firestore allows you to listen to the results of a query and get realtime updates when the query results change.
When you listen to the results of a query, you are charged for a read each time a document in the result set is added or updated. You are also charged for a read when a document is removed from the result set because the document has changed. (In contrast, when a document is deleted, you are not charged for a read.)
Billing of listeners in the mobile and web SDKS also depends on whether offline persistence is enabled or not:
If offline persistence is enabled and the listener is disconnected for more than 30 minutes (for example, if the user goes offline), you will be charged for documents and index entries read as if you had issued a brand-new query.
If offline persistence is disabled, you will be charged for documents and index entries read as if you had issued a brand-new query whenever the listener disconnects and reconnects.
Managing large result sets
Cloud Firestore has several features to help you manage queries that return a large number of results:
- Cursors, which allow you to resume a long-running query.
- Page tokens, which help you paginate the query results.
- Limits, which specify how many results to retrieve.
- Offsets, which allow you to skip a fixed number of documents.
There are no additional costs for using cursors, page tokens, and limits. In fact, these features can help you save money by reading only the documents that you actually need.
However, when you send a query that includes an offset, you are charged a read for each skipped document. For example, if your query uses an offset of 10, and the query returns 1 document, you are charged for 11 reads. Because of this additional cost, you should use cursors instead of offsets whenever possible.
Queries other than document reads
For queries other than document reads, such as a request for a list of collection IDs, you are billed for one document read. If fetching the complete set of results requires more than one request (for example, if you are using pagination), you are billed once per request.
Minimum charge for queries
There is a minimum charge of one document read for each query that you perform, even if the query returns no results.
Cloud Firestore Security Rules
For mobile and web client libraries, if your
Cloud Firestore Security Rules use exists()
, get()
, or getAfter()
to read
one or more documents from your database, you are charged for additional reads
as follows:
You are charged for reads that are necessary to evaluate your Cloud Firestore Security Rules.
For example, if your rules refer to three documents, but Cloud Firestore only has to read two of those documents to evaluate your rules, you will be charged for two additional reads for the dependent documents.
You are only charged one read per dependent document even if your rules refer to that document more than once.
You are charged for rule evaluation only once per request.
As a result, it can cost less to read multiple documents than to read documents one at a time, because reading multiple documents requires fewer requests.
When you listen to the results of a query, you are charged for rule evaluation in all of the following cases:
- When you issue the query.
- Each time the query results are updated.
- Any time the user's device goes offline, then comes back online.
- Any time you update your rules.
- Any time you update the dependent documents in your rules.
Database storage size
You are charged for the amount of data that you store in Cloud Firestore, including storage overhead. The amount of overhead includes metadata, automatic indexes, and composite indexes.
Each document stored in Cloud Firestore requires the following metadata:
- The document ID, including the collection ID and the document name.
- The name and value of each field. Because Cloud Firestore is schemaless, the name of each field in a document must be stored with the field value.
- Any single-field and composite indexes that refer to the document. Each index entry contains the collection ID; any number of field values, depending on the index definition; and the document name.
Storage costs are in GiB/month and calculated daily. Cloud Firestore measures the database size daily. Over the period of a month, these sample points are averaged to calculate the database storage size. This average value is multiplied by the unit price of storage (GiB-month)
Learn how Cloud Firestore storage is calculated at Storage Size Calculations.
PITR data
If you enable PITR, you are charged for the storage of PITR data. Most customers will find that the overall cost of PiTR data storage is similar to the storage cost of the database.
Storage costs for PITR are in GiB/month and calculated daily. Cloud Firestore measures the database size daily. Over the period of a month, these sample points are averaged to calculate the database storage size. This average value is multiplied by the unit price of PITR (GiB-month).
For example, if the average size of your database during a month is 1 GiB and PITR is enabled for the whole month, then the billable PITR data size is 1 GiB as well.
Minimum billing: You may be charged up to 1 day of PITR storage cost even if you disable PITR within a day after enablement.
Backup data and restore operations
If you enable backups, you are charged for the storage of your database backups. The storage size for a backup is equal to the storage size of the database when the backup was taken.
Storage costs for backups are in GiB/month. Over the period of a month, the number of days for which each backup is retained, averaged over the month is also calculated. The cost of each backup is calculated using the storage size of the backup multiplied by the proportion of the month the backup is retained, multiplied by the unit price. Day boundaries are defined by the America/Los_Angeles time zone for billing purposes.
When you perform a restore operation, Cloud Firestore measures the size of the backup for the restore operation. The size of the backup is multiplied by the unit price of restore operations (GiB).
Query Explain
Use of Firestore Query Explain incurs costs.
When a query is explained with the default option, no index read operations are performed. Regardless of query complexity, one read operation is charged.
When a query is explained with the analyze option, index and read operations are performed, so you are charged for the query as usual. There is no additional charge for the explain and analyze activity, only the usual charge for the query being executed.
Network bandwidth
You are charged for the network bandwidth used by your Cloud Firestore requests, as shown in the following sections. The network bandwidth cost of a Cloud Firestore request depends on the request’s response size, the location of your Cloud Firestore database, and the destination of the response.
Cloud Firestore calculates response size based on a serialized message format. Protocol overhead, such as SSL overhead, does not count towards network bandwidth usage. Requests denied by your Cloud Firestore Security Rules do not count towards network bandwidth usage.
To learn how much network bandwidth you have used, you can use the Google Cloud console to export your billing data to a file.
General network pricing
For requests that originate within Google Cloud Platform (for example, from an application running on Google Compute Engine), you are charged as follows:
Traffic type | Price |
---|---|
Inbound data transfer | Free |
Data transfer within a region | Free |
Data transfer between regions in the same multi-region | Free |
Data transfer between regions within the US (per GiB) | $0.01 (first 10 GiB per month are free) |
Data transfer between regions, not including traffic between US regions | Google Cloud Platform outbound internet data transfer rates |
If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.
Cloud Firestore is also subject to additional internet egress charges for the following:
- Google Cloud requests between regions, not including traffic between US regions
- Requests from outside of Google Cloud (for example, from a user's mobile device)
See Google Cloud internet egress rates.
See a pricing example
To see how Cloud Firestore billing costs accrue in a real-world sample app, see the Cloud Firestore billing example.
Manage spending
To help avoid unexpected charges on your bill, set monthly budgets and alerts using Google Cloud's billing console.
To monitor your Cloud Firestore usage, open the Cloud Firestore Usage tab in the Firebase Console. Use the dashboard to gauge your usage over different time periods.