Skip to main content
Version: Next

RequestQueueCollectionClient

Client for managing the collection of Request queues in your account.

Request queues store URLs to be crawled and their metadata. This client provides methods to list, create, or get request queues by name.

@example
const client = new ApifyClient({ token: 'my-token' });
const queuesClient = client.requestQueues();

// List all request queues
const { items } = await queuesClient.list();

// Get or create a request queue by name
const queue = await queuesClient.getOrCreate('my-queue');
@see

Hierarchy

  • ResourceCollectionClient
    • RequestQueueCollectionClient

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

list

  • Lists all Request queues.

    Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched items in a single API call is limited.

    const paginatedList = await client.list(options);

    Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are retrieved.

    for await (const singleItem of client.list(options)) {...}
    @see

    Parameters

    Returns Promise<RequestQueueCollectionListResult> & AsyncIterable<RequestQueue, any, any>

    A paginated iterator of Request queues.