generated from n8n-io/n8n-nodes-starter
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathopenapi.json
6869 lines (6869 loc) · 266 KB
/
openapi.json
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\n{@link Page.setExtraHTTPHeaderspage.setExtraHTTPHeaders()}.",
"type": "string"
},
"referrerPolicy": {
"description": "If provided, it will take preference over the referer-policy header value\nset by {@link Page.setExtraHTTPHeaderspage.setExtraHTTPHeaders()}.",
"type": "string"
},
"timeout": {
"description": "Maximum wait time in milliseconds. Pass 0 to disable the timeout.\n\nThe default value can be changed by using the\n{@link Page.setDefaultTimeout} or {@link Page.setDefaultNavigationTimeout}\nmethods.",
"type": "number"
},
"waitUntil": {
"description": "When to consider waiting succeeds. Given an array of event strings, waiting\nis 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\nsession 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\npartitioned cookie is available in. In Firefox, it matches the\nsource origin\n(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:\nhttps://tools.ietf.org/html/draft-west-first-party-cookies",
"enum": [
"Lax",
"None",
"Strict"
],
"type": "string"
},
"CookiePriority": {
"description": "Represents the cookie's 'Priority' status:\nhttps://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\n\"Unset\" allows protocol clients to emulate legacy cookie scope for the scheme.\nThis 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\nthe 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\npartitioned cookie is available in. In Firefox, it matches the\nsource origin\n(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\nclasses used to inject values into them:\n\n- `date` formatted print date\n\n- `title` document title\n\n- `url` document location\n\n- `pageNumber` current page number\n\n- `totalPages` total pages in the document",
"type": "string"
},
"footerTemplate": {
"description": "HTML template for the print footer. Has the same constraints and support\nfor 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\ndeclared 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.\n\nThe 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\nactivating the page using {@link Page.bringToFront} if the page is in the\nbackground.",
"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.\nSee {@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\nfrom file extension. If path is a relative path, then it is resolved\nrelative to current working directory. If no path is provided, the image\nwon'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\nlibraries 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\n\nThis service extends the Browserless open-source image with many features and enhancements for teams automating at scale. Notable features include:\n\n- A Chrome-devtools-protocol based API for extending and enhancing libraries in a cross-language way.\n- A new hybrid-automation toolkit with live session interactivity.\n- Robust session management: connect, reconnect, kill and limit what a browser can do.\n- Bleeding features like multiplexing numerous clients into a single Chrome process in an isolated way.\n- The ability to upload and run custom extensions.\n- Run multiple tokens, with access controls on each.\n- Multi-browser with all the robust capabilities already in the open-source images.\n\nThere's a lot to cover here so let's get started!\n\n# Using the Browserless Proxy\n\n> The Residential proxy is only available for Enterprise and Cloud plans.\n\nBrowserless 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.\n\nUsing 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:\n\n- `?proxy=residential`: Specifies that you want to use the residential proxy for this request. Data-center coming soon.\n- `?proxyCountry=us`: Specifies a country you wish to use for the request. A two-digit ISO code.\n- `?proxySticky=true`: If you want to use the same IP address for the entirety of the session. Generally recommended for most cases.\n\nSimply append these to your connection call, REST API calls, or any library call:\n\n`wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN&proxy=residential&proxyCountry=us&proxySticky`\n\n`https://production-sfo.browserless.io/chromium/unblock?token=YOUR-API-TOKEN&proxy=residential&proxyCountry=us&proxySticky`\n\nPlease do note that using a proxy will increase the amount of units consumed. Every megabyte of data transferred consumes 6 units.\n\n# The Browserless CDP API\n\nIn 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:\n\n- Generate and give back live URLs for hybrid automation.\n- Solve Captchas.\n- Return your page's unique identifier created by Chrome.\n- Way more coming!\n\nSince 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.\n\nGetting 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:\n\n```js\nimport puppeteer from 'puppeteer-core';\n\n(async () => {\n const browserWSEndpoint = 'wss://production-sfo.browserless.io/chromium';\n const browser = await puppeteer.connect({ browserWSEndpoint });\n const page = await browser.newPage();\n const cdp = await page.createCDPSession();\n await page.goto('https://example.com');\n const { liveURL } = await cdp.send('Browserless.liveURL');\n\n // liveURL = 'http://localhost:3000/live/?i=98e83bbfd396241a6963425b1feeba2f';\n})();\n```\n\nYou can then visit this URL in any browser to interact with the headless Chrome running someplace else.\n\nSee more below for a full list of the available APIs and features.\n\n## Browserless.liveURL\n\n> This API is only available for Enterprise plans. [Contact us for more information here.](https://www.browserless.io/contact/)\n\nReturns 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.\n\nProgrammatic 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.\n\n**Basic example**\n\n```js\nimport puppeteer from 'puppeteer-core';\n\n(async () => {\n const browserWSEndpoint =\n 'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';\n const browser = await puppeteer.connect({ browserWSEndpoint });\n const page = await browser.newPage();\n const cdp = await page.createCDPSession();\n await page.goto('https://example.com');\n const { liveURL } = await cdp.send('Browserless.liveURL');\n\n // liveURL = 'https://production-sfo.browserless.io/live/?i=98e83bbfd396241a6963425b1feeba2f';\n})();\n```\n\n**Timeout example**\n\n```js\nimport puppeteer from 'puppeteer-core';\n\n(async () => {\n const browserWSEndpoint =\n 'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';\n const browser = await puppeteer.connect({ browserWSEndpoint });\n const page = await browser.newPage();\n const cdp = await page.createCDPSession();\n await page.goto('https://example.com');\n const { liveURL } = await cdp.send('Browserless.liveURL', {\n timeout: 10000, // 10 seconds to connect!\n });\n\n // liveURL = 'https://production-sfo.browserless.io/live/?i=98e83bbfd396241a6963425b1feeba2f';\n})();\n```\n\n**Setting a Quality and Type**\n\nSetting a \"quality\" and \"type\" effects the streamed quality of the live URL's client-side resolution. By default, Browserless sets these to quality: 100 and type of \"png\". You can experiment different settings to get an ideal resolutions while keep latency slow. The close to 100 quality is, the potential for higher perceived latency.\n\n```js\nimport puppeteer from 'puppeteer-core';\n\n(async () => {\n const browserWSEndpoint =\n 'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';\n const browser = await puppeteer.connect({ browserWSEndpoint });\n const page = await browser.newPage();\n const cdp = await page.createCDPSession();\n await page.goto('https://example.com');\n const { liveURL } = await cdp.send('Browserless.liveURL', {\n quality: 100, // Can be 1 - 100\n type: 'png', // Can be 'jpeg' or 'png'\n });\n\n // liveURL = 'https://production-sfo.browserless.io/live/?i=98e83bbfd396241a6963425b1feeba2f';\n})();\n```\n\nIt's also helpful to \"wait\" until the user is done doing what's needed. For that reason, Browserless will fire a custom event when the page is closed as well:\n\n**Wait for close**\n\n> Custom CDP Events are not supported in all libraries, including .NET Playwright.\n\n```js\nimport puppeteer from 'puppeteer-core';\n\n(async () => {\n const browserWSEndpoint =\n 'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';\n const browser = await puppeteer.connect({ browserWSEndpoint });\n const page = await browser.newPage();\n const cdp = await page.createCDPSession();\n await page.goto('https://example.com');\n\n const { liveURL } = await cdp.send('Browserless.liveURL');\n\n console.log(liveURL);\n\n // Wait for the Browserless.liveComplete event when the live page is closed.\n // Please not that not all libraries support custom CDP events.\n await new Promise((r) => cdp.on('Browserless.liveComplete', r));\n\n console.log('Done!');\n\n await browser.close();\n})();\n```\n\n**Programmatic Control**\n\n```js\nimport puppeteer from 'puppeteer-core';\n\n(async () => {\n const browserWSEndpoint =\n 'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';\n const browser = await puppeteer.connect({ browserWSEndpoint });\n const page = await browser.newPage();\n const cdp = await page.createCDPSession();\n await page.goto('https://example.com');\n\n // Having the liveURLId is required in order to close it later\n const { liveURL, liveURLId } = await cdp.send('Browserless.liveURL');\n\n await page.waitForSelector('.my-selector');\n\n // Calling this CDP API with the \"liveURLId\" will close the session, and terminate the client\n // further usage of the liveURL will fail and no more human-control is possible\n await cdp.send('Browserless.closeLiveURL', { liveURLId });\n\n // Continue to process or interact with the browser, then:\n await browser.close();\n})();\n```\n\nIt's recommended that you double check the page prior to executing further code to make sure the page is where it should be, elements are present, and so forth. This approach makes it easy to solve hard things like second-factor authentication and more in a trivial fashion.\n\n## Browserless.reconnect\n\n> This API is only available for Enterprise plans. [Contact us for more information here.](https://www.browserless.io/contact/)\n\nReconnecting allows for the underlying Chrome or Chromium process to continue to run for a specified amount of time, and subsequent reconnecting back to it. With this approach you can also \"share\" this connection URL to other clients to connect to the same browser process, allowing you to parallelize via a single Browser process.\n\nOnce a reconnection URL is retrieved, Browserless will intercept close-based commands and stop them from terminating the browser process itself. This prevents clients from accidentally closing the process via `browser.close` or similar.\n\nIn order to use this API, simply call `Browserless.reconnect` as a CDP command. You can, optionally, set a `timeout` or an `auth` property. See the below examples for details\n\n**Basic example with timeout**\n\n```js\nimport puppeteer from 'puppeteer-core';\n\n(async () => {\n const browserWSEndpoint =\n 'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';\n const browser = await puppeteer.connect({ browserWSEndpoint });\n const page = await browser.newPage();\n const cdp = await page.createCDPSession();\n await page.goto('https://example.com');\n\n // Allow this browser to run for 10 seconds, then shut down if nothing connects to it.\n // Defaults to the overall timeout set on the instance, which is 5 minutes if not specified.\n const { error, browserWSEndpoint } = await cdp.send('Browserless.reconnect', {\n timeout: 10000,\n });\n\n if (error) throw error;\n\n await browser.close();\n\n // browserWSEndpoint = 'https://production-sfo.browserless.io/reconnect/98e83bbfd396241a6963425b1feeba2f';\n})();\n```\n\nIf you want to enforce authentication, you can pass in an optional `auth` property that clients will need to use in order to connect with. Similar to how authentication works in general, a `token` query-string parameter will need to be applied.\n\n**Authentication example**\n\n```js\nimport puppeteer from 'puppeteer-core';\n\n(async () => {\n const browserWSEndpoint =\n 'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';\n const browser = await puppeteer.connect({ browserWSEndpoint });\n const page = await browser.newPage();\n const cdp = await page.createCDPSession();\n await page.goto('https://example.com');\n\n // Set a custom authentication token that clients have to use in order to connect, or otherwise\n // receive a 401 Response.\n const { error, browserWSEndpoint } = await cdp.send('Browserless.reconnect', {\n auth: 'secret-auth-token',\n });\n\n if (error) throw error;\n\n await browser.close();\n\n // NOTE the URL here doesn't include the auth token!\n // browserWSEndpoint = 'https://production-sfo.browserless.io/reconnect/98e83bbfd396241a6963425b1feeba2f';\n})();\n```\n\n**Recursive Example**\n\n```js\nimport puppeteer from 'puppeteer-core';\n\nconst job = async (reconnectURL) => {\n const browserWSEndpoint =\n reconnectURL ??\n 'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';\n const browser = await puppeteer.connect({ browserWSEndpoint });\n const [page] = await browser.page();\n const cdp = await page.createCDPSession();\n await page.goto('https://example.com');\n\n // Anytime Browserless.reconnect is called, this restarts the timer back to the provided value,\n // effectively \"bumping\" the timer forward.\n const res = await cdp.send('Browserless.reconnect', {\n timeout: 30000,\n });\n\n if (res.error) throw error;\n\n await browser.close();\n\n // Continuously reconnect back...\n return job(res.browserWSEndpoint);\n};\n\njob().catch((e) => console.error(e));\n```\n\n## Browserless.solveCaptcha\n\n> This API is only available for Enterprise and Scale and above plans on Cloud. [Contact us for more information here.](https://www.browserless.io/contact/). Only the `/chrome` and `/chromium` routes support Captcha solving.\n\nBrowserless comes with built-in captcha solving capabilities. We use a variety of techniques to try and mitigate the chances of captchas coming up, but if you happen to run into one you can simply call on our API to solve it.\n\nGiven the amount of possibilities during a captcha solve, the API returns many properties and information in order to help your script be more informed as to what happened. See the below code example for all details and fields returned by the API.\n\nPlease be aware that solving a captcha can take a few seconds up to several minutes, so you'll want to increase your timeouts accordingly for your scripts. Captcha's solved, or attempted to solve, cost 10 units.\n\n```js\nimport puppeteer from 'puppeteer-core';\n\n(async () => {\n const browser = await puppeteer.connect({\n browserWSEndpoint:\n 'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN&timeout=300000',\n });\n\n const page = await browser.newPage();\n const cdp = await page.createCDPSession();\n await page.goto('https://www.google.com/recaptcha/api2/demo', {\n waitUntil: 'networkidle0',\n });\n\n const {\n // A simple boolean indicating whether the script can proceed\n ok,\n // Whether or not a captcha was found\n captchaFound,\n // A human-readable description of what occurred.\n message,\n // Whether a solve was attempted or not\n solveAttempted,\n // If the Captcha was solved, only true if found AND solved\n solved,\n // Any errors during execution are saved here:\n error,\n } = await cdp.send('Browserless.solveCaptcha', {\n // How long to wait for a Captcha to appear to solve.\n // Defaults to 10,000ms, or 10 seconds.\n appearTimeout: 30000,\n });\n\n console.log(message);\n\n if (ok) {\n await page.click('#recaptcha-demo-submit');\n } else {\n console.error(`Error solving captcha!`);\n }\n\n await browser.close();\n})().catch((e) => {\n console.error(e);\n process.exit(1);\n});\n```\n\nIn general, if an `ok` response is sent back from this API, then your script is good to proceed with further actions. If a captcha is to suddenly appears after an action then you might want to listen for the `Browserless.foundCaptcha` event (see below) and retry solving.\n\n## Browserless.foundCaptcha\n\n> This API is only available for Enterprise and Scale and above plans on Cloud. [Contact us for more information here.](https://www.browserless.io/contact/). Only the `/chrome` and `/chromium` routes support Captcha solving.\n\n> Custom CDP Events are not supported in all libraries, including .NET Playwright.\n\nEmitted whenever a captcha widget is found on the page. Useful for checking if there's a captcha and deciding whether or not to proceed with solving.\n\nThe example below stops until a captcha is found, which may or may not be the case with every website out there.\n\n```js\nimport puppeteer from 'puppeteer-core';\n\n// Recaptcha\n(async () => {\n const browser = await puppeteer.connect({\n browserWSEndpoint:\n 'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN&timeout=300000',\n });\n\n const page = await browser.newPage();\n const cdp = await page.createCDPSession();\n\n await page.goto('https://www.google.com/recaptcha/api2/demo', {\n waitUntil: 'networkidle0',\n });\n\n // Please note that not all libraries support custom CDP events.\n await new Promise((resolve) =>\n cdp.on('Browserless.captchaFound', () => {\n console.log('Found a captcha!');\n return resolve();\n }),\n );\n\n const { solved, error } = await cdp.send('Browserless.solveCaptcha');\n console.log({\n solved,\n error,\n });\n\n // Continue...\n await page.click('#recaptcha-demo-submit');\n})().catch((e) => {\n console.error(e);\n process.exit(1);\n});\n```\n\n## Browserless.heartbeat\n\n> This API is only available for Enterprise hosted and Starter and above plans on Cloud. [Contact us for more information here.](https://www.browserless.io/contact/).\n\n> Custom CDP Events are not supported in all libraries, including .NET Playwright.\n\nA custom event emitted every several seconds, signaling a live connection. This is useful for a few reasons:\n\n- It ensure that your connection with the browser is still good.\n- Sending data can trigger some load-balancing technologies to not kill the connection.\n\nToday this event is emitted every 30 seconds.\n\n```js\nimport puppeteer from 'puppeteer-core';\n\nconst browserWSEndpoint = `wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN`;\n\n(async () => {\n const browser = await puppeteer.connect({ browserWSEndpoint });\n const page = await browser.newPage();\n await page.goto('https://example.com/');\n const client = await page.createCDPSession();\n\n client.on('Browserless.heartbeat', () => {\n console.log('Browserless.heartbeat');\n });\n})();\n```\n\n## Browserless.pageId\n\n> This API is only available for Enterprise hosted and Starter and above plans on Cloud. [Contact us for more information here.](https://www.browserless.io/contact/).\n\nA simple helper utility to return the page's unique ID. Since most libraries treat this ID as opaque, and some even hide it, knowing the page's ID can be of great help when interacting with other parts of Browserless.\n\n```js\nimport puppeteer from 'puppeteer-core';\n\n(async () => {\n const browserWSEndpoint = 'wss://production-sfo.browserless.io/chromium';\n const browser = await puppeteer.connect({ browserWSEndpoint });\n const page = await browser.newPage();\n const cdp = await page.createCDPSession();\n const { pageId } = await cdp.send('Browserless.pageId');\n\n // pageId = 'ABC12354AFDC123';\n})();\n```\n\nYou can, optionally, try and \"find\" this ID in puppeteer or similar libraries. Given that puppeteer has this property underscored, it's likely to change or be unavailable in the future, and requires the infamous `// @ts-ignore` comment to allow TypeScript compilation.\n\n```ts\nconst getPageId = (page: Page): string => {\n // @ts-ignore\n return page.target()._targetId;\n};\n```\n\n# Changelog\n"
},
"openapi": "3.0.0",
"paths": {
"/chrome": {
"get": {
"definitions": {},
"description": "Launch and connect to Chromium with a library like puppeteer or others that work over chrome-devtools-protocol.",
"parameters": [
{
"in": "query",
"name": "blockAds",
"schema": {
"description": "Whether or nor to load ad-blocking extensions for the session.\nThis currently uses uBlock Origin and may cause certain sites\nto not load properly.",
"type": "boolean"
}
},
{
"in": "query",
"name": "launch",
"schema": {
"description": "Launch options, which can be either an object\nof puppeteer.launch options or playwright.launchServer\noptions, depending on the API. Must be either JSON\nobject, or a base64-encoded JSON object.",
"anyOf": [
{
"$ref": "#/definitions/CDPLaunchOptions"
},
{
"type": "string"
}
]
}