Firestore client libraries

This page describes the SDKS and client libraries available for the Firestore API. While you can make direct HTTP and RPC calls to the Firestore API, the Firestore client libraries implement best practices for you and make it easier to access your database.

Firestore supports mobile/web SDKs and server client libraries.

Mobile and web SDKs

Firestore supports SDKs for Android, IOS, and Web. Combined with Firestore security rules and Firebase Auth, the mobile and web SDKs support serverless app architectures where clients connect directly to your Firestore database. With a serverless architecture, you do not need to maintain an intermediary server between your clients and your Firestore database.

The mobile and web SDKs also support realtime updates and offline data persistence.

To get started with the Android, iOS, or Web SDK see the Quickstart using a Mobile/Web Client Library.

References and resources

For more on each SDK see the following resources:

Server client libraries

Firestore supports server client libraries for C#, Go, Java, Node.js, PHP, Python, and Ruby. Use these client libraries to set up privileged server environments.

Unlike the Mobile and Web SDKs, the server client libraries create a privileged Firestore environment with full access to your database. In this environment, requests are not evaluated against your Firestore security rules. Privileged Firestore servers are secured using Identity and Access Management (IAM), see Security for server client libraries.

Use the server client libraries for administrative database tasks or if you prefer an architecture with an intermediary server between your users and your Firestore database.

Firestore server client libraries are available as Firebase Admin SDKs and as Google Cloud client libraries. Both sets of libraries provide the same Firestore features. The Firebase Admin SDKs bundle access to Firestore and several other Firebase products, like Firebase Auth and Firebase Cloud Messaging, in a single library.

Firebase Admin SDKs

The Firebase Admin SDKs bundle the Google Cloud client libraries for Firestore alongside client libraries and SDKs for several other Firebase features. Using one of the Admin SDKs, you can initialize access to Firestore and several other services from a single SDK. The Firebase Admin SDKs support Firestore access in Java, Python, Node.js, and Go.

To get started with a Firebase Admin SDK, see Add the Firebase Admin SDK to Your Server.

References and resources

For more on each Firebase Admin SDK see the following resources:

Google Cloud client libraries

The Google Cloud client libraries support Firestore access in Java, Python, Node.js, Go, PHP, C#, and Ruby. To get started with one of the Google Cloud client libraries, see the Quickstart using a Server Client Library.

References and resources

For more on each Google Cloud client library for Firestore see the following resources:

Third-party library integrations

Firestore offers a number of integrations with open-source libraries in addition to the mobile/web SDKs and server client libraries, see Library and framework integrations.