Cloud Firestore Pricing

This document explains Cloud Firestore pricing details. It also tells you how to limit and monitor your spending on Cloud Firestore.

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 reads, writes, and deletes that you perform.
  • 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 gigabytes (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.

Pricing by location

The following table lists pricing for reads, writes, deletes, and storage for each Cloud Firestore location:

US (multi-region) Los Angeles Montreal South Carolina Northern Virginia São Paulo Europe (multi-region) London Zürich Frankfurt Mumbai Hong Kong Tokyo Osaka Sydney
Free quota per day Price beyond the free quota (per unit) Price unit
Document Reads 50,000 per 100,000 documents
Document Writes 20,000 per 100,000 documents
Document Deletes 20,000 per 100,000 documents
Stored Data 1 GB storage GB/Month

If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.

Reads, writes, and deletes

You are charged for each document read, write, and delete that you perform with Cloud Firestore.

Charges for writes and deletes are straightforward. For writes, each set or update operation counts a single write.

Charges for reads have some nuances that you should keep in mind. The following sections explain these nuances in detail.

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.)

Also, if the listener is disconnected for more than 30 minutes (for example, if the user goes offline), you will be charged for reads as if you had issued a brand-new query.

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.

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.

Learn how Cloud Firestore storage is calculated at Storage Size Calculations. You can view the amount of storage that your database uses by visiting the App Engine Quota Details page in the GCP Console.

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 GCP 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
Ingress Free
Egress within a region Free
Egress between regions in the same multi-region Free
Egress between regions within the US (per GiB) $0.01 (first 10 GiB per month are free)
Egress between regions, not including traffic between US regions Google Cloud Platform internet egress rates

If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.

Internet egress rates

You will be charged for internet egress for the following:

  • Google Cloud Platform requests between regions, not including traffic between US regions
  • Requests from outside of Google Cloud Platform (for example, from a user's mobile device)

Iowa (us-central1) Los Angeles (us-west2) Oregon (us-west1) Northern Virginia (us-east4) South Carolina (us-east1) Montréal (northamerica-northeast1) São Paulo (southamerica-east1) Belgium (europe-west1) Frankfurt (europe-west3) London (europe-west2) Netherlands (europe-west4) Zürich (europe-west6) Mumbai (asia-south1) Singapore (asia-southeast1) Sydney (australia-southeast1) Hong Kong (asia-east2) Taiwan (asia-east1) Tokyo (asia-northeast1) Osaka (asia-northeast2)
Monthly Usage Network (Egress)
Worldwide Destinations
(excluding China & Australia,
but including Hong Kong)
(per GB)
Network (Egress)
China Destinations
(excluding Hong Kong)
(per GB)
Network (Egress)
Australia Destinations
(per GB)
Network (Ingress)
0-10 GB Free Free Free Free
10 GB-1 TB $0.23 $0.19 Free
1-10 TB $0.22 $0.18 Free
10+ TB $0.20 $0.15 Free
If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.

Monitoring usage

You can view your daily Cloud Firestore usage in the App Engine Quotas page:

Go to the Quotas page

Managing spending

There are multiple ways to manage your spending on Cloud Firestore:

  • To manage your spending on storage costs and database operations, set a daily App Engine spending limit.
  • To manage your spending on network bandwidth costs, use Google Cloud Platform's ability to set monthly budgets and alerts.

The following sections provide more details.

App Engine spending limit

App Engine allows you to set a daily spending limit on App Engine and its associated resources, which include Cloud Datastore and Cloud Firestore databases. The limit is approximate and should be large enough to handle spikes in resource usage. After you exceed the daily spending limit, all Cloud Firestore operations that are not within your free quota will fail.

To set a daily spending limit, use the GCP Console to enable billing for your GCP project, then follow these steps:

  1. In the GCP Console, open the App Engine Application settings page.

    Open the Application settings page

  2. Click Edit, then specify a spending limit.

  3. Click Save. The new limit takes effect immediately.

If you use Cloud Firestore with more than one GCP project, repeat these steps for each of your projects.

Google Cloud Platform budgets and alerts

GCP allows you to set a monthly budget for all GCP services. Use a monthly budget to monitor your overall GCP costs, including your network bandwidth costs for Cloud Firestore. After you set a budget, you can set alerts, which cause you to receive email notifications as your costs grow closer to your budget.

Costs that count towards your App Engine spending limit also count towards your monthly budget.

Follow these instructions to set a monthly budget and create alerts in the GCP Console.

Pricing example

To see how Cloud Firestore billing costs accrue in a real-world sample app, see the Cloud Firestore billing example.

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Firestore