Skip to content

Commit dfda9ab

Browse files
fix: Update maxItems and maxTotalChargeUsd desc (#2088)
<!-- CURSOR_SUMMARY --> > [!NOTE] > Clarifies OpenAPI docs for `maxItems` (pay-per-result charge cap) and `maxTotalChargeUsd` (pay-per-event cost cap) across actor and task run endpoints, including env var references. > > - **OpenAPI (Actors & Actor tasks)** > - Update `maxItems` query param description in `actors/*run-sync*.yaml` and `actor-tasks/*run-sync*.yaml`: > - Clarifies it caps chargeable dataset items for pay-per-result actors, not returned items; references `ACTOR_MAX_PAID_DATASET_ITEMS`. > - Update `maxTotalChargeUsd` query param description in `actors/*runs*.yaml`, `actors/*run-sync*.yaml`, and `actor-tasks/*runs*.yaml`: > - Specifies it's used only for pay-per-event actors and references `ACTOR_MAX_TOTAL_CHARGE_USD`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 99fc4f1. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 6ed0c18 commit dfda9ab

File tree

10 files changed

+57
-268
lines changed

10 files changed

+57
-268
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: maxItems
2+
in: query
3+
required: false
4+
description: |
5+
Specifies the maximum number of dataset items that will be charged for pay-per-result Actors.
6+
This does NOT guarantee that the Actor will return only this many items.
7+
It only ensures you won't be charged for more than this number of items.
8+
Only works for pay-per-result Actors.
9+
Value can be accessed in the actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable.
10+
style: form
11+
explode: true
12+
schema:
13+
type: number
14+
format: double
15+
example: 1000
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: maxTotalChargeUsd
2+
in: query
3+
required: false
4+
description: |
5+
Specifies the maximum cost of the run. This parameter is
6+
useful for pay-per-event Actors, as it allows you to limit the amount
7+
charged to your subscription. You can access the maximum cost in your Actor
8+
by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
9+
style: form
10+
explode: true
11+
schema:
12+
type: number
13+
format: double
14+
example: 5

apify-api/openapi/components/schemas/actor-runs/RunOptions.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ properties:
1818
diskMbytes:
1919
type: number
2020
example: 2048
21+
maxItems:
22+
type: number
23+
example: 1000
24+
maxTotalChargeUsd:
25+
type: number
26+
example: 5

apify-api/openapi/paths/actor-runs/actor-runs@{runId}@resurrect.yaml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,8 @@ post:
3838
schema:
3939
type: number
4040
example: 256
41-
- name: maxItems
42-
in: query
43-
required: false
44-
schema:
45-
type: number
46-
example: 1000
47-
description: |
48-
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.
49-
- name: maxTotalChargeUsd
50-
in: query
51-
required: false
52-
schema:
53-
type: number
54-
example: 10
55-
description: |
56-
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.
41+
- $ref: "../../components/parameters/actor-run-options/maxItems.yaml"
42+
- $ref: "../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml"
5743
- name: restartOnError
5844
in: query
5945
required: false

apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,8 @@ get:
5555
type: number
5656
format: double
5757
example: 256
58-
- name: maxItems
59-
in: query
60-
description: |
61-
The maximum number of items that the task run should return. This is
62-
useful for pay-per-result tasks, as it allows you to limit the number of
63-
results that will be charged to your subscription. You can access the
64-
maximum number of items in your Actor by using the
65-
`ACTOR_MAX_PAID_DATASET_ITEMS` environment variable.
66-
style: form
67-
explode: true
68-
schema:
69-
type: number
70-
format: double
71-
example: 1000
58+
- $ref: "../../components/parameters/actor-run-options/maxItems.yaml"
59+
# XXX: do we support maxTotalChargeUsd for task runs?
7260
- name: build
7361
in: query
7462
description: |
@@ -448,34 +436,8 @@ post:
448436
type: number
449437
format: double
450438
example: 256
451-
- name: maxItems
452-
in: query
453-
description: |
454-
The maximum number of items that the task run should return. This is
455-
useful for pay-per-result tasks, as it allows you to limit the number of
456-
results that will be charged to your subscription. You can access the
457-
maximum number of items in your Actor by using the
458-
`ACTOR_MAX_PAID_DATASET_ITEMS` environment variable.
459-
style: form
460-
explode: true
461-
schema:
462-
type: number
463-
format: double
464-
example: 1000
465-
- name: maxTotalChargeUsd
466-
in: query
467-
description: |
468-
Specifies the maximum cost of the task run. This is
469-
useful for pay-per-event tasks, as it allows you to limit the amount
470-
charged to your subscription. You can access the
471-
maximum cost in your Actor by using the
472-
`ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
473-
style: form
474-
explode: true
475-
schema:
476-
type: number
477-
format: double
478-
example: 5
439+
- $ref: "../../components/parameters/actor-run-options/maxItems.yaml"
440+
- $ref: "../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml"
479441
- name: restartOnError
480442
in: query
481443
description: |

apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,8 @@ get:
5252
type: number
5353
format: double
5454
example: 256
55-
- name: maxItems
56-
in: query
57-
description: |
58-
The maximum number of items that the task run should return. This is
59-
useful for pay-per-result tasks, as it allows you to limit the number of
60-
results that will be charged to your subscription. You can access the
61-
maximum number of items in your Actor by using the
62-
`ACTOR_MAX_PAID_DATASET_ITEMS` environment variable.
63-
style: form
64-
explode: true
65-
schema:
66-
type: number
67-
format: double
68-
example: 1000
55+
- $ref: "../../components/parameters/actor-run-options/maxItems.yaml"
56+
# XXX: do we support maxTotalChargeUsd for task runs?
6957
- name: build
7058
in: query
7159
description: |
@@ -195,34 +183,8 @@ post:
195183
type: number
196184
format: double
197185
example: 256
198-
- name: maxItems
199-
in: query
200-
description: |
201-
The maximum number of items that the task run should return. This is
202-
useful for pay-per-result tasks, as it allows you to limit the number of
203-
results that will be charged to your subscription. You can access the
204-
maximum number of items in your Actor by using the
205-
`ACTOR_MAX_PAID_DATASET_ITEMS` environment variable.
206-
style: form
207-
explode: true
208-
schema:
209-
type: number
210-
format: double
211-
example: 1000
212-
- name: maxTotalChargeUsd
213-
in: query
214-
description: |
215-
Specifies the maximum cost of the task run. This parameter is
216-
useful for pay-per-event tasks, as it allows you to limit the amount
217-
charged to your subscription. You can access the
218-
maximum cost in your Actor by using the
219-
`ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
220-
style: form
221-
explode: true
222-
schema:
223-
type: number
224-
format: double
225-
example: 5
186+
- $ref: "../../components/parameters/actor-run-options/maxItems.yaml"
187+
- $ref: "../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml"
226188
- name: restartOnError
227189
in: query
228190
description: |

apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@runs.yaml

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -187,34 +187,8 @@ post:
187187
type: number
188188
format: double
189189
example: 256
190-
- name: maxItems
191-
in: query
192-
description: |
193-
The maximum number of items that the Actor run should return. This is
194-
useful for pay-per-result Actors, as it allows you to limit the number
195-
of results that will be charged to your subscription. You can access the
196-
maximum number of items in your Actor by using the
197-
`ACTOR_MAX_PAID_DATASET_ITEMS` environment variable.
198-
style: form
199-
explode: true
200-
schema:
201-
type: number
202-
format: double
203-
example: 1000
204-
- name: maxTotalChargeUsd
205-
in: query
206-
description: |
207-
Specifies the maximum cost of the Actor run. This parameter is
208-
useful for pay-per-event Actors, as it allows you to limit the amount
209-
charged to your subscription. You can access the
210-
maximum cost in your Actor by using the
211-
`ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
212-
style: form
213-
explode: true
214-
schema:
215-
type: number
216-
format: double
217-
example: 5
190+
- $ref: "../../components/parameters/actor-run-options/maxItems.yaml"
191+
- $ref: "../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml"
218192
- name: restartOnError
219193
in: query
220194
description: |

apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml

Lines changed: 4 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -60,34 +60,8 @@ post:
6060
type: number
6161
format: double
6262
example: 256
63-
- name: maxItems
64-
in: query
65-
description: |
66-
The maximum number of items that the Actor run should return. This is
67-
useful for pay-per-result Actors, as it allows you to limit the number
68-
of results that will be charged to your subscription. You can access the
69-
maximum number of items in your Actor by using the
70-
`ACTOR_MAX_PAID_DATASET_ITEMS` environment variable.
71-
style: form
72-
explode: true
73-
schema:
74-
type: number
75-
format: double
76-
example: 1000
77-
- name: maxTotalChargeUsd
78-
in: query
79-
description: |
80-
Specifies the maximum cost of the Actor run. This parameter is
81-
useful for pay-per-event Actors, as it allows you to limit the amount
82-
charged to your subscription. You can access the
83-
maximum cost in your Actor by using the
84-
`ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
85-
style: form
86-
explode: true
87-
schema:
88-
type: number
89-
format: double
90-
example: 5
63+
- $ref: "../../components/parameters/actor-run-options/maxItems.yaml"
64+
- $ref: "../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml"
9165
- name: restartOnError
9266
in: query
9367
description: |
@@ -471,34 +445,8 @@ get:
471445
type: number
472446
format: double
473447
example: 256
474-
- name: maxItems
475-
in: query
476-
description: |
477-
The maximum number of items that the Actor run should return. This is
478-
useful for pay-per-result Actors, as it allows you to limit the number
479-
of results that will be charged to your subscription. You can access the
480-
maximum number of items in your Actor by using the
481-
`ACTOR_MAX_PAID_DATASET_ITEMS` environment variable.
482-
style: form
483-
explode: true
484-
schema:
485-
type: number
486-
format: double
487-
example: 1000
488-
- name: maxTotalChargeUsd
489-
in: query
490-
description: |
491-
Specifies the maximum cost of the Actor run. This parameter is
492-
useful for pay-per-event Actors, as it allows you to limit the amount
493-
charged to your subscription. You can access the
494-
maximum cost in your Actor by using the
495-
`ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
496-
style: form
497-
explode: true
498-
schema:
499-
type: number
500-
format: double
501-
example: 5
448+
- $ref: "../../components/parameters/actor-run-options/maxItems.yaml"
449+
- $ref: "../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml"
502450
- name: restartOnError
503451
in: query
504452
description: |

apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml

Lines changed: 4 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -66,34 +66,8 @@ post:
6666
type: number
6767
format: double
6868
example: 256
69-
- name: maxItems
70-
in: query
71-
description: |
72-
The maximum number of items that the Actor run should return. This is
73-
useful for pay-per-result Actors, as it allows you to limit the number
74-
of results that will be charged to your subscription. You can access the
75-
maximum number of items in your Actor by using the
76-
`ACTOR_MAX_PAID_DATASET_ITEMS` environment variable.
77-
style: form
78-
explode: true
79-
schema:
80-
type: number
81-
format: double
82-
example: 1000
83-
- name: maxTotalChargeUsd
84-
in: query
85-
description: |
86-
Specifies the maximum cost of the Actor run. This parameter is
87-
useful for pay-per-event Actors, as it allows you to limit the amount
88-
charged to your subscription. You can access the
89-
maximum cost in your Actor by using the
90-
`ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
91-
style: form
92-
explode: true
93-
schema:
94-
type: number
95-
format: double
96-
example: 5
69+
- $ref: "../../components/parameters/actor-run-options/maxItems.yaml"
70+
- $ref: "../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml"
9771
- name: restartOnError
9872
in: query
9973
description: |
@@ -236,34 +210,8 @@ get:
236210
type: number
237211
format: double
238212
example: 256
239-
- name: maxItems
240-
in: query
241-
description: |
242-
The maximum number of items that the Actor run should return. This is
243-
useful for pay-per-result Actors, as it allows you to limit the number
244-
of results that will be charged to your subscription. You can access the
245-
maximum number of items in your Actor by using the
246-
`ACTOR_MAX_PAID_DATASET_ITEMS` environment variable.
247-
style: form
248-
explode: true
249-
schema:
250-
type: number
251-
format: double
252-
example: 1000
253-
- name: maxTotalChargeUsd
254-
in: query
255-
description: |
256-
Specifies the maximum cost of the Actor run. This parameter is
257-
useful for pay-per-event Actors, as it allows you to limit the amount
258-
charged to your subscription. You can access the
259-
maximum cost in your Actor by using the
260-
`ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
261-
style: form
262-
explode: true
263-
schema:
264-
type: number
265-
format: double
266-
example: 5
213+
- $ref: "../../components/parameters/actor-run-options/maxItems.yaml"
214+
- $ref: "../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml"
267215
- name: restartOnError
268216
in: query
269217
description: |

0 commit comments

Comments
 (0)