Skip to main content

TaskCollectionClient

apify_client.clients.TaskCollectionClient

Sub-client for manipulating tasks.

Index

Methods

Methods

create

  • create(*, actor_id, name, build, timeout_secs, memory_mbytes, max_items, task_input, title): dict

  • Parameters

    • actor_id: strkeyword-only

      Id of the actor that should be run

    • name: strkeyword-only

      Name of the task

    • build: str | None = Nonekeyword-only

      Actor build to run. It can be either a build tag or build number. By default, the run uses the build specified in the task settings (typically latest).

    • timeout_secs: int | None = Nonekeyword-only

      Optional timeout for the run, in seconds. By default, the run uses timeout specified in the task settings.

    • memory_mbytes: int | None = Nonekeyword-only

      Memory limit for the run, in megabytes. By default, the run uses a memory limit specified in the task settings.

    • max_items: int | None = Nonekeyword-only

      Maximum number of results that will be returned by runs of this task. If the Actor of this task is charged per result, you will not be charged for more results than the given limit.

    • task_input: dict | None = Nonekeyword-only

      Task input object.

    • title: str | None = Nonekeyword-only

      A human-friendly equivalent of the name

    Returns dict

    The created task.

list

  • list(*, limit, offset, desc): ListPage[dict]

  • Parameters

    • limit: int | None = Nonekeyword-only

      How many tasks to list

    • offset: int | None = Nonekeyword-only

      What task to include as first when retrieving the list

    • desc: bool | None = Nonekeyword-only

      Whether to sort the tasks in descending order based on their creation date

    Returns ListPage[dict]

    The list of available tasks matching the specified filters.