ApifyClient
Index
Constructors
constructor
Parameters
options: ApifyClientOptions = {}
Returns ApifyClient
Properties
baseUrl
httpClient
logger
publicBaseUrl
stats
optionaltoken
Methods
actor
Returns a client for a specific Actor.
Use this to get, update, delete, start, or call an Actor, as well as manage its builds, runs, versions, and webhooks.
Parameters
id: string
Actor ID or username/name
Returns ActorClient
A client for the specific Actor
actors
Returns a client for managing Actors in your account.
Provides access to the Actor collection, allowing you to list, create, and search for Actors.
Returns ActorCollectionClient
A client for the Actors collection
build
Returns a client for a specific Actor build.
Use this to get details about a build, wait for it to finish, or access its logs.
Parameters
id: string
Build ID
Returns BuildClient
A client for the specified build
builds
Returns a client for managing Actor builds in your account.
Lists all builds across all of your Actors.
Returns BuildCollectionClient
A client for Actor builds collection
dataset
Returns a client for a specific dataset.
Use this to read, write, and manage items in the dataset. Datasets contain structured data stored as individual items (records).
Parameters
id: string
Dataset ID or name
Returns DatasetClient<Data>
A client for the specific Dataset
datasets
Returns a client for managing datasets in your account.
Datasets store structured data results from Actor runs. Use this to list or create datasets.
Returns DatasetCollectionClient
A client for the Datasets collection
keyValueStore
Returns a client for a specific key-value store.
Use this to read, write, and delete records in the store. Key-value stores can hold any type of data including text, JSON, images, and other files.
Parameters
id: string
Key-value store ID or name
Returns KeyValueStoreClient
A client for the specific key-value store
keyValueStores
Returns a client for managing key-value stores in your account.
Key-value stores are used to store arbitrary data records or files.
Returns KeyValueStoreCollectionClient
A client for the Key-value stores collection
log
Returns a client for accessing logs of an Actor build or run.
Parameters
buildOrRunId: string
Build ID or run ID
Returns LogClient
A client for accessing logs
requestQueue
Returns a client for a specific request queue.
Use this to add, retrieve, and manage requests in the queue. Request queues are used by web crawlers to manage URLs that need to be visited.
Parameters
id: string
Request queue ID or name
options: RequestQueueUserOptions = {}
Configuration options for the request queue client
Returns RequestQueueClient
A client for the specific Request queue
requestQueues
Returns a client for managing request queues in your account.
Request queues store URLs to be crawled, along with their metadata.
Returns RequestQueueCollectionClient
A client for the Request queues collection
run
Returns a client for a specific Actor run.
Use this to get details about a run, wait for it to finish, abort it, or access its dataset, key-value store, and request queue.
Parameters
id: string
Run ID
Returns RunClient
A client for the specified run
runs
Returns a client for managing Actor runs in your account.
Lists all runs across all of your Actors.
Returns RunCollectionClient
A client for the run collection
schedule
Returns a client for a specific schedule.
Use this to get, update, or delete a schedule.
Parameters
id: string
Schedule ID
Returns ScheduleClient
A client for the specific Schedule
schedules
Returns a client for managing schedules in your account.
Schedules automatically start Actor or task runs at specified times.
Returns ScheduleCollectionClient
A client for the Schedules collection
setStatusMessage
Sets a status message for the current Actor run.
This is a convenience method that updates the status message of the run specified by the
ACTOR_RUN_IDenvironment variable. Only works when called from within an Actor run.Parameters
message: string
The status message to set
optionaloptions: SetStatusMessageOptions
Additional options for the status message
Returns Promise<void>
store
Returns a client for browsing Actors in Apify Store.
Use this to search and retrieve information about public Actors.
Returns StoreCollectionClient
A client for the Apify Store
task
Returns a client for a specific Actor task.
Use this to get, update, delete, or run a task with pre-configured input.
Parameters
id: string
Task ID or username/task-name
Returns TaskClient
A client for the specified task
tasks
Returns a client for managing Actor tasks in your account.
Tasks are pre-configured Actor runs with stored input that can be executed repeatedly.
Returns TaskCollectionClient
A client for the task collection
user
Returns a client for accessing user data.
By default, returns information about the current user (determined by the API token).
Parameters
id: string = ME_USER_NAME_PLACEHOLDER
User ID or username. Defaults to 'me' (current user)
Returns UserClient
A client for the user
webhook
Returns a client for a specific webhook.
Use this to get, update, delete, or test a webhook.
Parameters
id: string
Webhook ID
Returns WebhookClient
A client for the specific webhook
webhookDispatch
Returns a client for a specific webhook dispatch.
Parameters
id: string
Webhook dispatch ID
Returns WebhookDispatchClient
A client for the specific webhook dispatch
webhookDispatches
Returns a client for viewing webhook dispatches in your account.
Webhook dispatches represent individual invocations of webhooks.
Returns WebhookDispatchCollectionClient
A client for the webhook dispatches collection
webhooks
Returns a client for managing webhooks in your account.
Webhooks notify external services when specific events occur (e.g., Actor run finishes).
Returns WebhookCollectionClient
A client for the Webhooks collection
The official JavaScript client for the Apify API.
Provides programmatic access to all Apify platform resources including Actors, runs, datasets, key-value stores, request queues, and more. Works in both Node.js and browser environments.
https://docs.apify.com/api/v2