ActorClientAsync
Hierarchy
- ResourceClientAsync- ActorClientAsync
 
Index
Methods
__init__
- Initialize a new instance. - Parameters- keyword-onlybase_url: str- Base URL of the API server. 
- keyword-onlyroot_client: ApifyClientAsync- The ApifyClientAsync instance under which this resource client exists. 
- keyword-onlyhttp_client: HTTPClientAsync- The HTTPClientAsync instance to be used in this client. 
- optionalkeyword-onlyresource_id: str | None = None- ID of the manipulated resource, in case of a single-resource client. 
- keyword-onlyresource_path: str- Path to the resource's endpoint on the API server. 
- optionalkeyword-onlyparams: dict | None = None- Parameters to include in all requests from this client. 
 - Returns None
build
- Parameters- keyword-onlyversion_number: str- Actor version number to be built. 
- optionalkeyword-onlybeta_packages: bool | None = None- If True, then the Actor is built with beta versions of Apify NPM packages. By default, the build uses latest stable packages. 
- optionalkeyword-onlytag: str | None = None- Tag to be applied to the build on success. By default, the tag is taken from the Actor version's build tag property. 
- optionalkeyword-onlyuse_cache: bool | None = None- If true, the Actor's Docker container will be rebuilt using layer cache (https://docs.docker.com/develop/develop-images/dockerfile_best-practices/`leverage`-build-cache). This is to enable quick rebuild during development. By default, the cache is not used. 
- optionalkeyword-onlywait_for_finish: int | None = None- The maximum number of seconds the server waits for the build to finish before returning. By default it is 0, the maximum value is 60. 
 - Returns dict
builds
- Retrieve a client for the builds of this Actor. - Returns BuildCollectionClientAsync
call
- Start the Actor and wait for it to finish before returning the Run object. - It waits indefinitely, unless the wait_secs argument is provided. - https://docs.apify.com/api/v2#/reference/actors/run-collection/run-actor - Parameters- optionalkeyword-onlyrun_input: Any = None- The input to pass to the Actor run. 
- optionalkeyword-onlycontent_type: str | None = None- The content type of the input. 
- optionalkeyword-onlybuild: str | None = None- Specifies the Actor build to run. It can be either a build tag or build number. By default, the run uses the build specified in the default run configuration for the Actor (typically latest). 
- optionalkeyword-onlymax_items: int | None = None- Maximum number of results that will be returned by this run. If the Actor is charged per result, you will not be charged for more results than the given limit. 
- optionalkeyword-onlymax_total_charge_usd: Decimal | None = None- A limit on the total charged amount for pay-per-event actors. 
- optionalkeyword-onlyrestart_on_error: bool | None = None- If true, the Actor run process will be restarted whenever it exits with a non-zero status code. 
- optionalkeyword-onlymemory_mbytes: int | None = None- Memory limit for the run, in megabytes. By default, the run uses a memory limit specified in the default run configuration for the Actor. 
- optionalkeyword-onlytimeout_secs: int | None = None- Optional timeout for the run, in seconds. By default, the run uses timeout specified in the default run configuration for the Actor. 
- optionalkeyword-onlywebhooks: list[dict] | None = None- Optional webhooks (https://docs.apify.com/webhooks) associated with the Actor run, which can be used to receive a notification, e.g. when the Actor finished or failed. If you already have a webhook set up for the Actor, you do not have to add it again here. 
- optionalkeyword-onlyforce_permission_level: ActorPermissionLevel | None = None- Override the Actor's permissions for this run. If not set, the Actor will run with permissions configured in the Actor settings. 
- optionalkeyword-onlywait_secs: int | None = None- The maximum number of seconds the server waits for the run to finish. If not provided, waits indefinitely. 
- optionalkeyword-onlylogger: (Logger | None) | Literal[default] = 'default'- Logger used to redirect logs from the Actor run. Using "default" literal means that a predefined default logger will be used. Setting - Nonewill disable any log propagation. Passing custom logger will redirect logs to the provided logger. The logger is also used to capture status and status message of the other Actor run.
 - Returns dict | None
default_build
- Retrieve Actor's default build. - Parameters- optionalkeyword-onlywait_for_finish: int | None = None- The maximum number of seconds the server waits for the build to finish before returning. By default it is 0, the maximum value is 60. 
 - Returns BuildClientAsync
delete
- Returns None
get
- Retrieve the Actor. - https://docs.apify.com/api/v2#/reference/actors/actor-object/get-actor - Returns dict | None
last_run
- Retrieve the client for the last run of this Actor. - Last run is retrieved based on the start time of the runs. - Parameters- optionalkeyword-onlystatus: ActorJobStatus | None = None- Consider only runs with this status. 
- optionalkeyword-onlyorigin: MetaOrigin | None = None- Consider only runs started with this origin. 
 - Returns RunClientAsync
runs
- Retrieve a client for the runs of this Actor. - Returns RunCollectionClientAsync
start
- Start the Actor and immediately return the Run object. - https://docs.apify.com/api/v2#/reference/actors/run-collection/run-actor - Parameters- optionalkeyword-onlyrun_input: Any = None- The input to pass to the Actor run. 
- optionalkeyword-onlycontent_type: str | None = None- The content type of the input. 
- optionalkeyword-onlybuild: str | None = None- Specifies the Actor build to run. It can be either a build tag or build number. By default, the run uses the build specified in the default run configuration for the Actor (typically latest). 
- optionalkeyword-onlymax_items: int | None = None- Maximum number of results that will be returned by this run. If the Actor is charged per result, you will not be charged for more results than the given limit. 
- optionalkeyword-onlymax_total_charge_usd: Decimal | None = None- A limit on the total charged amount for pay-per-event actors. 
- optionalkeyword-onlyrestart_on_error: bool | None = None- If true, the Actor run process will be restarted whenever it exits with a non-zero status code. 
- optionalkeyword-onlymemory_mbytes: int | None = None- Memory limit for the run, in megabytes. By default, the run uses a memory limit specified in the default run configuration for the Actor. 
- optionalkeyword-onlytimeout_secs: int | None = None- Optional timeout for the run, in seconds. By default, the run uses timeout specified in the default run configuration for the Actor. 
- optionalkeyword-onlyforce_permission_level: ActorPermissionLevel | None = None- Override the Actor's permissions for this run. If not set, the Actor will run with permissions configured in the Actor settings. 
- optionalkeyword-onlywait_for_finish: int | None = None- The maximum number of seconds the server waits for the run to finish. By default, it is 0, the maximum value is 60. 
- optionalkeyword-onlywebhooks: list[dict] | None = None- Optional ad-hoc webhooks (https://docs.apify.com/webhooks/ad-hoc-webhooks) associated with the Actor run which can be used to receive a notification, e.g. when the Actor finished or failed. If you already have a webhook set up for the Actor or task, you do not have to add it again here. Each webhook is represented by a dictionary containing these items: - event_types: List of- WebhookEventTypevalues which trigger the webhook.
- request_url: URL to which to send the webhook HTTP request.
- payload_template: Optional template for the request payload.
 
 - Returns dict
update
- Update the Actor with the specified fields. - https://docs.apify.com/api/v2#/reference/actors/actor-object/update-actor - Parameters- optionalkeyword-onlyname: str | None = None- The name of the Actor. 
- optionalkeyword-onlytitle: str | None = None- The title of the Actor (human-readable). 
- optionalkeyword-onlydescription: str | None = None- The description for the Actor. 
- optionalkeyword-onlyseo_title: str | None = None- The title of the Actor optimized for search engines. 
- optionalkeyword-onlyseo_description: str | None = None- The description of the Actor optimized for search engines. 
- optionalkeyword-onlyversions: list[dict] | None = None- The list of Actor versions. 
- optionalkeyword-onlyrestart_on_error: bool | None = None- If true, the Actor run process will be restarted whenever it exits with a non-zero status code. 
- optionalkeyword-onlyis_public: bool | None = None- Whether the Actor is public. 
- optionalkeyword-onlyis_deprecated: bool | None = None- Whether the Actor is deprecated. 
- optionalkeyword-onlyis_anonymously_runnable: bool | None = None- Whether the Actor is anonymously runnable. 
- optionalkeyword-onlycategories: list[str] | None = None- The categories to which the Actor belongs to. 
- optionalkeyword-onlydefault_run_build: str | None = None- Tag or number of the build that you want to run by default. 
- optionalkeyword-onlydefault_run_max_items: int | None = None- Default limit of the number of results that will be returned by runs of this Actor, if the Actor is charged per result. 
- optionalkeyword-onlydefault_run_memory_mbytes: int | None = None- Default amount of memory allocated for the runs of this Actor, in megabytes. 
- optionalkeyword-onlydefault_run_timeout_secs: int | None = None- Default timeout for the runs of this Actor in seconds. 
- optionalkeyword-onlyexample_run_input_body: Any = None- Input to be prefilled as default input to new users of this Actor. 
- optionalkeyword-onlyexample_run_input_content_type: str | None = None- The content type of the example run input. 
- optionalkeyword-onlyactor_standby_is_enabled: bool | None = None- Whether the Actor Standby is enabled. 
- optionalkeyword-onlyactor_standby_desired_requests_per_actor_run: int | None = None- The desired number of concurrent HTTP requests for a single Actor Standby run. 
- optionalkeyword-onlyactor_standby_max_requests_per_actor_run: int | None = None- The maximum number of concurrent HTTP requests for a single Actor Standby run. 
- optionalkeyword-onlyactor_standby_idle_timeout_secs: int | None = None- If the Actor run does not receive any requests for this time, it will be shut down. 
- optionalkeyword-onlyactor_standby_build: str | None = None- The build tag or number to run when the Actor is in Standby mode. 
- optionalkeyword-onlyactor_standby_memory_mbytes: int | None = None- The memory in megabytes to use when the Actor is in Standby mode. 
- optionalkeyword-onlypricing_infos: list[dict] | None = None- A list of objects that describes the pricing of the Actor. 
 - Returns dict
validate_input
- Validate an input for the Actor that defines an input schema. - Parameters- optionalrun_input: Any = None- The input to validate. 
- optionalkeyword-onlybuild_tag: str | None = None- The actor's build tag. 
- optionalkeyword-onlycontent_type: str | None = None- The content type of the input. 
 - Returns bool
version
- Retrieve the client for the specified version of this Actor. - Parameters- version_number: str- The version number for which to retrieve the resource client. 
 - Returns ActorVersionClientAsync
versions
- Retrieve a client for the versions of this Actor. - Returns ActorVersionCollectionClientAsync
webhooks
- Retrieve a client for webhooks associated with this Actor. - Returns WebhookCollectionClientAsync
Async sub-client for manipulating a single Actor.