Skip to main content
Version: 2

ApifyClient

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.

@example
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'my-token' });

// Start an Actor and wait for it to finish
const run = await client.actor('my-actor-id').call();

// Fetch dataset items
const { items } = await client.dataset(run.defaultDatasetId).listItems();
@see

Index

Constructors

constructor

Properties

baseUrl

baseUrl: string

httpClient

httpClient: HttpClient

logger

logger: Log

publicBaseUrl

publicBaseUrl: string

stats

stats: Statistics

optionaltoken

token?: string

Methods

actor

  • actor(id):