find_tasks

toloka.client.TolokaClient.find_tasks | Source code

Finds tasks that match certain criteria.

The number of returned tasks is limited. To find remaining tasks call find_tasks with updated search criteria.

To iterate over all matching tasks you may use the get_tasks method.

Parameters description

ParametersTypeDescription
pool_idOptional[str]

The ID of the pool to get tasks from.

overlapOptional[int]

Tasks with an overlap equal to the specified value.

id_ltOptional[str]

Tasks with IDs less than the specified value.

id_lteOptional[str]

Tasks with IDs less than or equal to the specified value.

id_gtOptional[str]

Tasks with IDs greater than the specified value.

id_gteOptional[str]

Tasks with IDs greater than or equal to the specified value.

created_ltOptional[datetime]

Tasks created before the specified date.

created_lteOptional[datetime]

Tasks created before or on the specified date.

created_gtOptional[datetime]

Tasks created after the specified date.

created_gteOptional[datetime]

Tasks created after or on the specified date.

overlap_ltOptional[int]

Tasks with an overlap less than the specified value.

overlap_lteOptional[int]

Tasks with an overlap less than or equal to the specified value.

overlap_gtOptional[int]

Tasks with an overlap greater than the specified value.

overlap_gteOptional[int]

Tasks with an overlap greater than or equal to the specified value.

sortUnion[List[str], TaskSortItems, None]

Sorting options. Default: None.

limitOptional[int]

Returned tasks limit. The maximum allowed value: 100,000. The default value: 50.

  • Returns:

    Found tasks and a flag showing whether there are more matching tasks exceeding the limit.

  • Return type:

    TaskSearchResult

Examples:

To find three most recently created tasks in a pool, call the method with the following parameters:

find_result = toloka_client.find_tasks(pool_id='1086170', sort=['-created', '-id'], limit=3)
tasks = find_result.items

Last updated: August 28, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming