Skip to main content

RunCollectionClientAsync

Sub-client for the Actor run collection.

Provides methods to manage Actor runs, e.g. list them. Obtain an instance via an appropriate method on the ApifyClientAsync class.

Hierarchy

Index

Methods

Properties

Methods

__init__

  • __init__(*, base_url, public_base_url, http_client, resource_path, client_registry, resource_id, params): None
  • Initialize the resource client.


    Parameters

    • keyword-onlybase_url: str

      API base URL.

    • keyword-onlypublic_base_url: str

      Public CDN base URL.

    • keyword-onlyhttp_client: HttpClientAsync

      HTTP client for making requests.

    • keyword-onlyresource_path: str

      Resource endpoint path (e.g., 'actors', 'datasets').

    • keyword-onlyclient_registry: ClientRegistryAsync

      Bundle of client classes for dependency injection.

    • optionalkeyword-onlyresource_id: str | None = None

      Optional resource ID for single-resource clients.

    • optionalkeyword-onlyparams: dict | None = None

      Optional default parameters for all requests.

    Returns None

list

  • async list(*, limit, offset, desc, status, started_before, started_after, timeout): ListOfRuns
  • List all Actor runs.

    List all Actor runs, either of a single Actor, or all user's Actors, depending on where this client was initialized from.

    https://docs.apify.com/api/v2#/reference/actors/run-collection/get-list-of-runs https://docs.apify.com/api/v2#/reference/actor-runs/run-collection/get-user-runs-list


    Parameters

    • optionalkeyword-onlylimit: int | None = None

      How many runs to retrieve.

    • optionalkeyword-onlyoffset: int | None = None

      What run to include as first when retrieving the list.

    • optionalkeyword-onlydesc: bool | None = None

      Whether to sort the runs in descending order based on their start date.

    • optionalkeyword-onlystatus: (ActorJobStatus | list[ActorJobStatus]) | None = None

      Retrieve only runs with the provided statuses.

    • optionalkeyword-onlystarted_before: (str | datetime) | None = None

      Only return runs started before this date (inclusive).

    • optionalkeyword-onlystarted_after: (str | datetime) | None = None

      Only return runs started after this date (inclusive).

    • optionalkeyword-onlytimeout: Timeout = 'long'

      Timeout for the API HTTP request.

    Returns ListOfRuns

    The retrieved Actor runs.

Properties

resource_id

resource_id: str | None

Get the resource ID.

Page Options