DatasetCollectionClientAsync
Hierarchy
- ResourceClientAsync
- DatasetCollectionClientAsync
Index
Methods
Properties
Methods
__init__
Initialize the resource client.
Parameters
keyword-onlybase_url: str
API base URL.
keyword-onlypublic_base_url: str
Public CDN base URL.
keyword-onlyhttp_client: HttpClientAsync
HTTP client for making requests.
keyword-onlyresource_path: str
Resource endpoint path (e.g., 'actors', 'datasets').
keyword-onlyclient_registry: ClientRegistryAsync
Bundle of client classes for dependency injection.
optionalkeyword-onlyresource_id: str | None = None
Optional resource ID for single-resource clients.
optionalkeyword-onlyparams: dict | None = None
Optional default parameters for all requests.
Returns None
get_or_create
Retrieve a named dataset, or create a new one when it doesn't exist.
https://docs.apify.com/api/v2#/reference/datasets/dataset-collection/create-dataset
Parameters
optionalkeyword-onlyname: str | None = None
The name of the dataset to retrieve or create.
optionalkeyword-onlyschema: dict | None = None
The schema of the dataset.
optionalkeyword-onlytimeout: Timeout = 'short'
Timeout for the API HTTP request.
Returns Dataset
The retrieved or newly-created dataset.
iterate
Iterate over the available datasets.
Simple
listdoes only one API call, possibly not listing all items matching the criteria. This method returns an iterator that is capable of making multiple API calls to retrieve all items matching the criteria.https://docs.apify.com/api/v2#/reference/datasets/dataset-collection/get-list-of-datasets
Parameters
optionalkeyword-onlyunnamed: bool | None = None
Whether to include unnamed datasets in the list.
optionalkeyword-onlylimit: int | None = None
How many datasets to retrieve.
optionalkeyword-onlyoffset: int | None = None
What dataset to include as first when retrieving the list.
optionalkeyword-onlydesc: bool | None = None
Whether to sort the datasets in descending order based on their modification date.
optionalkeyword-onlyownership: StorageOwnership | None = None
Filter by ownership. 'ownedByMe' returns only user's own datasets, 'sharedWithMe' returns only datasets shared with the user.
optionalkeyword-onlytimeout: Timeout = 'medium'
Timeout for the API HTTP request.
Returns AsyncIterator[DatasetListItem]
list
List the available datasets.
https://docs.apify.com/api/v2#/reference/datasets/dataset-collection/get-list-of-datasets
Parameters
optionalkeyword-onlyunnamed: bool | None = None
Whether to include unnamed datasets in the list.
optionalkeyword-onlylimit: int | None = None
How many datasets to retrieve.
optionalkeyword-onlyoffset: int | None = None
What dataset to include as first when retrieving the list.
optionalkeyword-onlydesc: bool | None = None
Whether to sort the datasets in descending order based on their modification date.
optionalkeyword-onlyownership: StorageOwnership | None = None
Filter by ownership.
'ownedByMe'returns only user's own datasets,'sharedWithMe'returns only datasets shared with the user.optionalkeyword-onlytimeout: Timeout = 'medium'
Timeout for the API HTTP request.
Returns ListOfDatasets
The list of available datasets matching the specified filters.
Properties
resource_id
Get the resource ID.
Sub-client for the dataset collection.
Provides methods to manage the dataset collection, e.g. list or create datasets. Obtain an instance via an appropriate method on the
ApifyClientAsyncclass.