generated from n8n-io/n8n-nodes-starter
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathopenapi.yml
6525 lines (6066 loc) · 221 KB
/
openapi.yml
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
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
customSiteTitle: Browserless Documentation
definitions:
CDPLaunchOptions:
type: object
properties:
args:
type: array
items:
type: string
defaultViewport:
type: object
properties:
deviceScaleFactor:
type: number
hasTouch:
type: boolean
height:
type: number
isLandscape:
type: boolean
isMobile:
type: boolean
width:
type: number
additionalProperties: false
required:
- height
- width
devtools:
type: boolean
dumpio:
type: boolean
headless:
enum:
- false
- shell
- true
ignoreDefaultArgs:
anyOf:
- type: array
items:
type: string
- type: boolean
ignoreHTTPSErrors:
type: boolean
slowMo:
type: number
stealth:
type: boolean
timeout:
type: number
userDataDir:
type: string
waitForInitialPage:
type: boolean
additionalProperties: false
BrowserServerOptions:
type: object
properties:
args:
type: array
items:
type: string
chromiumSandbox:
type: boolean
devtools:
type: boolean
downloadsPath:
type: string
headless:
type: boolean
ignoreDefaultArgs:
anyOf:
- type: array
items:
type: string
- type: boolean
proxy:
type: object
properties:
bypass:
type: string
password:
type: string
server:
type: string
username:
type: string
additionalProperties: false
required:
- server
timeout:
type: number
tracesDir:
type: string
additionalProperties: false
GoToOptions:
type: object
properties:
referer:
description: >-
If provided, it will take preference over the referer header value set
by
{@link Page.setExtraHTTPHeaderspage.setExtraHTTPHeaders()}.
type: string
referrerPolicy:
description: >-
If provided, it will take preference over the referer-policy header
value
set by {@link Page.setExtraHTTPHeaderspage.setExtraHTTPHeaders()}.
type: string
timeout:
description: >-
Maximum wait time in milliseconds. Pass 0 to disable the timeout.
The default value can be changed by using the
{@link Page.setDefaultTimeout} or {@link
Page.setDefaultNavigationTimeout}
methods.
type: number
waitUntil:
description: >-
When to consider waiting succeeds. Given an array of event strings,
waiting
is considered to be successful after all events have been fired.
anyOf:
- type: array
items:
$ref: '#/definitions/PuppeteerLifeCycleEvent'
- enum:
- domcontentloaded
- load
- networkidle0
- networkidle2
type: string
signal:
$ref: '#/definitions/AbortSignal'
description: A signal object that allows you to cancel the call.
additionalProperties: false
PuppeteerLifeCycleEvent:
enum:
- domcontentloaded
- load
- networkidle0
- networkidle2
type: string
AbortSignal:
type: object
properties:
aborted:
type: boolean
onabort:
type: object
additionalProperties: false
reason: {}
additionalProperties: false
required:
- aborted
- onabort
- reason
Cookie:
description: Represents a cookie object.
type: object
properties:
name:
description: Cookie name.
type: string
value:
description: Cookie value.
type: string
domain:
description: Cookie domain.
type: string
path:
description: Cookie path.
type: string
expires:
description: >-
Cookie expiration date as the number of seconds since the UNIX epoch.
Set to `-1` for
session cookies
type: number
size:
description: Cookie size.
type: number
httpOnly:
description: True if cookie is http-only.
type: boolean
secure:
description: True if cookie is secure.
type: boolean
session:
description: True in case of session cookie.
type: boolean
sameSite:
$ref: '#/definitions/CookieSameSite'
description: Cookie SameSite type.
priority:
$ref: '#/definitions/CookiePriority'
description: Cookie Priority. Supported only in Chrome.
sameParty:
description: True if cookie is SameParty. Supported only in Chrome.
type: boolean
sourceScheme:
$ref: '#/definitions/CookieSourceScheme'
description: Cookie source scheme type. Supported only in Chrome.
partitionKey:
description: |-
Cookie partition key. In Chrome, it is the top-level site the
partitioned cookie is available in. In Firefox, it matches the
source origin
(https://w3c.github.io/webdriver-bidi/#type-storage-PartitionKey).
type: string
partitionKeyOpaque:
description: True if cookie partition key is opaque. Supported only in Chrome.
type: boolean
additionalProperties: false
required:
- domain
- expires
- httpOnly
- name
- path
- secure
- session
- size
- value
CookieSameSite:
description: |-
Represents the cookie's 'SameSite' status:
https://tools.ietf.org/html/draft-west-first-party-cookies
enum:
- Lax
- None
- Strict
type: string
CookiePriority:
description: |-
Represents the cookie's 'Priority' status:
https://tools.ietf.org/html/draft-west-cookie-priority-00
enum:
- High
- Low
- Medium
type: string
CookieSourceScheme:
description: >-
Represents the source scheme of the origin that originally set the cookie.
A value of
"Unset" allows protocol clients to emulate legacy cookie scope for the
scheme.
This is a temporary ability and it will be removed in the future.
enum:
- NonSecure
- Secure
- Unset
type: string
FrameAddScriptTagOptions:
type: object
properties:
url:
description: URL of the script to be added.
type: string
path:
description: Path to a JavaScript file to be injected into the frame.
type: string
content:
description: JavaScript to be injected into the frame.
type: string
type:
description: >-
Sets the `type` of the script. Use `module` in order to load an ES2015
module.
type: string
id:
description: Sets the `id` of the script.
type: string
additionalProperties: false
FrameAddStyleTagOptions:
type: object
properties:
url:
description: the URL of the CSS file to be added.
type: string
path:
description: The path to a CSS file to be injected into the frame.
type: string
content:
description: Raw CSS content to be injected into the frame.
type: string
additionalProperties: false
Credentials:
type: object
properties:
username:
type: string
password:
type: string
additionalProperties: false
required:
- password
- username
CookieParam:
description: Cookie parameter object
type: object
properties:
name:
description: Cookie name.
type: string
value:
description: Cookie value.
type: string
url:
description: >-
The request-URI to associate with the setting of the cookie. This
value can affect
the default domain, path, and source scheme values of the created
cookie.
type: string
domain:
description: Cookie domain.
type: string
path:
description: Cookie path.
type: string
secure:
description: True if cookie is secure.
type: boolean
httpOnly:
description: True if cookie is http-only.
type: boolean
sameSite:
$ref: '#/definitions/CookieSameSite'
description: Cookie SameSite type.
expires:
description: Cookie expiration date, session cookie if not set
type: number
priority:
$ref: '#/definitions/CookiePriority'
description: Cookie Priority. Supported only in Chrome.
sameParty:
description: True if cookie is SameParty. Supported only in Chrome.
type: boolean
sourceScheme:
$ref: '#/definitions/CookieSourceScheme'
description: Cookie source scheme type. Supported only in Chrome.
partitionKey:
description: |-
Cookie partition key. In Chrome, it matches the top-level site the
partitioned cookie is available in. In Firefox, it matches the
source origin
(https://w3c.github.io/webdriver-bidi/#type-storage-PartitionKey).
type: string
additionalProperties: false
required:
- name
- value
PDFOptions:
description: Valid options to configure PDF generation via {@link Page.pdf}.
type: object
properties:
scale:
description: >-
Scales the rendering of the web page. Amount must be between `0.1` and
`2`.
type: number
displayHeaderFooter:
description: Whether to show the header and footer.
type: boolean
headerTemplate:
description: >-
HTML template for the print header. Should be valid HTML with the
following
classes used to inject values into them:
- `date` formatted print date
- `title` document title
- `url` document location
- `pageNumber` current page number
- `totalPages` total pages in the document
type: string
footerTemplate:
description: >-
HTML template for the print footer. Has the same constraints and
support
for special classes as {@link PDFOptions.headerTemplate}.
type: string
printBackground:
description: Set to `true` to print background graphics.
type: boolean
landscape:
description: Whether to print in landscape orientation.
type: boolean
pageRanges:
description: Paper ranges to print, e.g. `1-5, 8, 11-13`.
type: string
format:
$ref: '#/definitions/PaperFormat'
width:
description: >-
Sets the width of paper. You can pass in a number or a string with a
unit.
type:
- string
- number
height:
description: >-
Sets the height of paper. You can pass in a number or a string with a
unit.
type:
- string
- number
preferCSSPageSize:
description: |-
Give any CSS `@page` size declared in the page priority over what is
declared in the `width` or `height` or `format` option.
type: boolean
margin:
$ref: '#/definitions/PDFMargin'
description: Set the PDF margins.
path:
description: The path to save the file to.
type: string
omitBackground:
description: >-
Hides default white background and allows generating pdfs with
transparency.
type: boolean
tagged:
description: Generate tagged (accessible) PDF.
type: boolean
outline:
description: Generate document outline.
type: boolean
timeout:
description: >-
Timeout in milliseconds. Pass `0` to disable timeout.
The default value can be changed by using {@link
Page.setDefaultTimeout}
type: number
waitForFonts:
description: >-
If true, waits for `document.fonts.ready` to resolve. This might
require
activating the page using {@link Page.bringToFront} if the page is in
the
background.
type: boolean
additionalProperties: false
PaperFormat:
description: All the valid paper format types when printing a PDF.
enum:
- A0
- A1
- A2
- A3
- A4
- A5
- A6
- LEDGER
- LEGAL
- LETTER
- Ledger
- Legal
- Letter
- TABLOID
- Tabloid
- a0
- a1
- a2
- a3
- a4
- a5
- a6
- ledger
- legal
- letter
- tabloid
type: string
PDFMargin:
type: object
properties:
top:
type:
- string
- number
bottom:
type:
- string
- number
left:
type:
- string
- number
right:
type:
- string
- number
additionalProperties: false
Partial<ResponseForRequest>:
type: object
properties:
status:
type: number
headers:
$ref: '#/definitions/Record<string,unknown>'
description: Optional response headers. All values are converted to strings.
contentType:
type: string
body:
anyOf:
- type: object
additionalProperties: false
patternProperties:
^[0-9]+$:
type: number
properties:
BYTES_PER_ELEMENT:
type: number
buffer:
$ref: '#/definitions/ArrayBufferLike'
byteLength:
type: number
byteOffset:
type: number
length:
type: number
__@toStringTag@42114:
type: string
const: Uint8Array
required:
- BYTES_PER_ELEMENT
- __@toStringTag@42114
- buffer
- byteLength
- byteOffset
- length
- type: string
additionalProperties: false
Record<string,unknown>:
type: object
additionalProperties: false
ArrayBufferLike:
anyOf:
- $ref: '#/definitions/ArrayBuffer'
- $ref: '#/definitions/SharedArrayBuffer'
ArrayBuffer:
type: object
properties:
byteLength:
type: number
__@toStringTag@42114:
type: string
additionalProperties: false
required:
- __@toStringTag@42114
- byteLength
SharedArrayBuffer:
type: object
properties:
byteLength:
type: number
__@species@42151:
$ref: '#/definitions/SharedArrayBuffer'
__@toStringTag@42114:
type: string
const: SharedArrayBuffer
additionalProperties: false
required:
- __@species@42151
- __@toStringTag@42114
- byteLength
Record<string,string>:
type: object
additionalProperties: false
Viewport:
type: object
properties:
width:
description: The page width in CSS pixels.
type: number
height:
description: The page height in CSS pixels.
type: number
deviceScaleFactor:
description: >-
Specify device scale factor.
See {@link
https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio
devicePixelRatio} for more info.
type: number
isMobile:
description: Whether the `meta viewport` tag is taken into account.
type: boolean
isLandscape:
description: Specifies if the viewport is in landscape mode.
type: boolean
hasTouch:
description: Specify if the viewport supports touch events.
type: boolean
additionalProperties: false
required:
- height
- width
ScreenshotOptions:
type: object
properties:
optimizeForSpeed:
type: boolean
type:
enum:
- jpeg
- png
- webp
type: string
quality:
description: Quality of the image, between 0-100. Not applicable to `png` images.
type: number
fromSurface:
description: Capture the screenshot from the surface, rather than the view.
type: boolean
fullPage:
description: When `true`, takes a screenshot of the full page.
type: boolean
omitBackground:
description: >-
Hides default white background and allows capturing screenshots with
transparency.
type: boolean
path:
description: >-
The file path to save the image to. The screenshot type will be
inferred
from file extension. If path is a relative path, then it is resolved
relative to current working directory. If no path is provided, the
image
won't be saved to the disk.
type: string
clip:
$ref: '#/definitions/ScreenshotClip'
description: Specifies the region of the page/element to clip.
encoding:
description: Encoding of the image.
enum:
- base64
- binary
type: string
captureBeyondViewport:
description: Capture the screenshot beyond the viewport.
type: boolean
additionalProperties: false
ScreenshotClip:
type: object
properties:
scale:
type: number
width:
description: the width of the element in pixels.
type: number
height:
description: the height of the element in pixels.
type: number
x:
type: number
'y':
type: number
additionalProperties: false
required:
- height
- width
- x
- 'y'
JSONSchema:
type: object
properties:
code:
type: string
context:
$ref: '#/definitions/Record<string,string|number>'
additionalProperties: false
required:
- code
Record<string,string|number>:
type: object
additionalProperties: false
CDPJSONPayload:
type: object
properties:
description:
description: The description of the target. Generally the page's title.
type: string
devtoolsFrontendUrl:
description: The fully-qualified URL of the Devtools inspector app.
type: string
id:
description: A Unique Id for the underlying target.
type: string
title:
description: The title of the target. For pages this is the page's title.
type: string
type:
description: The type of target, generally "page" or "background_page".
type: string
url:
description: The current URL the target is consuming or visiting.
type: string
webSocketDebuggerUrl:
description: |-
The target or page's WebSocket Debugger URL. Primarily used for legacy
libraries to connect and inspect or remote automate this target.
type: string
additionalProperties: false
required:
- description
- devtoolsFrontendUrl
- id
- title
- type
- url
- webSocketDebuggerUrl
ScrapeDebugOptions:
type: object
properties:
console:
type: boolean
cookies:
type: boolean
html:
type: boolean
network:
type: boolean
screenshot:
type: boolean
additionalProperties: false
ScrapeElementSelector:
type: object
properties:
selector:
type: string
timeout:
type: number
additionalProperties: false
required:
- selector
InBoundRequest:
type: object
properties:
headers: {}
status:
type: number
url:
type: string
additionalProperties: false
required:
- headers
- status
- url
OutBoundRequest:
type: object
properties:
headers: {}
method:
type: string
url:
type: string
additionalProperties: false
required:
- headers
- method
- url
info:
title: Browserless
version: 2.19.0
x-logo:
altText: browserless logo
url: ./docs/browserless-logo-inline.svg
description: >
# Browserless.io
This service extends the Browserless open-source image with many features
and enhancements for teams automating at scale. Notable features include:
- A Chrome-devtools-protocol based API for extending and enhancing libraries
in a cross-language way.
- A new hybrid-automation toolkit with live session interactivity.
- Robust session management: connect, reconnect, kill and limit what a
browser can do.
- Bleeding features like multiplexing numerous clients into a single Chrome
process in an isolated way.
- The ability to upload and run custom extensions.
- Run multiple tokens, with access controls on each.
- Multi-browser with all the robust capabilities already in the open-source
images.
There's a lot to cover here so let's get started!
# Using the Browserless Proxy
> The Residential proxy is only available for Enterprise and Cloud plans.
Browserless comes with a built-in mechanism to proxy to what's called
"residential" IPs. These are IP addresses are sourced from real-users
running a proxy server on their home networking machines. Residential
proxying is especially useful for things like bypassing certain bot
blockages and more.
Using a residential proxy is as straightforward as adding a few parameters
to your library or API calls. Here's the required parameters and the values
they support:
- `?proxy=residential`: Specifies that you want to use the residential proxy
for this request. Data-center coming soon.
- `?proxyCountry=us`: Specifies a country you wish to use for the request. A
two-digit ISO code.
- `?proxySticky=true`: If you want to use the same IP address for the
entirety of the session. Generally recommended for most cases.
Simply append these to your connection call, REST API calls, or any library
call:
`wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN&proxy=residential&proxyCountry=us&proxySticky`
`https://production-sfo.browserless.io/chromium/unblock?token=YOUR-API-TOKEN&proxy=residential&proxyCountry=us&proxySticky`
Please do note that using a proxy will increase the amount of units
consumed. Every megabyte of data transferred consumes 6 units.
# The Browserless CDP API
In order to enhance the experience with open source libraries like
Puppeteer, we decided to take a new approach to extending these libraries in
a language-agnostic way. We call it the Browserless CDP API. Here's a quick
list of what it can do:
- Generate and give back live URLs for hybrid automation.
- Solve Captchas.
- Return your page's unique identifier created by Chrome.
- Way more coming!
Since most libraries come with a way to issue "raw" CDP commands, it's an
easy way to drop-in custom behaviors without having to write and maintain a
library. Plus you can continue to enjoy using the same packages you've
already come to know.
Getting started with this API is pretty simple. For instance, if you want to
use the live viewer for a particular page, simply do the following:
```js
import puppeteer from 'puppeteer-core';
(async () => {
const browserWSEndpoint = 'wss://production-sfo.browserless.io/chromium';
const browser = await puppeteer.connect({ browserWSEndpoint });
const page = await browser.newPage();
const cdp = await page.createCDPSession();
await page.goto('https://example.com');
const { liveURL } = await cdp.send('Browserless.liveURL');
// liveURL = 'http://localhost:3000/live/?i=98e83bbfd396241a6963425b1feeba2f';
})();
```
You can then visit this URL in any browser to interact with the headless
Chrome running someplace else.
See more below for a full list of the available APIs and features.
## Browserless.liveURL
> This API is only available for Enterprise plans. [Contact us for more
information here.](https://www.browserless.io/contact/)
Returns a fully-qualified URL to load into a web-browser. This URL allows
for clicking, typing and other interactions with the underlying page. This
URL doesn't require an authorization token, so you're free to share it
externally with your own users or employees. If security is a concern, you
can set a `timeout` parameter to limit the amount of time this URL is valid
for. By default no `timeout` is set and the URL is good as long as the
underlying browser is open.
Programmatic control of the session is also available, so you can close the
live session once your code has detected a selector, network call, or
whatever else. See the below example for programmatic control.
**Basic example**
```js
import puppeteer from 'puppeteer-core';
(async () => {
const browserWSEndpoint =
'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';
const browser = await puppeteer.connect({ browserWSEndpoint });
const page = await browser.newPage();
const cdp = await page.createCDPSession();
await page.goto('https://example.com');
const { liveURL } = await cdp.send('Browserless.liveURL');
// liveURL = 'https://production-sfo.browserless.io/live/?i=98e83bbfd396241a6963425b1feeba2f';
})();
```
**Timeout example**
```js
import puppeteer from 'puppeteer-core';
(async () => {
const browserWSEndpoint =
'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';
const browser = await puppeteer.connect({ browserWSEndpoint });
const page = await browser.newPage();
const cdp = await page.createCDPSession();
await page.goto('https://example.com');
const { liveURL } = await cdp.send('Browserless.liveURL', {
timeout: 10000, // 10 seconds to connect!
});
// liveURL = 'https://production-sfo.browserless.io/live/?i=98e83bbfd396241a6963425b1feeba2f';
})();
```