The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you're developing your own library or partner tool.
Creates and returns a new AsyncQuery that includes all documents in the
database that are contained in a collection or subcollection with the
given collection_id.
>>> query = client.collection_group('mygroup')
Parameter
Name
Description
collection_id
str
Every collection or subcollection with this ID as the last segment of its path will be included. Cannot contain a slash.
If multiple references refer to the same document, the server
will only return one result.
See xref_field_path for
more information on field paths.
If a transaction is used and it already has write operations
added, this method cannot be used (i.e. read-after-write is not
allowed).
Parameters
Name
Description
references
List[.AsyncDocumentReference, ...]
Iterable of document references to be retrieved.
field_paths
Optional[Iterable[str, ...]]
An iterable of field paths (.-delimited list of field names) to use as a projection of document fields in the returned results. If no value is provided, all fields will be returned.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Class AsyncClient (2.21.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.21.0 (latest)](/python/docs/reference/firestore/latest/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.20.2](/python/docs/reference/firestore/2.20.2/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.19.0](/python/docs/reference/firestore/2.19.0/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.18.0](/python/docs/reference/firestore/2.18.0/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.17.2](/python/docs/reference/firestore/2.17.2/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.16.1](/python/docs/reference/firestore/2.16.1/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.15.0](/python/docs/reference/firestore/2.15.0/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.14.0](/python/docs/reference/firestore/2.14.0/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.13.1](/python/docs/reference/firestore/2.13.1/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.12.0](/python/docs/reference/firestore/2.12.0/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.11.1](/python/docs/reference/firestore/2.11.1/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.10.1](/python/docs/reference/firestore/2.10.1/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.9.1](/python/docs/reference/firestore/2.9.1/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.8.0](/python/docs/reference/firestore/2.8.0/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.7.3](/python/docs/reference/firestore/2.7.3/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.6.1](/python/docs/reference/firestore/2.6.1/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.5.3](/python/docs/reference/firestore/2.5.3/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.4.0](/python/docs/reference/firestore/2.4.0/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.3.4](/python/docs/reference/firestore/2.3.4/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.2.0](/python/docs/reference/firestore/2.2.0/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.1.3](/python/docs/reference/firestore/2.1.3/google.cloud.firestore_v1.async_client.AsyncClient)\n- [2.0.2](/python/docs/reference/firestore/2.0.2/google.cloud.firestore_v1.async_client.AsyncClient)\n- [1.9.2](/python/docs/reference/firestore/1.9.2/google.cloud.firestore_v1.async_client.AsyncClient)\n- [1.8.1](/python/docs/reference/firestore/1.8.1/google.cloud.firestore_v1.async_client.AsyncClient)\n- [1.7.0](/python/docs/reference/firestore/1.7.0/google.cloud.firestore_v1.async_client.AsyncClient)\n- [1.6.2](/python/docs/reference/firestore/1.6.2/google.cloud.firestore_v1.async_client.AsyncClient)\n- [1.5.0](/python/docs/reference/firestore/1.5.0/google.cloud.firestore_v1.async_client.AsyncClient)\n- [1.4.0](/python/docs/reference/firestore/1.4.0/google.cloud.firestore_v1.async_client.AsyncClient)\n- [1.3.0](/python/docs/reference/firestore/1.3.0/google.cloud.firestore_v1.async_client.AsyncClient) \n\n AsyncClient(project=None, credentials=None, database=None, client_info=\u003cgoogle.api_core.gapic_v1.client_info.ClientInfo object\u003e, client_options=None)\n\nClient for interacting with Google Cloud Firestore API.\n| **Note:** Since the Cloud Firestore API requires the gRPC transport, no `_http` argument is accepted by this class.\n\nMethods\n-------\n\n### batch\n\n batch() -\u003e google.cloud.firestore_v1.async_batch.AsyncWriteBatch\n\nGet a batch instance from this client.\n\n### collection\n\n collection(\n *collection_path: str,\n ) -\u003e google.cloud.firestore_v1.async_collection.AsyncCollectionReference\n\nGet a reference to a collection.\n\nFor a top-level collection: \n\n \u003e\u003e\u003e client.collection('top')\n\nFor a sub-collection: \n\n \u003e\u003e\u003e client.collection('mydocs/doc/subcol')\n \u003e\u003e\u003e # is the same as\n \u003e\u003e\u003e client.collection('mydocs', 'doc', 'subcol')\n\nSub-collections can be nested deeper in a similar fashion.\n\n### collection_group\n\n collection_group(\n collection_id: str,\n ) -\u003e google.cloud.firestore_v1.async_query.AsyncCollectionGroup\n\nCreates and returns a new AsyncQuery that includes all documents in the\ndatabase that are contained in a collection or subcollection with the\ngiven collection_id. \n\n \u003e\u003e\u003e query = client.collection_group('mygroup')\n\n### collections\n\n collections(\n retry: (\n google.api_core.retry.retry_unary_async.AsyncRetry | object | None\n ) = _MethodDefault._DEFAULT_VALUE,\n timeout: typing.Optional[float] = None,\n ) -\u003e typing.AsyncGenerator[\n google.cloud.firestore_v1.async_collection.AsyncCollectionReference, typing.Any\n ]\n\nList top-level collections of the client's database.\n\n### document\n\n document(\n *document_path: str,\n ) -\u003e google.cloud.firestore_v1.async_document.AsyncDocumentReference\n\nGet a reference to a document in a collection.\n\nFor a top-level document: \n\n \u003e\u003e\u003e client.document('collek/shun')\n \u003e\u003e\u003e # is the same as\n \u003e\u003e\u003e client.document('collek', 'shun')\n\nFor a document in a sub-collection: \n\n \u003e\u003e\u003e client.document('mydocs/doc/subcol/child')\n \u003e\u003e\u003e # is the same as\n \u003e\u003e\u003e client.document('mydocs', 'doc', 'subcol', 'child')\n\nDocuments in sub-collections can be nested deeper in a similar fashion.\n\n### get_all\n\n get_all(\n references: typing.List[\n google.cloud.firestore_v1.async_document.AsyncDocumentReference\n ],\n field_paths: typing.Optional[typing.Iterable[str]] = None,\n transaction: typing.Optional[\n google.cloud.firestore_v1.async_transaction.AsyncTransaction\n ] = None,\n retry: (\n google.api_core.retry.retry_unary_async.AsyncRetry | object | None\n ) = _MethodDefault._DEFAULT_VALUE,\n timeout: typing.Optional[float] = None,\n ) -\u003e typing.AsyncGenerator[\n google.cloud.firestore_v1.base_document.DocumentSnapshot, typing.Any\n ]\n\nRetrieve a batch of documents.\n\n\u003cbr /\u003e\n\n| **Note:** Documents returned by this method are not guaranteed to be returned in the same order that they are given in `references`.\nIf multiple `references` refer to the same document, the server will only return one result.\n\n\u003cbr /\u003e\n\nSee xref_field_path for\nmore information on **field paths**.\n\nIf a `transaction` is used and it already has write operations\nadded, this method cannot be used (i.e. read-after-write is not\nallowed).\n\n### recursive_delete\n\n recursive_delete(\n reference: Union[AsyncCollectionReference, AsyncDocumentReference],\n *,\n bulk_writer: Optional[\"BulkWriter\"] = None,\n chunk_size: int = 5000\n ) -\u003e int\n\nDeletes documents and their subcollections, regardless of collection\nname.\n\nPassing an AsyncCollectionReference leads to each document in the\ncollection getting deleted, as well as all of their descendents.\n\nPassing an AsyncDocumentReference deletes that one document and all of\nits descendents.\n\n### transaction\n\n transaction(\n **kwargs,\n ) -\u003e google.cloud.firestore_v1.async_transaction.AsyncTransaction\n\nGet a transaction that uses this client.\n\nSee xref_AsyncTransaction for\nmore information on transactions and the constructor arguments."]]