-
Notifications
You must be signed in to change notification settings - Fork 179
Expand file tree
/
Copy pathacts@{actorId}@run-sync-get-dataset-items.yaml
More file actions
763 lines (753 loc) · 25.4 KB
/
acts@{actorId}@run-sync-get-dataset-items.yaml
File metadata and controls
763 lines (753 loc) · 25.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
post:
tags:
- Actors/Actor runs
summary: Run Actor synchronously with input and get dataset items
description: |
Runs a specific Actor and returns its dataset items.
The POST payload including its `Content-Type` header is passed as `INPUT` to
the Actor (usually `application/json`).
The HTTP response contains the Actors dataset items, while the format of
items depends on specifying dataset items' `format` parameter.
You can send all the same options in parameters as the [Get Dataset
Items](#/reference/datasets/item-collection/get-items) API endpoint.
The Actor is started with the default options; you can override them using
URL query parameters.
If the Actor run exceeds 300<!-- MAX_ACTOR_JOB_SYNC_WAIT_SECS --> seconds,
the HTTP response will return the 408 status code (Request Timeout).
Beware that it might be impossible to maintain an idle HTTP connection for a
long period of time,
due to client timeout or network conditions. Make sure your HTTP client is
configured to have a long enough connection timeout.
If the connection breaks, you will not receive any information about the run
and its status.
To run the Actor asynchronously, use the [Run
Actor](#/reference/actors/run-collection/run-actor) API endpoint instead.
operationId: act_runSyncGetDatasetItems_post
parameters:
- name: actorId
in: path
description: Actor ID or a tilde-separated owner's username and Actor name.
required: true
style: simple
schema:
type: string
example: janedoe~my-actor
- name: timeout
in: query
description: |
Optional timeout for the run, in seconds. By default, the run uses a
timeout specified in the default run configuration for the Actor.
style: form
explode: true
schema:
type: number
format: double
example: 60
- name: memory
in: query
description: |
Memory limit for the run, in megabytes. The amount of memory can be set
to a power of 2 with a minimum of 128. By default, the run uses a memory
limit specified in the default run configuration for the Actor.
style: form
explode: true
schema:
type: number
format: double
example: 256
- $ref: ../../components/parameters/actor-run-options/maxItems.yaml
- $ref: ../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml
- name: restartOnError
in: query
description: |
Determines whether the run will be restarted if it fails.
style: form
explode: true
schema:
type: boolean
example: false
- name: build
in: query
description: |
Specifies the Actor build to run. It can be either a build tag or build
number. By default, the run uses the build specified in the default run
configuration for the Actor (typically `latest`).
style: form
explode: true
schema:
type: string
example: 0.1.234
- name: webhooks
in: query
description: |
Specifies optional webhooks associated with the Actor run, which can be
used to receive a notification
e.g. when the Actor finished or failed. The value is a Base64-encoded
JSON array of objects defining the webhooks. For more information, see
[Webhooks documentation](https://docs.apify.com/platform/integrations/webhooks).
style: form
explode: true
schema:
type: string
example: dGhpcyBpcyBqdXN0IGV4YW1wbGUK...
- name: format
in: query
description: |
Format of the results, possible values are: `json`, `jsonl`, `csv`,
`html`, `xlsx`, `xml` and `rss`. The default value is `json`.
style: form
explode: true
schema:
type: string
example: json
- name: clean
in: query
description: |
If `true` or `1` then the API endpoint returns only non-empty items and
skips hidden fields (i.e. fields starting with the # character).
The `clean` parameter is just a shortcut for `skipHidden=true` and
`skipEmpty=true` parameters.
Note that since some objects might be skipped from the output, that the
result might contain less items than the `limit` value.
style: form
explode: true
schema:
type: boolean
example: false
- name: offset
in: query
description: |
Number of items that should be skipped at the start. The default value
is `0`.
style: form
explode: true
schema:
type: number
format: double
example: 0
- name: limit
in: query
description: Maximum number of items to return. By default there is no limit.
style: form
explode: true
schema:
type: number
format: double
example: 99
- name: fields
in: query
description: |
A comma-separated list of fields which should be picked from the items,
only these fields will remain in the resulting record objects.
Note that the fields in the outputted items are sorted the same way as
they are specified in the `fields` query parameter.
You can use this feature to effectively fix the output format.
style: form
explode: true
schema:
type: string
example: "myValue,myOtherValue"
- name: omit
in: query
description: A comma-separated list of fields which should be omitted from the items.
style: form
explode: true
schema:
type: string
example: "myValue,myOtherValue"
- name: unwind
in: query
description: |
A comma-separated list of fields which should be unwound, in order which
they should be processed. Each field should be either an array or an object.
If the field is an array then every element of
the array will become a separate record and merged with parent object.
If the unwound field is an object then it is merged with the parent object.
If the unwound field is missing or its value is neither an array nor an
object and therefore cannot be merged with a parent object then the item
gets preserved as it is.
Note that the unwound items ignore the `desc` parameter.
style: form
explode: true
schema:
type: string
example: "myValue,myOtherValue"
- name: flatten
in: query
description: |
A comma-separated list of fields which should transform nested objects
into flat structures.
For example, with `flatten="foo"` the object `{"foo":{"bar": "hello"}}`
is turned into `{"foo.bar": "hello"}`.
The original object with properties is replaced with the flattened
object.
style: form
explode: true
schema:
type: string
example: myValue
- name: desc
in: query
description: |
By default, results are returned in the same order as they were stored.
To reverse the order, set this parameter to `true` or `1`.
style: form
explode: true
schema:
type: boolean
example: true
- name: attachment
in: query
description: |
If `true` or `1` then the response will define the `Content-Disposition:
attachment` header, forcing a web browser to download the file rather
than to display it. By default this header is not present.
style: form
explode: true
schema:
type: boolean
example: true
- name: delimiter
in: query
description: |
A delimiter character for CSV files, only used if `format=csv`. You
might need to URL-encode the character (e.g. use `%09` for tab or `%3B`
for semicolon). The default delimiter is a simple comma (`,`).
style: form
explode: true
schema:
type: string
example: ;
- name: bom
in: query
description: |
All text responses are encoded in UTF-8 encoding. By default, the
`format=csv` files are prefixed with
the UTF-8 Byte Order Mark (BOM), while `json`, `jsonl`, `xml`, `html`
and `rss` files are not.
If you want to override this default behavior, specify `bom=1` query
parameter to include the BOM or `bom=0` to skip it.
style: form
explode: true
schema:
type: boolean
example: false
- name: xmlRoot
in: query
description: |
Overrides default root element name of `xml` output. By default the root
element is `items`.
style: form
explode: true
schema:
type: string
example: items
- name: xmlRow
in: query
description: |
Overrides default element name that wraps each page or page function
result object in `xml` output. By default the element name is `item`.
style: form
explode: true
schema:
type: string
example: item
- name: skipHeaderRow
in: query
description: If `true` or `1` then header row in the `csv` format is skipped.
style: form
explode: true
schema:
type: boolean
example: true
- name: skipHidden
in: query
description: |
If `true` or `1` then hidden fields are skipped from the output,
i.e. fields starting with the `#` character.
style: form
explode: true
schema:
type: boolean
example: false
- name: skipEmpty
in: query
description: |
If `true` or `1` then empty items are skipped from the output.
Note that if used, the results might contain less items than the limit
value.
style: form
explode: true
schema:
type: boolean
example: false
- name: simplified
in: query
description: |
If `true` or `1` then, the endpoint applies the
`fields=url,pageFunctionResult,errorInfo`
and `unwind=pageFunctionResult` query parameters. This feature is used
to emulate simplified results provided by the
legacy Apify Crawler product and it's not recommended to use it in new
integrations.
style: form
explode: true
schema:
type: boolean
example: false
- name: skipFailedPages
in: query
description: |
If `true` or `1` then, the all the items with errorInfo property will be
skipped from the output.
This feature is here to emulate functionality of API version 1 used for
the legacy Apify Crawler product and it's not recommended to use it in
new integrations.
style: form
explode: true
schema:
type: boolean
example: false
requestBody:
description: ""
content:
application/json:
schema:
type: object
example:
foo: bar
application/x-www-form-urlencoded:
schema:
type: object
text/plain:
schema:
type: string
required: true
responses:
"201":
description: ""
headers:
X-Apify-Pagination-Offset:
content:
text/plain:
schema:
type: string
example: "0"
X-Apify-Pagination-Limit:
content:
text/plain:
schema:
type: string
example: "100"
X-Apify-Pagination-Count:
content:
text/plain:
schema:
type: string
example: "100"
X-Apify-Pagination-Total:
content:
text/plain:
schema:
type: string
example: "10204"
content:
application/json:
schema:
type: array
items:
type: object
example:
- myValue: some value
myOtherValue: some other value
"400":
description: ""
headers: {}
content:
application/json:
schema:
$ref: ../../components/schemas/common/ErrorResponse.yaml
example:
error:
type: run-failed
message: >-
Actor run did not succeed (run ID: 55uatRrZib4xbZs, status:
FAILED)
"408":
description: ""
headers: {}
content:
application/json:
schema:
$ref: ../../components/schemas/common/ErrorResponse.yaml
example:
error:
type: run-timeout-exceeded
message: Actor run exceeded timeout of 300 seconds for this API endpoint
deprecated: false
x-legacy-doc-urls:
- https://docs.apify.com/api/v2#/reference/actors/run-actor-synchronously-and-get-dataset-items/run-actor-synchronously-with-input-and-get-dataset-items
- https://docs.apify.com/api/v2#/reference/actors/run-actor-synchronously-with-input-and-get-dataset-items
- https://docs.apify.com/api/v2#tag/ActorsRun-Actor-synchronously-and-get-dataset-items/operation/act_runSyncGetDatasetItems_post
get:
tags:
- Actors/Actor runs
summary: Run Actor synchronously without input and get dataset items
description: |
Runs a specific Actor and returns its dataset items.
The run must finish in 300<!-- MAX_ACTOR_JOB_SYNC_WAIT_SECS --> seconds
otherwise the API endpoint returns a timeout error.
The Actor is not passed any input.
It allows to send all possible options in parameters from [Get Dataset
Items](#/reference/datasets/item-collection/get-items) API endpoint.
Beware that it might be impossible to maintain an idle HTTP connection for a
long period of time,
due to client timeout or network conditions. Make sure your HTTP client is
configured to have a long enough connection timeout.
If the connection breaks, you will not receive any information about the run
and its status.
To run the Actor asynchronously, use the [Run
Actor](#/reference/actors/run-collection/run-actor) API endpoint instead.
operationId: act_runSyncGetDatasetItems_get
parameters:
- name: actorId
in: path
description: Actor ID or a tilde-separated owner's username and Actor name.
required: true
style: simple
schema:
type: string
example: janedoe~my-actor
- name: timeout
in: query
description: |
Optional timeout for the run, in seconds. By default, the run uses a
timeout specified in the default run configuration for the Actor.
style: form
explode: true
schema:
type: number
format: double
example: 60
- name: memory
in: query
description: |
Memory limit for the run, in megabytes. The amount of memory can be set
to a power of 2 with a minimum of 128. By default, the run uses a memory
limit specified in the default run configuration for the Actor.
style: form
explode: true
schema:
type: number
format: double
example: 256
- $ref: ../../components/parameters/actor-run-options/maxItems.yaml
- $ref: ../../components/parameters/actor-run-options/maxTotalChargeUsd.yaml
- name: restartOnError
in: query
description: |
Determines whether the run will be restarted if it fails.
style: form
explode: true
schema:
type: boolean
example: false
- name: build
in: query
description: |
Specifies the Actor build to run. It can be either a build tag or build
number. By default, the run uses the build specified in the default run
configuration for the Actor (typically `latest`).
style: form
explode: true
schema:
type: string
example: 0.1.234
- name: webhooks
in: query
description: |
Specifies optional webhooks associated with the Actor run, which can be
used to receive a notification
e.g. when the Actor finished or failed. The value is a Base64-encoded
JSON array of objects defining the webhooks. For more information, see
[Webhooks documentation](https://docs.apify.com/platform/integrations/webhooks).
style: form
explode: true
schema:
type: string
example: dGhpcyBpcyBqdXN0IGV4YW1wbGUK...
- name: format
in: query
description: |
Format of the results, possible values are: `json`, `jsonl`, `csv`,
`html`, `xlsx`, `xml` and `rss`. The default value is `json`.
style: form
explode: true
schema:
type: string
example: json
- name: clean
in: query
description: |
If `true` or `1` then the API endpoint returns only non-empty items and
skips hidden fields (i.e. fields starting with the # character).
The `clean` parameter is just a shortcut for `skipHidden=true` and `skipEmpty=true` parameters.
Note that since some objects might be skipped from the output, that the
result might contain less items than the `limit` value.
style: form
explode: true
schema:
type: boolean
example: false
- name: offset
in: query
description: |
Number of items that should be skipped at the start. The default value is `0`.
style: form
explode: true
schema:
type: number
format: double
example: 0
- name: limit
in: query
description: Maximum number of items to return. By default there is no limit.
style: form
explode: true
schema:
type: number
format: double
example: 99
- name: fields
in: query
description: |
A comma-separated list of fields which should be picked from the items,
only these fields will remain in the resulting record objects.
Note that the fields in the outputted items are sorted the same way as
they are specified in the `fields` query parameter.
You can use this feature to effectively fix the output format.
style: form
explode: true
schema:
type: string
example: "myValue,myOtherValue"
- name: omit
in: query
description: A comma-separated list of fields which should be omitted from the items.
style: form
explode: true
schema:
type: string
example: "myValue,myOtherValue"
- name: unwind
in: query
description: |
A comma-separated list of fields which should be unwound, in order which
they should be processed. Each field should be either an array or an object.
If the field is an array then every element of
the array will become a separate record and merged with parent object.
If the unwound field is an object then it is merged with the parent object
If the unwound field is missing or its value is neither an array nor an
object and therefore cannot be merged with a parent object then the item
gets preserved as it is.
Note that the unwound items ignore the `desc` parameter.
style: form
explode: true
schema:
type: string
example: "myValue,myOtherValue"
- name: flatten
in: query
description: |
A comma-separated list of fields which should transform nested objects into flat structures.
For example, with `flatten="foo"` the object `{"foo":{"bar": "hello"}}` is turned into `{"foo.bar": "hello"}`.
The original object with properties is replaced with the flattened object.
style: form
explode: true
schema:
type: string
example: myValue
- name: desc
in: query
description: |
By default, results are returned in the same order as they were stored.
To reverse the order, set this parameter to `true` or `1`.
style: form
explode: true
schema:
type: boolean
example: true
- name: attachment
in: query
description: |
If `true` or `1` then the response will define the `Content-Disposition:
attachment` header, forcing a web browser to download the file rather
than to display it. By default this header is not present.
style: form
explode: true
schema:
type: boolean
example: true
- name: delimiter
in: query
description: |
A delimiter character for CSV files, only used if `format=csv`. You
might need to URL-encode the character (e.g. use `%09` for tab or `%3B`
for semicolon). The default delimiter is a simple comma (`,`).
style: form
explode: true
schema:
type: string
example: ;
- name: bom
in: query
description: |
All text responses are encoded in UTF-8 encoding. By default, the `format=csv` files are prefixed with
the UTF-8 Byte Order Mark (BOM), while `json`, `jsonl`, `xml`, `html` and `rss` files are not.
If you want to override this default behavior, specify `bom=1` query
parameter to include the BOM or `bom=0` to skip it.
style: form
explode: true
schema:
type: boolean
example: false
- name: xmlRoot
in: query
description: |
Overrides default root element name of `xml` output. By default the root
element is `items`.
style: form
explode: true
schema:
type: string
example: items
- name: xmlRow
in: query
description: |
Overrides default element name that wraps each page or page function
result object in `xml` output. By default the element name is `item`.
style: form
explode: true
schema:
type: string
example: item
- name: skipHeaderRow
in: query
description: If `true` or `1` then header row in the `csv` format is skipped.
style: form
explode: true
schema:
type: boolean
example: true
- name: skipHidden
in: query
description: |
If `true` or `1` then hidden fields are skipped from the output,
i.e. fields starting with the `#` character.
style: form
explode: true
schema:
type: boolean
example: false
- name: skipEmpty
in: query
description: |
If `true` or `1` then empty items are skipped from the output.
Note that if used, the results might contain less items than the limit
value.
style: form
explode: true
schema:
type: boolean
example: false
- name: simplified
in: query
description: |
If `true` or `1` then, the endpoint applies the `fields=url,pageFunctionResult,errorInfo`
and `unwind=pageFunctionResult` query parameters. This feature is used
to emulate simplified results provided by the
legacy Apify Crawler product and it's not recommended to use it in new integrations.
style: form
explode: true
schema:
type: boolean
example: false
- name: skipFailedPages
in: query
description: |
If `true` or `1` then, the all the items with errorInfo property will be
skipped from the output.
This feature is here to emulate functionality of API version 1 used for
the legacy Apify Crawler product and it's not recommended to use it in
new integrations.
style: form
explode: true
schema:
type: boolean
example: false
responses:
"201":
description: ""
headers:
X-Apify-Pagination-Offset:
content:
text/plain:
schema:
type: string
example: "0"
X-Apify-Pagination-Limit:
content:
text/plain:
schema:
type: string
example: "100"
X-Apify-Pagination-Count:
content:
text/plain:
schema:
type: string
example: "100"
X-Apify-Pagination-Total:
content:
text/plain:
schema:
type: string
example: "10204"
content:
application/json:
schema:
type: array
items:
type: object
example:
- myValue: some value
myOtherValue: some other value
"400":
description: ""
headers: {}
content:
application/json:
schema:
$ref: ../../components/schemas/common/ErrorResponse.yaml
example:
error:
type: run-failed
message: >-
Actor run did not succeed (run ID: 55uatRrZib4xbZs, status:
FAILED)
"408":
description: ""
headers: {}
content:
application/json:
schema:
$ref: ../../components/schemas/common/ErrorResponse.yaml
example:
error:
type: run-timeout-exceeded
message: Actor run exceeded timeout of 60 seconds for this API endpoint
deprecated: false
x-legacy-doc-urls:
- https://docs.apify.com/api/v2#/reference/actors/run-actor-synchronously-and-get-dataset-items/run-actor-synchronously-without-input-and-get-dataset-items
- https://docs.apify.com/api/v2#/reference/actors/run-actor-synchronously-without-input-and-get-dataset-items
- https://docs.apify.com/api/v2#tag/ActorsRun-Actor-synchronously-and-get-dataset-items/operation/act_runSyncGetDatasetItems_get