Firestore REST API
Cloud-native NoSQL document database from Google Firebase
Firestore is a flexible, scalable NoSQL cloud database to store and sync data for client- and server-side development. It offers seamless integration with Firebase and Google Cloud, real-time synchronization, offline support, and automatic multi-region replication. Developers use Firestore for building mobile, web, and server applications that require real-time data updates and robust querying capabilities.
https://firestore.googleapis.com/v1
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /projects/{projectId}/databases/{databaseId}/documents/{documentPath} | Retrieve a single document by its path |
| POST | /projects/{projectId}/databases/{databaseId}/documents/{collectionId} | Create a new document in a collection |
| PATCH | /projects/{projectId}/databases/{databaseId}/documents/{documentPath} | Update an existing document with partial fields |
| DELETE | /projects/{projectId}/databases/{databaseId}/documents/{documentPath} | Delete a document from a collection |
| POST | /projects/{projectId}/databases/{databaseId}/documents:runQuery | Execute a structured query against the database |
| POST | /projects/{projectId}/databases/{databaseId}/documents:batchGet | Retrieve multiple documents in a single batch request |
| POST | /projects/{projectId}/databases/{databaseId}/documents:batchWrite | Perform multiple write operations in a single batch |
| POST | /projects/{projectId}/databases/{databaseId}/documents:beginTransaction | Start a new transaction for atomic operations |
| POST | /projects/{projectId}/databases/{databaseId}/documents:commit | Commit a transaction with multiple write operations |
| POST | /projects/{projectId}/databases/{databaseId}/documents:rollback | Rollback an active transaction |
| GET | /projects/{projectId}/databases/{databaseId}/documents/{collectionId} | List all documents in a collection with optional filtering |
| POST | /projects/{projectId}/databases/{databaseId}/documents:listen | Establish a streaming connection for real-time updates |
| GET | /projects/{projectId}/databases/{databaseId}/collectionGroups/{collectionId}/indexes | List indexes for a collection group |
| POST | /projects/{projectId}/databases/{databaseId}:exportDocuments | Export documents to Google Cloud Storage |
| POST | /projects/{projectId}/databases/{databaseId}:importDocuments | Import documents from Google Cloud Storage |
Sponsor this page
AvailableReach developers actively building with Firestore. See live pageview data and self-serve checkout — your slot goes live in minutes.
View inventory & pricing →Code Examples
curl -X GET \
'https://firestore.googleapis.com/v1/projects/my-project/databases/(default)/documents/users/user123' \
-H 'Authorization: Bearer ya29.a0AfH6SMBx...' \
-H 'Content-Type: application/json'
Use Firestore from Claude / Cursor / ChatGPT
Get a hosted MCP endpoint for Firestore. Paste your Firestore API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls Firestore directly with your credentials — no local install, works on mobile.
query_documents
Execute structured queries against Firestore collections with filtering, sorting, and pagination support
create_document
Create new documents in specified collections with automatic ID generation or custom document IDs
update_document
Update existing documents with field-level updates, merge operations, and transaction support
batch_operations
Perform multiple read or write operations in a single atomic batch request
manage_indexes
Create, list, and manage composite indexes for optimizing complex queries
Connect in 60 seconds
Paste your Firestore key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.
Connect Firestore to your AI →