66from apify_client .clients .base import ResourceCollectionClient , ResourceCollectionClientAsync
77
88if TYPE_CHECKING :
9+ from datetime import datetime
10+
911 from apify_shared .consts import ActorJobStatus
1012
1113 from apify_client .clients .base .resource_collection_client import ListPage
@@ -25,6 +27,8 @@ def list(
2527 offset : int | None = None ,
2628 desc : bool | None = None ,
2729 status : ActorJobStatus | list [ActorJobStatus ] | None = None ,
30+ started_before : str | datetime | None = None ,
31+ started_after : str | datetime | None = None ,
2832 ) -> ListPage [dict ]:
2933 """List all Actor runs.
3034
@@ -39,6 +43,8 @@ def list(
3943 offset: What run to include as first when retrieving the list.
4044 desc: Whether to sort the runs in descending order based on their start date.
4145 status: Retrieve only runs with the provided statuses.
46+ started_before: Only return runs started before this date (inclusive).
47+ started_after: Only return runs started after this date (inclusive).
4248
4349 Returns:
4450 The retrieved Actor runs.
@@ -53,6 +59,8 @@ def list(
5359 offset = offset ,
5460 desc = desc ,
5561 status = status_param ,
62+ startedBefore = started_before ,
63+ startedAfter = started_after ,
5664 )
5765
5866
@@ -70,6 +78,8 @@ async def list(
7078 offset : int | None = None ,
7179 desc : bool | None = None ,
7280 status : ActorJobStatus | list [ActorJobStatus ] | None = None ,
81+ started_before : str | datetime | None = None ,
82+ started_after : str | datetime | None = None ,
7383 ) -> ListPage [dict ]:
7484 """List all Actor runs.
7585
@@ -84,6 +94,8 @@ async def list(
8494 offset: What run to include as first when retrieving the list.
8595 desc: Whether to sort the runs in descending order based on their start date.
8696 status: Retrieve only runs with the provided statuses.
97+ started_before: Only return runs started before this date (inclusive).
98+ started_after: Only return runs started after this date (inclusive).
8799
88100 Returns:
89101 The retrieved Actor runs.
@@ -98,4 +110,6 @@ async def list(
98110 offset = offset ,
99111 desc = desc ,
100112 status = status_param ,
113+ startedBefore = started_before ,
114+ startedAfter = started_after ,
101115 )
0 commit comments