From 99fc4f1da4bffbab98c3d56772d977d51c527455 Mon Sep 17 00:00:00 2001 From: Michael Novak Date: Thu, 13 Nov 2025 14:49:20 +0100 Subject: [PATCH 1/6] fix: Update maxItems and maxTotalChargeUsd desc --- ...torTaskId}@run-sync-get-dataset-items.yaml | 20 ++++++++-------- .../actor-tasks@{actorTaskId}@run-sync.yaml | 20 ++++++++-------- .../actor-tasks@{actorTaskId}@runs.yaml | 7 +++--- ...@{actorId}@run-sync-get-dataset-items.yaml | 14 +++++------ .../paths/actors/acts@{actorId}@run-sync.yaml | 24 +++++++++---------- .../paths/actors/acts@{actorId}@runs.yaml | 7 +++--- 6 files changed, 43 insertions(+), 49 deletions(-) diff --git a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml index eee73ffa9..148c56f50 100644 --- a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml +++ b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml @@ -58,11 +58,11 @@ get: - name: maxItems in: query description: | - The maximum number of items that the task run should return. This is - useful for pay-per-result tasks, as it allows you to limit the number of - results that will be charged to your subscription. You can access the - maximum number of items in your Actor by using the - `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. + Specifies the maximum number of dataset items that will be charged for pay-per-result actors. + This does NOT guarantee that the Actor will return only this many items. + It only ensures you won't be charged for more than this number of items. + Only works for pay-per-result actors. + Value can be accessed in the actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. style: form explode: true schema: @@ -451,11 +451,11 @@ post: - name: maxItems in: query description: | - The maximum number of items that the task run should return. This is - useful for pay-per-result tasks, as it allows you to limit the number of - results that will be charged to your subscription. You can access the - maximum number of items in your Actor by using the - `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. + Specifies the maximum number of dataset items that will be charged for pay-per-result actors. + This does NOT guarantee that the Actor will return only this many items. + It only ensures you won't be charged for more than this number of items. + Only works for pay-per-result actors. + Value can be accessed in the actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. style: form explode: true schema: diff --git a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml index 9782b7b5c..c9c76e756 100644 --- a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml +++ b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml @@ -55,11 +55,11 @@ get: - name: maxItems in: query description: | - The maximum number of items that the task run should return. This is - useful for pay-per-result tasks, as it allows you to limit the number of - results that will be charged to your subscription. You can access the - maximum number of items in your Actor by using the - `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. + Specifies the maximum number of dataset items that will be charged for pay-per-result actors. + This does NOT guarantee that the Actor will return only this many items. + It only ensures you won't be charged for more than this number of items. + Only works for pay-per-result actors. + Value can be accessed in the actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. style: form explode: true schema: @@ -198,11 +198,11 @@ post: - name: maxItems in: query description: | - The maximum number of items that the task run should return. This is - useful for pay-per-result tasks, as it allows you to limit the number of - results that will be charged to your subscription. You can access the - maximum number of items in your Actor by using the - `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. + Specifies the maximum number of dataset items that will be charged for pay-per-result actors. + This does NOT guarantee that the Actor will return only this many items. + It only ensures you won't be charged for more than this number of items. + Only works for pay-per-result actors. + Value can be accessed in the actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. style: form explode: true schema: diff --git a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@runs.yaml b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@runs.yaml index 1e9cc1237..8639b27c2 100644 --- a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@runs.yaml +++ b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@runs.yaml @@ -205,10 +205,9 @@ post: in: query description: | Specifies the maximum cost of the Actor run. This parameter is - useful for pay-per-event Actors, as it allows you to limit the amount - charged to your subscription. You can access the - maximum cost in your Actor by using the - `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. + used only for pay-per-event Actors. It allows you to limit the amount + charged to your subscription. You can access the maximum cost in your + Actor by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. style: form explode: true schema: diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml index 3e9bbfdca..e213b5093 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml @@ -78,10 +78,9 @@ post: in: query description: | Specifies the maximum cost of the Actor run. This parameter is - useful for pay-per-event Actors, as it allows you to limit the amount - charged to your subscription. You can access the - maximum cost in your Actor by using the - `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. + used only for pay-per-event Actors. It allows you to limit the amount + charged to your subscription. You can access the maximum cost in your + Actor by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. style: form explode: true schema: @@ -489,10 +488,9 @@ get: in: query description: | Specifies the maximum cost of the Actor run. This parameter is - useful for pay-per-event Actors, as it allows you to limit the amount - charged to your subscription. You can access the - maximum cost in your Actor by using the - `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. + used only for pay-per-event Actors. It allows you to limit the amount + charged to your subscription. You can access the maximum cost in your + Actor by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. style: form explode: true schema: diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml index 209320c11..0d10bb87c 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml @@ -84,10 +84,9 @@ post: in: query description: | Specifies the maximum cost of the Actor run. This parameter is - useful for pay-per-event Actors, as it allows you to limit the amount - charged to your subscription. You can access the - maximum cost in your Actor by using the - `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. + used only for pay-per-event Actors. It allows you to limit the amount + charged to your subscription. You can access the maximum cost in your + Actor by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. style: form explode: true schema: @@ -239,11 +238,11 @@ get: - name: maxItems in: query description: | - The maximum number of items that the Actor run should return. This is - useful for pay-per-result Actors, as it allows you to limit the number - of results that will be charged to your subscription. You can access the - maximum number of items in your Actor by using the - `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. + Specifies the maximum number of dataset items that will be charged for pay-per-result actors. + This does NOT guarantee that the Actor will return only this many items. + It only ensures you won't be charged for more than this number of items. + Only works for pay-per-result actors. + Value can be accessed in the actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. style: form explode: true schema: @@ -254,10 +253,9 @@ get: in: query description: | Specifies the maximum cost of the Actor run. This parameter is - useful for pay-per-event Actors, as it allows you to limit the amount - charged to your subscription. You can access the - maximum cost in your Actor by using the - `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. + used only for pay-per-event Actors. It allows you to limit the amount + charged to your subscription. You can access the maximum cost in your + Actor by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. style: form explode: true schema: diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml index e2df1ce35..17ba993b9 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml @@ -220,10 +220,9 @@ post: in: query description: | Specifies the maximum cost of the Actor run. This parameter is - useful for pay-per-event Actors, as it allows you to limit the amount - charged to your subscription. You can access the - maximum cost in your Actor by using the - `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. + used only for pay-per-event Actors. It allows you to limit the amount + charged to your subscription. You can access the maximum cost in your + Actor by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. style: form explode: true schema: From b95fc58dcbaaf3dfaf09fba279cab02efa23ade2 Mon Sep 17 00:00:00 2001 From: Michael Novak Date: Tue, 18 Nov 2025 11:33:55 +0100 Subject: [PATCH 2/6] capitalize Actors --- ...or-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml | 8 ++++---- .../actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml | 8 ++++---- .../openapi/paths/actors/acts@{actorId}@run-sync.yaml | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml index 148c56f50..db47faac8 100644 --- a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml +++ b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml @@ -58,10 +58,10 @@ get: - name: maxItems in: query description: | - Specifies the maximum number of dataset items that will be charged for pay-per-result actors. + Specifies the maximum number of dataset items that will be charged for pay-per-result Actors. This does NOT guarantee that the Actor will return only this many items. It only ensures you won't be charged for more than this number of items. - Only works for pay-per-result actors. + Only works for pay-per-result Actors. Value can be accessed in the actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. style: form explode: true @@ -451,10 +451,10 @@ post: - name: maxItems in: query description: | - Specifies the maximum number of dataset items that will be charged for pay-per-result actors. + Specifies the maximum number of dataset items that will be charged for pay-per-result Actors. This does NOT guarantee that the Actor will return only this many items. It only ensures you won't be charged for more than this number of items. - Only works for pay-per-result actors. + Only works for pay-per-result Actors. Value can be accessed in the actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. style: form explode: true diff --git a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml index c9c76e756..98c9db939 100644 --- a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml +++ b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml @@ -55,10 +55,10 @@ get: - name: maxItems in: query description: | - Specifies the maximum number of dataset items that will be charged for pay-per-result actors. + Specifies the maximum number of dataset items that will be charged for pay-per-result Actors. This does NOT guarantee that the Actor will return only this many items. It only ensures you won't be charged for more than this number of items. - Only works for pay-per-result actors. + Only works for pay-per-result Actors. Value can be accessed in the actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. style: form explode: true @@ -198,10 +198,10 @@ post: - name: maxItems in: query description: | - Specifies the maximum number of dataset items that will be charged for pay-per-result actors. + Specifies the maximum number of dataset items that will be charged for pay-per-result Actors. This does NOT guarantee that the Actor will return only this many items. It only ensures you won't be charged for more than this number of items. - Only works for pay-per-result actors. + Only works for pay-per-result Actors. Value can be accessed in the actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. style: form explode: true diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml index 0d10bb87c..ac0b651f1 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml @@ -238,10 +238,10 @@ get: - name: maxItems in: query description: | - Specifies the maximum number of dataset items that will be charged for pay-per-result actors. + Specifies the maximum number of dataset items that will be charged for pay-per-result Actors. This does NOT guarantee that the Actor will return only this many items. It only ensures you won't be charged for more than this number of items. - Only works for pay-per-result actors. + Only works for pay-per-result Actors. Value can be accessed in the actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. style: form explode: true From 12542cf19bd592c9521744edca3f8b3b87dd8900 Mon Sep 17 00:00:00 2001 From: Michael Novak Date: Tue, 18 Nov 2025 11:42:06 +0100 Subject: [PATCH 3/6] add them to run options as well --- .../openapi/components/schemas/actor-runs/RunOptions.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apify-api/openapi/components/schemas/actor-runs/RunOptions.yaml b/apify-api/openapi/components/schemas/actor-runs/RunOptions.yaml index 9bf33a4b1..1edfb5b99 100644 --- a/apify-api/openapi/components/schemas/actor-runs/RunOptions.yaml +++ b/apify-api/openapi/components/schemas/actor-runs/RunOptions.yaml @@ -4,6 +4,8 @@ required: - timeoutSecs - memoryMbytes - diskMbytes + - maxItems + - maxTotalChargeUsd type: object properties: build: @@ -18,3 +20,9 @@ properties: diskMbytes: type: number example: 2048 + maxItems: + type: number + example: 1000 + maxTotalChargeUsd: + type: number + example: 5 From 8648a90d501a4de8359fc105b39a9173313efae5 Mon Sep 17 00:00:00 2001 From: Michael Novak Date: Mon, 24 Nov 2025 08:14:32 +0100 Subject: [PATCH 4/6] move the fields to components --- .../schemas/actor-runs/RunOptions.yaml | 2 - .../actor-runs@{runId}@resurrect.yaml | 18 +----- ...torTaskId}@run-sync-get-dataset-items.yaml | 46 ++------------- .../actor-tasks@{actorTaskId}@run-sync.yaml | 46 ++------------- .../actor-tasks@{actorTaskId}@runs.yaml | 29 +--------- ...@{actorId}@run-sync-get-dataset-items.yaml | 58 ++----------------- .../paths/actors/acts@{actorId}@run-sync.yaml | 29 +--------- .../paths/actors/acts@{actorId}@runs.yaml | 29 +--------- 8 files changed, 20 insertions(+), 237 deletions(-) diff --git a/apify-api/openapi/components/schemas/actor-runs/RunOptions.yaml b/apify-api/openapi/components/schemas/actor-runs/RunOptions.yaml index 1edfb5b99..05db2cb5b 100644 --- a/apify-api/openapi/components/schemas/actor-runs/RunOptions.yaml +++ b/apify-api/openapi/components/schemas/actor-runs/RunOptions.yaml @@ -4,8 +4,6 @@ required: - timeoutSecs - memoryMbytes - diskMbytes - - maxItems - - maxTotalChargeUsd type: object properties: build: diff --git a/apify-api/openapi/paths/actor-runs/actor-runs@{runId}@resurrect.yaml b/apify-api/openapi/paths/actor-runs/actor-runs@{runId}@resurrect.yaml index 1df4b2feb..9799e71b1 100644 --- a/apify-api/openapi/paths/actor-runs/actor-runs@{runId}@resurrect.yaml +++ b/apify-api/openapi/paths/actor-runs/actor-runs@{runId}@resurrect.yaml @@ -38,22 +38,8 @@ post: schema: type: number example: 256 - - name: maxItems - in: query - required: false - schema: - type: number - example: 1000 - description: | - Optional number of items that the run should return. Used for pay-per-result Actors. The value can only be increased beyond the value specified when the Actor run was started. - - name: maxTotalChargeUsd - in: query - required: false - schema: - type: number - example: 10 - description: | - Optional maximum cost of the run, in USD. Used for pay-per-event Actors. The value can only be increased beyond the value specified when the Actor run was started. + - $ref: "../../components/parameters/actor-run-options/maxItems.yaml" + - $ref: "../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml" - name: restartOnError in: query required: false diff --git a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml index db47faac8..9ea495d32 100644 --- a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml +++ b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml @@ -55,20 +55,8 @@ get: type: number format: double example: 256 - - name: maxItems - in: query - description: | - Specifies the maximum number of dataset items that will be charged for pay-per-result Actors. - This does NOT guarantee that the Actor will return only this many items. - It only ensures you won't be charged for more than this number of items. - Only works for pay-per-result Actors. - Value can be accessed in the actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 1000 + - $ref: "../../components/parameters/actor-run-options/maxItems.yaml" + # XXX: do we support maxTotalChargeUsd for task runs? - name: build in: query description: | @@ -448,34 +436,8 @@ post: type: number format: double example: 256 - - name: maxItems - in: query - description: | - Specifies the maximum number of dataset items that will be charged for pay-per-result Actors. - This does NOT guarantee that the Actor will return only this many items. - It only ensures you won't be charged for more than this number of items. - Only works for pay-per-result Actors. - Value can be accessed in the actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 1000 - - name: maxTotalChargeUsd - in: query - description: | - Specifies the maximum cost of the task run. This is - useful for pay-per-event tasks, as it allows you to limit the amount - charged to your subscription. You can access the - maximum cost in your Actor by using the - `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 5 + - $ref: "../../components/parameters/actor-run-options/maxItems.yaml" + - $ref: "../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml" - name: restartOnError in: query description: | diff --git a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml index 98c9db939..77d46d008 100644 --- a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml +++ b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml @@ -52,20 +52,8 @@ get: type: number format: double example: 256 - - name: maxItems - in: query - description: | - Specifies the maximum number of dataset items that will be charged for pay-per-result Actors. - This does NOT guarantee that the Actor will return only this many items. - It only ensures you won't be charged for more than this number of items. - Only works for pay-per-result Actors. - Value can be accessed in the actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 1000 + - $ref: "../../components/parameters/actor-run-options/maxItems.yaml" + # XXX: do we support maxTotalChargeUsd for task runs? - name: build in: query description: | @@ -195,34 +183,8 @@ post: type: number format: double example: 256 - - name: maxItems - in: query - description: | - Specifies the maximum number of dataset items that will be charged for pay-per-result Actors. - This does NOT guarantee that the Actor will return only this many items. - It only ensures you won't be charged for more than this number of items. - Only works for pay-per-result Actors. - Value can be accessed in the actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 1000 - - name: maxTotalChargeUsd - in: query - description: | - Specifies the maximum cost of the task run. This parameter is - useful for pay-per-event tasks, as it allows you to limit the amount - charged to your subscription. You can access the - maximum cost in your Actor by using the - `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 5 + - $ref: "../../components/parameters/actor-run-options/maxItems.yaml" + - $ref: "../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml" - name: restartOnError in: query description: | diff --git a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@runs.yaml b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@runs.yaml index 8639b27c2..aa91d4f17 100644 --- a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@runs.yaml +++ b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@runs.yaml @@ -187,33 +187,8 @@ post: type: number format: double example: 256 - - name: maxItems - in: query - description: | - The maximum number of items that the Actor run should return. This is - useful for pay-per-result Actors, as it allows you to limit the number - of results that will be charged to your subscription. You can access the - maximum number of items in your Actor by using the - `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 1000 - - name: maxTotalChargeUsd - in: query - description: | - Specifies the maximum cost of the Actor run. This parameter is - used only for pay-per-event Actors. It allows you to limit the amount - charged to your subscription. You can access the maximum cost in your - Actor by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 5 + - $ref: "../../components/parameters/actor-run-options/maxItems.yaml" + - $ref: "../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml" - name: restartOnError in: query description: | diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml index e213b5093..e2f3e3e16 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml @@ -60,33 +60,8 @@ post: type: number format: double example: 256 - - name: maxItems - in: query - description: | - The maximum number of items that the Actor run should return. This is - useful for pay-per-result Actors, as it allows you to limit the number - of results that will be charged to your subscription. You can access the - maximum number of items in your Actor by using the - `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 1000 - - name: maxTotalChargeUsd - in: query - description: | - Specifies the maximum cost of the Actor run. This parameter is - used only for pay-per-event Actors. It allows you to limit the amount - charged to your subscription. You can access the maximum cost in your - Actor by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 5 + - $ref: "../../components/parameters/actor-run-options/maxItems.yaml" + - $ref: "../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml" - name: restartOnError in: query description: | @@ -470,33 +445,8 @@ get: type: number format: double example: 256 - - name: maxItems - in: query - description: | - The maximum number of items that the Actor run should return. This is - useful for pay-per-result Actors, as it allows you to limit the number - of results that will be charged to your subscription. You can access the - maximum number of items in your Actor by using the - `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 1000 - - name: maxTotalChargeUsd - in: query - description: | - Specifies the maximum cost of the Actor run. This parameter is - used only for pay-per-event Actors. It allows you to limit the amount - charged to your subscription. You can access the maximum cost in your - Actor by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 5 + - $ref: "../../components/parameters/actor-run-options/maxItems.yaml" + - $ref: "../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml" - name: restartOnError in: query description: | diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml index ac0b651f1..3e543f10f 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml @@ -66,33 +66,8 @@ post: type: number format: double example: 256 - - name: maxItems - in: query - description: | - The maximum number of items that the Actor run should return. This is - useful for pay-per-result Actors, as it allows you to limit the number - of results that will be charged to your subscription. You can access the - maximum number of items in your Actor by using the - `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 1000 - - name: maxTotalChargeUsd - in: query - description: | - Specifies the maximum cost of the Actor run. This parameter is - used only for pay-per-event Actors. It allows you to limit the amount - charged to your subscription. You can access the maximum cost in your - Actor by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 5 + - $ref: "../../components/parameters/actor-run-options/maxItems.yaml" + - $ref: "../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml" - name: restartOnError in: query description: | diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml index 17ba993b9..7c2a94892 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml @@ -202,33 +202,8 @@ post: type: number format: double example: 256 - - name: maxItems - in: query - description: | - The maximum number of items that the Actor run should return. This is - useful for pay-per-result Actors, as it allows you to limit the number - of results that will be charged to your subscription. You can access the - maximum number of items in your Actor by using the - `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 1000 - - name: maxTotalChargeUsd - in: query - description: | - Specifies the maximum cost of the Actor run. This parameter is - used only for pay-per-event Actors. It allows you to limit the amount - charged to your subscription. You can access the maximum cost in your - Actor by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 5 + - $ref: "../../components/parameters/actor-run-options/maxItems.yaml" + - $ref: "../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml" - name: restartOnError in: query description: | From f4d77a3986afd39367176836694658416a284f74 Mon Sep 17 00:00:00 2001 From: Michael Novak Date: Mon, 24 Nov 2025 09:17:02 +0100 Subject: [PATCH 5/6] add new components --- .../parameters/actor-run-options/maxItems.yaml | 15 +++++++++++++++ .../actor-run-options/maxTotalChargeUsd.yaml | 14 ++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 apify-api/openapi/components/parameters/actor-run-options/maxItems.yaml create mode 100644 apify-api/openapi/components/parameters/actor-run-options/maxTotalChargeUsd.yaml diff --git a/apify-api/openapi/components/parameters/actor-run-options/maxItems.yaml b/apify-api/openapi/components/parameters/actor-run-options/maxItems.yaml new file mode 100644 index 000000000..19b78eb1a --- /dev/null +++ b/apify-api/openapi/components/parameters/actor-run-options/maxItems.yaml @@ -0,0 +1,15 @@ +name: maxItems +in: query +required: false +description: | + Specifies the maximum number of dataset items that will be charged for pay-per-result Actors. + This does NOT guarantee that the Actor will return only this many items. + It only ensures you won't be charged for more than this number of items. + Only works for pay-per-result Actors. + Value can be accessed in the actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. +style: form +explode: true +schema: + type: number + format: double + example: 1000 diff --git a/apify-api/openapi/components/parameters/actor-run-options/maxTotalChargeUsd.yaml b/apify-api/openapi/components/parameters/actor-run-options/maxTotalChargeUsd.yaml new file mode 100644 index 000000000..43dc27d63 --- /dev/null +++ b/apify-api/openapi/components/parameters/actor-run-options/maxTotalChargeUsd.yaml @@ -0,0 +1,14 @@ +name: maxTotalChargeUsd +in: query +required: false +description: | + Specifies the maximum cost of the task run. This parameter is + useful for pay-per-event tasks, as it allows you to limit the amount + charged to your subscription. You can access the maximum cost in your Actor + by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. +style: form +explode: true +schema: + type: number + format: double + example: 5 From e952cf24f05a62bd4a09bb8457cc7d8154e2b164 Mon Sep 17 00:00:00 2001 From: Michael Novak Date: Mon, 24 Nov 2025 10:00:16 +0100 Subject: [PATCH 6/6] use the components in one more place --- .../actor-run-options/maxTotalChargeUsd.yaml | 4 +-- .../paths/actors/acts@{actorId}@run-sync.yaml | 29 ++----------------- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/apify-api/openapi/components/parameters/actor-run-options/maxTotalChargeUsd.yaml b/apify-api/openapi/components/parameters/actor-run-options/maxTotalChargeUsd.yaml index 43dc27d63..cbfa6daba 100644 --- a/apify-api/openapi/components/parameters/actor-run-options/maxTotalChargeUsd.yaml +++ b/apify-api/openapi/components/parameters/actor-run-options/maxTotalChargeUsd.yaml @@ -2,8 +2,8 @@ name: maxTotalChargeUsd in: query required: false description: | - Specifies the maximum cost of the task run. This parameter is - useful for pay-per-event tasks, as it allows you to limit the amount + Specifies the maximum cost of the run. This parameter is + useful for pay-per-event Actors, as it allows you to limit the amount charged to your subscription. You can access the maximum cost in your Actor by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. style: form diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml index 3e543f10f..a3b480777 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml @@ -210,33 +210,8 @@ get: type: number format: double example: 256 - - name: maxItems - in: query - description: | - Specifies the maximum number of dataset items that will be charged for pay-per-result Actors. - This does NOT guarantee that the Actor will return only this many items. - It only ensures you won't be charged for more than this number of items. - Only works for pay-per-result Actors. - Value can be accessed in the actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 1000 - - name: maxTotalChargeUsd - in: query - description: | - Specifies the maximum cost of the Actor run. This parameter is - used only for pay-per-event Actors. It allows you to limit the amount - charged to your subscription. You can access the maximum cost in your - Actor by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable. - style: form - explode: true - schema: - type: number - format: double - example: 5 + - $ref: "../../components/parameters/actor-run-options/maxItems.yaml" + - $ref: "../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml" - name: restartOnError in: query description: |