ActorClient
Index
Methods
build
Parameters
keyword-onlyversion_number: str
Actor version number to be built.
keyword-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.
keyword-onlytag: str | None = None
Tag to be applied to the build on success. By default, the tag is taken from the Actor version's buildTag property.
keyword-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.
keyword-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
The build object
builds
Retrieve a client for the builds of this Actor.
Returns BuildCollectionClient
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
keyword-onlyrun_input: Any = None
The input to pass to the Actor run.
keyword-onlycontent_type: str | None = None
The content type of the input.
keyword-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).
keyword-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.
keyword-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.
keyword-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.
keyword-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.
keyword-onlywait_secs: int | None = None
The maximum number of seconds the server waits for the run to finish. If not provided, waits indefinitely.
Returns dict | None
The run object
delete
Returns None
get
Retrieve the Actor.
https://docs.apify.com/api/v2#/reference/actors/actor-object/get-actor
Returns dict | None
The retrieved Actor
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
keyword-onlystatus: ActorJobStatus | None = None
Consider only runs with this status.
keyword-onlyorigin: MetaOrigin | None = None
Consider only runs started with this origin.
Returns RunClient
The resource client for the last run of this Actor.
runs
Retrieve a client for the runs of this Actor.
Returns RunCollectionClient
start
Start the Actor and immediately return the Run object.
https://docs.apify.com/api/v2#/reference/actors/run-collection/run-actor
Parameters
keyword-onlyrun_input: Any = None
The input to pass to the Actor run.
keyword-onlycontent_type: str | None = None
The content type of the input.
keyword-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).
keyword-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.
keyword-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.
keyword-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.
keyword-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.
keyword-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`WebhookEventType`
values which trigger the webhook *`request_url`
: URL to which to send the webhook HTTP request *`payload_template`
(optional): Optional template for the request payload
Returns dict
The run object
update
Update the Actor with the specified fields.
https://docs.apify.com/api/v2#/reference/actors/actor-object/update-actor
Parameters
keyword-onlyname: str | None = None
The name of the Actor
keyword-onlytitle: str | None = None
The title of the Actor (human-readable)
keyword-onlydescription: str | None = None
The description for the Actor
keyword-onlyseo_title: str | None = None
The title of the Actor optimized for search engines
keyword-onlyseo_description: str | None = None
The description of the Actor optimized for search engines
keyword-onlyversions: list[dict] | None = None
The list of Actor versions
keyword-onlyrestart_on_error: bool | None = None
If true, the main Actor run process will be restarted whenever it exits with a non-zero status code.
keyword-onlyis_public: bool | None = None
Whether the Actor is public.
keyword-onlyis_deprecated: bool | None = None
Whether the Actor is deprecated.
keyword-onlyis_anonymously_runnable: bool | None = None
Whether the Actor is anonymously runnable.
keyword-onlycategories: list[str] | None = None
The categories to which the Actor belongs to.
keyword-onlydefault_run_build: str | None = None
Tag or number of the build that you want to run by default.
keyword-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.
keyword-onlydefault_run_memory_mbytes: int | None = None
Default amount of memory allocated for the runs of this Actor, in megabytes.
keyword-onlydefault_run_timeout_secs: int | None = None
Default timeout for the runs of this Actor in seconds.
keyword-onlyexample_run_input_body: Any = None
Input to be prefilled as default input to new users of this Actor.
keyword-onlyexample_run_input_content_type: str | None = None
The content type of the example run input.
keyword-onlyactor_standby_is_enabled: bool | None = None
Whether the Actor Standby is enabled.
keyword-onlyactor_standby_desired_requests_per_actor_run: int | None = None
The desired number of concurrent HTTP requests for a single Actor Standby run.
keyword-onlyactor_standby_max_requests_per_actor_run: int | None = None
The maximum number of concurrent HTTP requests for a single Actor Standby run.
keyword-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.
keyword-onlyactor_standby_build: str | None = None
The build tag or number to run when the Actor is in Standby mode.
keyword-onlyactor_standby_memory_mbytes: int | None = None
The memory in megabytes to use when the Actor is in Standby mode.
Returns dict
The updated Actor
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 ActorVersionClient
The resource client for the specified Actor version.
versions
Retrieve a client for the versions of this Actor.
Returns ActorVersionCollectionClient
webhooks
Retrieve a client for webhooks associated with this Actor.
Returns WebhookCollectionClient
Sub-client for manipulating a single Actor.