Skip to main content
Version: 2

DatasetCollectionClient

Client for managing the collection of datasets in your account.

Datasets store structured data results from Actor runs. This client provides methods to list, create, or get datasets by name.

Hierarchy

  • ResourceCollectionClient
    • DatasetCollectionClient
const client = new ApifyClient({ token: 'my-token' });
const datasetsClient = client.datasets();

// List all datasets
const { items } = await datasetsClient.list();

// Get or create a dataset by name
const dataset = await datasetsClient.getOrCreate('my-dataset');

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

getOrCreate

  • getOrCreate(name, options): Promise<Dataset>

list