ActorClient
Hierarchy
- ResourceClient
- ActorClient
Index
Properties
inheritedapifyClient
inheritedbaseUrl
inheritedhttpClient
optionalinheritedid
optionalinheritedparams
inheritedpublicBaseUrl
inheritedresourcePath
optionalinheritedsafeId
inheritedurl
Methods
build
Builds the Actor.
Creates a new build of the specified Actor version. The build compiles the Actor's source code, installs dependencies, and prepares it for execution.
Parameters
versionNumber: string
Version number or tag to build (e.g.,
'0.1','0.2','latest')options: ActorBuildOptions = {}
Build configuration options
Returns Promise<Build>
The Build object with status and build details
builds
Returns a client for managing builds of this Actor.
Returns BuildCollectionClient
A client for the Actor's build collection
call
Starts the Actor and waits for it to finish before returning the Run object.
This is a convenience method that starts the Actor run and waits for its completion by polling the run status. It optionally streams logs to the console or a custom Log instance. By default, it waits indefinitely unless the
waitSecsoption is provided.Parameters
optionalinput: unknown
Input for the Actor. Can be any JSON-serializable value (object, array, string, number). If
contentTypeis specified in options, input should be a string or Buffer.options: ActorCallOptions = {}
Run configuration options (extends all options from start)
Returns Promise<ActorRun>
The finished Actor run object with final status (
SUCCEEDED,FAILED,ABORTED, orTIMED-OUT)
defaultBuild
Retrieves the default build of the Actor.
Parameters
options: BuildClientGetOptions = {}
Options for getting the build.
Returns Promise<BuildClient>
A client for the default build.
delete
Deletes the Actor.
Returns Promise<void>
get
Gets the Actor object from the Apify API.
Returns Promise<undefined | Actor>
The Actor object, or
undefinedif it does not exist
lastRun
Returns a client for the last run of this Actor.
Provides access to the most recent Actor run, optionally filtered by status or origin.
Parameters
options: ActorLastRunOptions = {}
Options to filter the last run
Returns RunClient
A client for the last run
runs
Returns a client for managing runs of this Actor.
Returns RunCollectionClient
A client for the Actor's run collection
start
Starts the Actor and immediately returns the Run object.
The Actor run can be configured with optional input and various options. The run starts asynchronously and this method returns immediately without waiting for completion. Use the call method if you want to wait for the Actor to finish.
Parameters
optionalinput: unknown
Input for the Actor. Can be any JSON-serializable value (object, array, string, number). If
contentTypeis specified in options, input should be a string or Buffer.options: ActorStartOptions = {}
Run configuration options
Returns Promise<ActorRun>
The Actor run object with status, usage, and storage IDs
update
Updates the Actor with specified fields.
Parameters
newFields: Partial<Pick<Actor, name | description | isPublic | isDeprecated | seoTitle | seoDescription | title | restartOnError | versions | categories | defaultRunOptions | actorStandby>>
Fields to update in the Actor
Returns Promise<Actor>
The updated Actor object
version
Returns a client for a specific version of this Actor.
Parameters
versionNumber: string
Version number (e.g., '0.1', '1.2.3')
Returns ActorVersionClient
A client for the specified Actor version
versions
Returns a client for managing versions of this Actor.
Returns ActorVersionCollectionClient
A client for the Actor's version collection
webhooks
Returns a client for managing webhooks associated with this Actor.
Returns WebhookCollectionClient
A client for the Actor's webhook collection
Client for managing a specific Actor.
Provides methods to start, call, build, update, and delete an Actor, as well as manage its versions, builds, runs, and webhooks.
https://docs.apify.com/platform/actors