Skip to main content
Version: 2

ActorCollectionClient

Client for managing the collection of Actors in your account.

Provides methods to list and create Actors. To access an individual Actor, use the actor() method on the main ApifyClient.

Hierarchy

  • ResourceCollectionClient
    • ActorCollectionClient
const client = new ApifyClient({ token: 'my-token' });
const actorsClient = client.actors();

// List all Actors
const { items } = await actorsClient.list();

// Create a new Actor
const newActor = await actorsClient.create({
name: 'my-actor',
title: 'My Actor'
});

Index

Properties

inheritedapifyClient

apifyClient: ApifyClient

inheritedbaseUrl

baseUrl: string

inheritedhttpClient

httpClient: HttpClient

optionalinheritedid

id?: string

optionalinheritedparams

params?: Record<string, unknown>

inheritedpublicBaseUrl

publicBaseUrl: string

inheritedresourcePath

resourcePath: string

optionalinheritedsafeId

safeId?: string

inheritedurl

url: string

Methods

create

  • create(actor): Promise<Actor>

list