@browserless.io/browserless 2.25.0-beta-2 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -3
- package/README.md +4 -5
- package/build/browserless.js +3 -1
- package/build/browsers/browsers.cdp.d.ts +3 -0
- package/build/browsers/browsers.cdp.js +4 -1
- package/build/browsers/browsers.playwright.d.ts +4 -0
- package/build/browsers/browsers.playwright.js +11 -2
- package/build/browsers/index.js +4 -3
- package/build/http.d.ts +9 -0
- package/build/http.js +9 -0
- package/build/routes/chrome/http/content.post.body.json +8 -8
- package/build/routes/chrome/http/pdf.post.body.json +8 -8
- package/build/routes/chrome/http/scrape.post.body.json +8 -8
- package/build/routes/chrome/http/screenshot.post.body.json +8 -8
- package/build/routes/chrome/tests/kill-sessions.spec.js +1 -1
- package/build/routes/chromium/http/content.post.body.json +8 -8
- package/build/routes/chromium/http/pdf.post.body.json +8 -8
- package/build/routes/chromium/http/scrape.post.body.json +8 -8
- package/build/routes/chromium/http/screenshot.post.body.json +8 -8
- package/build/routes/chromium/tests/kill-sessions.spec.js +1 -1
- package/build/routes/edge/http/content.post.body.json +579 -0
- package/build/routes/edge/http/content.post.d.ts +8 -0
- package/build/routes/edge/http/content.post.js +7 -0
- package/build/routes/edge/http/content.post.query.json +183 -0
- package/build/routes/edge/http/content.post.response.json +5 -0
- package/build/routes/edge/http/download.post.body.json +32 -0
- package/build/routes/edge/http/download.post.d.ts +8 -0
- package/build/routes/edge/http/download.post.js +7 -0
- package/build/routes/edge/http/download.post.query.json +120 -0
- package/build/routes/edge/http/download.post.response.json +4 -0
- package/build/routes/edge/http/function.post.body.json +32 -0
- package/build/routes/edge/http/function.post.d.ts +8 -0
- package/build/routes/edge/http/function.post.js +7 -0
- package/build/routes/edge/http/function.post.query.json +120 -0
- package/build/routes/edge/http/function.post.response.json +4 -0
- package/build/routes/edge/http/json-list.get.d.ts +5 -0
- package/build/routes/edge/http/json-list.get.js +5 -0
- package/build/routes/edge/http/json-list.get.response.json +52 -0
- package/build/routes/edge/http/json-new.put.d.ts +5 -0
- package/build/routes/edge/http/json-new.put.js +5 -0
- package/build/routes/edge/http/json-new.put.response.json +44 -0
- package/build/routes/edge/http/json-protocol.get.d.ts +5 -0
- package/build/routes/edge/http/json-protocol.get.js +5 -0
- package/build/routes/edge/http/json-protocol.get.response.json +6 -0
- package/build/routes/edge/http/json-version.get.d.ts +5 -0
- package/build/routes/edge/http/json-version.get.js +5 -0
- package/build/routes/edge/http/json-version.get.response.json +44 -0
- package/build/routes/edge/http/pdf.post.body.json +724 -0
- package/build/routes/edge/http/pdf.post.d.ts +8 -0
- package/build/routes/edge/http/pdf.post.js +7 -0
- package/build/routes/edge/http/pdf.post.query.json +120 -0
- package/build/routes/edge/http/pdf.post.response.json +5 -0
- package/build/routes/edge/http/performance.post.body.json +26 -0
- package/build/routes/edge/http/performance.post.d.ts +8 -0
- package/build/routes/edge/http/performance.post.js +7 -0
- package/build/routes/edge/http/performance.post.query.json +120 -0
- package/build/routes/edge/http/performance.post.response.json +7 -0
- package/build/routes/edge/http/scrape.post.body.json +626 -0
- package/build/routes/edge/http/scrape.post.d.ts +8 -0
- package/build/routes/edge/http/scrape.post.js +7 -0
- package/build/routes/edge/http/scrape.post.query.json +183 -0
- package/build/routes/edge/http/scrape.post.response.json +334 -0
- package/build/routes/edge/http/screenshot.post.body.json +669 -0
- package/build/routes/edge/http/screenshot.post.d.ts +8 -0
- package/build/routes/edge/http/screenshot.post.js +7 -0
- package/build/routes/edge/http/screenshot.post.query.json +120 -0
- package/build/routes/edge/http/screenshot.post.response.json +5 -0
- package/build/routes/edge/tests/content.spec.d.ts +1 -0
- package/build/routes/edge/tests/content.spec.js +312 -0
- package/build/routes/edge/tests/download.spec.d.ts +1 -0
- package/build/routes/edge/tests/download.spec.js +67 -0
- package/build/routes/edge/tests/function.spec.d.ts +1 -0
- package/build/routes/edge/tests/function.spec.js +277 -0
- package/build/routes/edge/tests/json-version.spec.d.ts +1 -0
- package/build/routes/edge/tests/json-version.spec.js +37 -0
- package/build/routes/edge/tests/kill-sessions.spec.d.ts +1 -0
- package/build/routes/edge/tests/kill-sessions.spec.js +80 -0
- package/build/routes/edge/tests/page-websocket.spec.d.ts +1 -0
- package/build/routes/edge/tests/page-websocket.spec.js +97 -0
- package/build/routes/edge/tests/pdf.spec.d.ts +1 -0
- package/build/routes/edge/tests/pdf.spec.js +345 -0
- package/build/routes/edge/tests/performance.spec.d.ts +1 -0
- package/build/routes/edge/tests/performance.spec.js +124 -0
- package/build/routes/edge/tests/scrape.spec.d.ts +1 -0
- package/build/routes/edge/tests/scrape.spec.js +354 -0
- package/build/routes/edge/tests/screenshot.spec.d.ts +1 -0
- package/build/routes/edge/tests/screenshot.spec.js +339 -0
- package/build/routes/edge/tests/websocket.spec.d.ts +1 -0
- package/build/routes/edge/tests/websocket.spec.js +384 -0
- package/build/routes/edge/ws/browser.d.ts +7 -0
- package/build/routes/edge/ws/browser.js +6 -0
- package/build/routes/edge/ws/browser.query.json +120 -0
- package/build/routes/edge/ws/cdp.d.ts +8 -0
- package/build/routes/edge/ws/cdp.js +7 -0
- package/build/routes/edge/ws/cdp.query.json +120 -0
- package/build/routes/edge/ws/page.d.ts +8 -0
- package/build/routes/edge/ws/page.js +7 -0
- package/build/routes/edge/ws/page.query.json +120 -0
- package/build/routes/edge/ws/playwright.d.ts +8 -0
- package/build/routes/edge/ws/playwright.js +7 -0
- package/build/routes/edge/ws/playwright.query.json +100 -0
- package/build/routes/firefox/tests/kill-sessions.spec.js +1 -1
- package/build/routes/management/http/meta.get.js +3 -1
- package/build/routes/webkit/tests/kill-sessions.spec.js +1 -1
- package/build/sdk-utils.js +1 -1
- package/build/shared/scrape.http.js +2 -2
- package/build/types.d.ts +32 -0
- package/build/types.js +18 -0
- package/build/utils.d.ts +1 -0
- package/build/utils.js +16 -2
- package/docker/chrome/Dockerfile +14 -14
- package/docker/chromium/Dockerfile +14 -14
- package/docker/edge/.dockerignore +16 -0
- package/docker/edge/Dockerfile +43 -0
- package/docker/firefox/Dockerfile +14 -14
- package/docker/multi/Dockerfile +18 -18
- package/docker/sdk/Dockerfile +10 -0
- package/extensions/ublock/_locales/ar/messages.json +3 -3
- package/extensions/ublock/_locales/bg/messages.json +1 -1
- package/extensions/ublock/_locales/br_FR/messages.json +2 -2
- package/extensions/ublock/_locales/cy/messages.json +11 -11
- package/extensions/ublock/_locales/el/messages.json +2 -2
- package/extensions/ublock/_locales/hu/messages.json +1 -1
- package/extensions/ublock/_locales/id/messages.json +1 -1
- package/extensions/ublock/_locales/lv/messages.json +4 -4
- package/extensions/ublock/_locales/mk/messages.json +130 -130
- package/extensions/ublock/_locales/oc/messages.json +1 -1
- package/extensions/ublock/_locales/pt_BR/messages.json +1 -1
- package/extensions/ublock/_locales/pt_PT/messages.json +2 -2
- package/extensions/ublock/_locales/si/messages.json +100 -100
- package/extensions/ublock/_locales/sr/messages.json +4 -4
- package/extensions/ublock/_locales/vi/messages.json +19 -19
- package/extensions/ublock/_locales/zh_TW/messages.json +28 -28
- package/extensions/ublock/assets/assets.json +33 -29
- package/extensions/ublock/assets/thirdparties/easylist/easylist.txt +2984 -3287
- package/extensions/ublock/assets/thirdparties/easylist/easyprivacy.txt +150 -171
- package/extensions/ublock/assets/thirdparties/pgl.yoyo.org/as/serverlist +37 -27
- package/extensions/ublock/assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat +802 -888
- package/extensions/ublock/assets/thirdparties/urlhaus-filter/urlhaus-filter-online.txt +2355 -2071
- package/extensions/ublock/assets/ublock/badlists.txt +9 -1
- package/extensions/ublock/assets/ublock/badware.min.txt +354 -243
- package/extensions/ublock/assets/ublock/filters.min.txt +5837 -5737
- package/extensions/ublock/assets/ublock/privacy.min.txt +151 -38
- package/extensions/ublock/assets/ublock/quick-fixes.min.txt +83 -127
- package/extensions/ublock/assets/ublock/unbreak.min.txt +66 -50
- package/extensions/ublock/css/codemirror.css +4 -0
- package/extensions/ublock/document-blocked.html +3 -1
- package/extensions/ublock/js/arglist-parser.js +116 -0
- package/extensions/ublock/js/background.js +1 -1
- package/extensions/ublock/js/logger-ui.js +1 -1
- package/extensions/ublock/js/messaging.js +9 -2
- package/extensions/ublock/js/pagestore.js +3 -1
- package/extensions/ublock/js/redirect-engine.js +3 -1
- package/extensions/ublock/{assets/resources/set-attr.js → js/resources/attribute.js} +115 -11
- package/extensions/ublock/js/resources/base.js +38 -0
- package/extensions/ublock/js/resources/cookie.js +419 -0
- package/extensions/ublock/js/resources/href-sanitizer.js +188 -0
- package/extensions/ublock/js/resources/localstorage.js +235 -0
- package/extensions/ublock/js/resources/parse-replace.js +54 -0
- package/extensions/ublock/js/resources/prevent-settimeout.js +236 -0
- package/extensions/ublock/js/resources/proxy-apply.js +109 -0
- package/extensions/ublock/js/resources/replace-argument.js +120 -0
- package/extensions/ublock/{assets → js}/resources/run-at.js +20 -4
- package/extensions/ublock/{assets → js}/resources/safe-self.js +5 -4
- package/extensions/ublock/{assets → js}/resources/scriptlets.js +90 -1589
- package/extensions/ublock/js/resources/set-constant.js +287 -0
- package/extensions/ublock/js/resources/shared.js +44 -0
- package/extensions/ublock/js/resources/spoof-css.js +163 -0
- package/extensions/ublock/js/s14e-serializer.js +2 -1
- package/extensions/ublock/js/scriptlet-filtering-core.js +1 -1
- package/extensions/ublock/js/scriptlet-filtering.js +1 -31
- package/extensions/ublock/js/static-dnr-filtering.js +143 -129
- package/extensions/ublock/js/static-filtering-parser.js +27 -117
- package/extensions/ublock/js/static-net-filtering.js +53 -141
- package/extensions/ublock/js/traffic.js +1 -1
- package/extensions/ublock/js/urlskip.js +166 -0
- package/extensions/ublock/js/vapi-background-ext.js +38 -14
- package/extensions/ublock/manifest.json +1 -1
- package/package.json +22 -22
- package/src/browserless.ts +4 -0
- package/src/browsers/browsers.cdp.ts +5 -0
- package/src/browsers/browsers.playwright.ts +14 -1
- package/src/browsers/index.ts +5 -2
- package/src/http.ts +9 -0
- package/src/routes/chrome/tests/kill-sessions.spec.ts +1 -1
- package/src/routes/chromium/tests/kill-sessions.spec.ts +1 -1
- package/src/routes/edge/http/content.post.ts +20 -0
- package/src/routes/edge/http/download.post.ts +20 -0
- package/src/routes/edge/http/function.post.ts +20 -0
- package/src/routes/edge/http/json-list.get.ts +7 -0
- package/src/routes/edge/http/json-new.put.ts +7 -0
- package/src/routes/edge/http/json-protocol.get.ts +7 -0
- package/src/routes/edge/http/json-version.get.ts +7 -0
- package/src/routes/edge/http/pdf.post.ts +20 -0
- package/src/routes/edge/http/performance.post.ts +20 -0
- package/src/routes/edge/http/scrape.post.ts +20 -0
- package/src/routes/edge/http/screenshot.post.ts +20 -0
- package/src/routes/edge/tests/content.spec.ts +376 -0
- package/src/routes/edge/tests/download.spec.ts +77 -0
- package/src/routes/edge/tests/function.spec.ts +317 -0
- package/src/routes/edge/tests/json-version.spec.ts +52 -0
- package/src/routes/edge/tests/kill-sessions.spec.ts +99 -0
- package/src/routes/edge/tests/page-websocket.spec.ts +129 -0
- package/src/routes/edge/tests/pdf.spec.ts +389 -0
- package/src/routes/edge/tests/performance.spec.ts +155 -0
- package/src/routes/edge/tests/scrape.spec.ts +417 -0
- package/src/routes/edge/tests/screenshot.spec.ts +387 -0
- package/src/routes/edge/tests/websocket.spec.ts +510 -0
- package/src/routes/edge/ws/browser.ts +10 -0
- package/src/routes/edge/ws/cdp.ts +17 -0
- package/src/routes/edge/ws/page.ts +10 -0
- package/src/routes/edge/ws/playwright.ts +17 -0
- package/src/routes/firefox/tests/kill-sessions.spec.ts +1 -1
- package/src/routes/management/http/meta.get.ts +6 -1
- package/src/routes/management/http/static.get.ts +1 -1
- package/src/routes/webkit/tests/kill-sessions.spec.ts +1 -1
- package/src/sdk-utils.ts +1 -1
- package/src/shared/scrape.http.ts +2 -2
- package/src/types.ts +19 -0
- package/src/utils.ts +38 -16
- package/static/docs/swagger.json +2097 -10
- package/static/docs/swagger.min.json +2096 -9
- package/static/function/client.js +141 -253
- package/static/function/index.html +141 -253
|
@@ -280,14 +280,14 @@
|
|
|
280
280
|
"length": {
|
|
281
281
|
"type": "number"
|
|
282
282
|
},
|
|
283
|
-
"__@toStringTag@
|
|
283
|
+
"__@toStringTag@12613": {
|
|
284
284
|
"type": "string",
|
|
285
285
|
"const": "Uint8Array"
|
|
286
286
|
}
|
|
287
287
|
},
|
|
288
288
|
"required": [
|
|
289
289
|
"BYTES_PER_ELEMENT",
|
|
290
|
-
"__@toStringTag@
|
|
290
|
+
"__@toStringTag@12613",
|
|
291
291
|
"buffer",
|
|
292
292
|
"byteLength",
|
|
293
293
|
"byteOffset",
|
|
@@ -322,13 +322,13 @@
|
|
|
322
322
|
"byteLength": {
|
|
323
323
|
"type": "number"
|
|
324
324
|
},
|
|
325
|
-
"__@toStringTag@
|
|
325
|
+
"__@toStringTag@12613": {
|
|
326
326
|
"type": "string"
|
|
327
327
|
}
|
|
328
328
|
},
|
|
329
329
|
"additionalProperties": false,
|
|
330
330
|
"required": [
|
|
331
|
-
"__@toStringTag@
|
|
331
|
+
"__@toStringTag@12613",
|
|
332
332
|
"byteLength"
|
|
333
333
|
]
|
|
334
334
|
},
|
|
@@ -338,18 +338,18 @@
|
|
|
338
338
|
"byteLength": {
|
|
339
339
|
"type": "number"
|
|
340
340
|
},
|
|
341
|
-
"__@species@
|
|
341
|
+
"__@species@12651": {
|
|
342
342
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
343
343
|
},
|
|
344
|
-
"__@toStringTag@
|
|
344
|
+
"__@toStringTag@12613": {
|
|
345
345
|
"type": "string",
|
|
346
346
|
"const": "SharedArrayBuffer"
|
|
347
347
|
}
|
|
348
348
|
},
|
|
349
349
|
"additionalProperties": false,
|
|
350
350
|
"required": [
|
|
351
|
-
"__@species@
|
|
352
|
-
"__@toStringTag@
|
|
351
|
+
"__@species@12651",
|
|
352
|
+
"__@toStringTag@12613",
|
|
353
353
|
"byteLength"
|
|
354
354
|
]
|
|
355
355
|
},
|
|
@@ -1001,7 +1001,7 @@
|
|
|
1001
1001
|
},
|
|
1002
1002
|
"info": {
|
|
1003
1003
|
"title": "Browserless",
|
|
1004
|
-
"version": "2.25.0
|
|
1004
|
+
"version": "2.25.0",
|
|
1005
1005
|
"x-logo": {
|
|
1006
1006
|
"altText": "browserless logo",
|
|
1007
1007
|
"url": "./docs/browserless-logo-inline.svg"
|
|
@@ -5731,6 +5731,2093 @@
|
|
|
5731
5731
|
]
|
|
5732
5732
|
}
|
|
5733
5733
|
},
|
|
5734
|
+
"/edge/content": {
|
|
5735
|
+
"post": {
|
|
5736
|
+
"definitions": {},
|
|
5737
|
+
"description": "A JSON-based API. Given a \"url\" or \"html\" field, runs and returns HTML content after the page has loaded and JavaScript has parsed.",
|
|
5738
|
+
"parameters": [
|
|
5739
|
+
{
|
|
5740
|
+
"in": "query",
|
|
5741
|
+
"name": "blockAds",
|
|
5742
|
+
"schema": {
|
|
5743
|
+
"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.",
|
|
5744
|
+
"type": "boolean"
|
|
5745
|
+
}
|
|
5746
|
+
},
|
|
5747
|
+
{
|
|
5748
|
+
"in": "query",
|
|
5749
|
+
"name": "launch",
|
|
5750
|
+
"schema": {
|
|
5751
|
+
"anyOf": [
|
|
5752
|
+
{
|
|
5753
|
+
"$ref": "#/definitions/CDPLaunchOptions"
|
|
5754
|
+
},
|
|
5755
|
+
{
|
|
5756
|
+
"type": "string"
|
|
5757
|
+
}
|
|
5758
|
+
]
|
|
5759
|
+
}
|
|
5760
|
+
},
|
|
5761
|
+
{
|
|
5762
|
+
"in": "query",
|
|
5763
|
+
"name": "timeout",
|
|
5764
|
+
"schema": {
|
|
5765
|
+
"description": "Override the system-level timeout for this request.\nAccepts a value in milliseconds.",
|
|
5766
|
+
"type": "number"
|
|
5767
|
+
}
|
|
5768
|
+
},
|
|
5769
|
+
{
|
|
5770
|
+
"in": "query",
|
|
5771
|
+
"name": "token",
|
|
5772
|
+
"schema": {
|
|
5773
|
+
"description": "The authorization token",
|
|
5774
|
+
"type": "string"
|
|
5775
|
+
}
|
|
5776
|
+
},
|
|
5777
|
+
{
|
|
5778
|
+
"in": "query",
|
|
5779
|
+
"name": "trackingId",
|
|
5780
|
+
"schema": {
|
|
5781
|
+
"description": "Custom session identifier",
|
|
5782
|
+
"type": "string"
|
|
5783
|
+
}
|
|
5784
|
+
}
|
|
5785
|
+
],
|
|
5786
|
+
"requestBody": {
|
|
5787
|
+
"content": {
|
|
5788
|
+
"application/json": {
|
|
5789
|
+
"schema": {
|
|
5790
|
+
"properties": {
|
|
5791
|
+
"addScriptTag": {
|
|
5792
|
+
"type": "array",
|
|
5793
|
+
"items": {
|
|
5794
|
+
"$ref": "#/definitions/FrameAddScriptTagOptions"
|
|
5795
|
+
}
|
|
5796
|
+
},
|
|
5797
|
+
"addStyleTag": {
|
|
5798
|
+
"type": "array",
|
|
5799
|
+
"items": {
|
|
5800
|
+
"$ref": "#/definitions/FrameAddStyleTagOptions"
|
|
5801
|
+
}
|
|
5802
|
+
},
|
|
5803
|
+
"authenticate": {
|
|
5804
|
+
"anyOf": [
|
|
5805
|
+
{
|
|
5806
|
+
"$ref": "#/definitions/Credentials"
|
|
5807
|
+
},
|
|
5808
|
+
{
|
|
5809
|
+
"type": "null"
|
|
5810
|
+
}
|
|
5811
|
+
]
|
|
5812
|
+
},
|
|
5813
|
+
"bestAttempt": {
|
|
5814
|
+
"description": "When bestAttempt is set to true, browserless attempt to proceed\nwhen \"awaited\" events fail or timeout. This includes things like\ngoto, waitForSelector, and more.",
|
|
5815
|
+
"type": "boolean"
|
|
5816
|
+
},
|
|
5817
|
+
"cookies": {
|
|
5818
|
+
"type": "array",
|
|
5819
|
+
"items": {
|
|
5820
|
+
"$ref": "#/definitions/CookieParam"
|
|
5821
|
+
}
|
|
5822
|
+
},
|
|
5823
|
+
"emulateMediaType": {
|
|
5824
|
+
"type": "string"
|
|
5825
|
+
},
|
|
5826
|
+
"gotoOptions": {
|
|
5827
|
+
"$ref": "#/definitions/GoToOptions"
|
|
5828
|
+
},
|
|
5829
|
+
"html": {
|
|
5830
|
+
"type": "string"
|
|
5831
|
+
},
|
|
5832
|
+
"rejectRequestPattern": {
|
|
5833
|
+
"type": "array",
|
|
5834
|
+
"items": {
|
|
5835
|
+
"type": "string"
|
|
5836
|
+
}
|
|
5837
|
+
},
|
|
5838
|
+
"rejectResourceTypes": {
|
|
5839
|
+
"type": "array",
|
|
5840
|
+
"items": {
|
|
5841
|
+
"enum": [
|
|
5842
|
+
"cspviolationreport",
|
|
5843
|
+
"document",
|
|
5844
|
+
"eventsource",
|
|
5845
|
+
"fetch",
|
|
5846
|
+
"font",
|
|
5847
|
+
"image",
|
|
5848
|
+
"manifest",
|
|
5849
|
+
"media",
|
|
5850
|
+
"other",
|
|
5851
|
+
"ping",
|
|
5852
|
+
"prefetch",
|
|
5853
|
+
"preflight",
|
|
5854
|
+
"script",
|
|
5855
|
+
"signedexchange",
|
|
5856
|
+
"stylesheet",
|
|
5857
|
+
"texttrack",
|
|
5858
|
+
"websocket",
|
|
5859
|
+
"xhr"
|
|
5860
|
+
],
|
|
5861
|
+
"type": "string"
|
|
5862
|
+
}
|
|
5863
|
+
},
|
|
5864
|
+
"requestInterceptors": {
|
|
5865
|
+
"type": "array",
|
|
5866
|
+
"items": {
|
|
5867
|
+
"description": "An array of patterns (using `req.url().match(r.pattern)` to match) and their\ncorresponding responses to use in order to fulfill those requests.",
|
|
5868
|
+
"type": "object",
|
|
5869
|
+
"properties": {
|
|
5870
|
+
"pattern": {
|
|
5871
|
+
"description": "An array of patterns (using `req.url().match(r.pattern)` to match) and their\ncorresponding responses to use in order to fulfill those requests.",
|
|
5872
|
+
"type": "string"
|
|
5873
|
+
},
|
|
5874
|
+
"response": {
|
|
5875
|
+
"$ref": "#/definitions/Partial<ResponseForRequest>"
|
|
5876
|
+
}
|
|
5877
|
+
},
|
|
5878
|
+
"additionalProperties": false,
|
|
5879
|
+
"required": [
|
|
5880
|
+
"pattern",
|
|
5881
|
+
"response"
|
|
5882
|
+
]
|
|
5883
|
+
}
|
|
5884
|
+
},
|
|
5885
|
+
"setExtraHTTPHeaders": {
|
|
5886
|
+
"$ref": "#/definitions/Record<string,string>"
|
|
5887
|
+
},
|
|
5888
|
+
"setJavaScriptEnabled": {
|
|
5889
|
+
"description": "Whether or not to allow JavaScript to run on the page.",
|
|
5890
|
+
"type": "boolean"
|
|
5891
|
+
},
|
|
5892
|
+
"url": {
|
|
5893
|
+
"type": "string"
|
|
5894
|
+
},
|
|
5895
|
+
"userAgent": {
|
|
5896
|
+
"type": "string"
|
|
5897
|
+
},
|
|
5898
|
+
"viewport": {
|
|
5899
|
+
"anyOf": [
|
|
5900
|
+
{
|
|
5901
|
+
"$ref": "#/definitions/Viewport"
|
|
5902
|
+
},
|
|
5903
|
+
{
|
|
5904
|
+
"type": "null"
|
|
5905
|
+
}
|
|
5906
|
+
]
|
|
5907
|
+
},
|
|
5908
|
+
"waitForEvent": {
|
|
5909
|
+
"type": "object",
|
|
5910
|
+
"properties": {
|
|
5911
|
+
"event": {
|
|
5912
|
+
"type": "string"
|
|
5913
|
+
},
|
|
5914
|
+
"timeout": {
|
|
5915
|
+
"type": "number"
|
|
5916
|
+
}
|
|
5917
|
+
},
|
|
5918
|
+
"additionalProperties": false,
|
|
5919
|
+
"required": [
|
|
5920
|
+
"event"
|
|
5921
|
+
]
|
|
5922
|
+
},
|
|
5923
|
+
"waitForFunction": {
|
|
5924
|
+
"type": "object",
|
|
5925
|
+
"properties": {
|
|
5926
|
+
"fn": {
|
|
5927
|
+
"description": "The function, or statement, to be evaluated in browser context",
|
|
5928
|
+
"type": "string"
|
|
5929
|
+
},
|
|
5930
|
+
"polling": {
|
|
5931
|
+
"description": "An interval at which the pageFunction is executed, defaults to raf.\nIf polling is a number, then it is treated as an interval in milliseconds\nat which the function would be executed. If polling is a string,\nthen it can be one of the following values: \"raf\" or \"mutation\"",
|
|
5932
|
+
"type": [
|
|
5933
|
+
"string",
|
|
5934
|
+
"number"
|
|
5935
|
+
]
|
|
5936
|
+
},
|
|
5937
|
+
"timeout": {
|
|
5938
|
+
"description": "Maximum time to wait for in milliseconds. Defaults to 30000 (30 seconds).\nPass 0 to disable timeout.",
|
|
5939
|
+
"type": "number"
|
|
5940
|
+
}
|
|
5941
|
+
},
|
|
5942
|
+
"additionalProperties": false,
|
|
5943
|
+
"required": [
|
|
5944
|
+
"fn"
|
|
5945
|
+
]
|
|
5946
|
+
},
|
|
5947
|
+
"waitForSelector": {
|
|
5948
|
+
"type": "object",
|
|
5949
|
+
"properties": {
|
|
5950
|
+
"hidden": {
|
|
5951
|
+
"type": "boolean"
|
|
5952
|
+
},
|
|
5953
|
+
"selector": {
|
|
5954
|
+
"type": "string"
|
|
5955
|
+
},
|
|
5956
|
+
"timeout": {
|
|
5957
|
+
"type": "number"
|
|
5958
|
+
},
|
|
5959
|
+
"visible": {
|
|
5960
|
+
"type": "boolean"
|
|
5961
|
+
}
|
|
5962
|
+
},
|
|
5963
|
+
"additionalProperties": false,
|
|
5964
|
+
"required": [
|
|
5965
|
+
"selector"
|
|
5966
|
+
]
|
|
5967
|
+
},
|
|
5968
|
+
"waitForTimeout": {
|
|
5969
|
+
"type": "number"
|
|
5970
|
+
}
|
|
5971
|
+
},
|
|
5972
|
+
"type": "object"
|
|
5973
|
+
}
|
|
5974
|
+
}
|
|
5975
|
+
}
|
|
5976
|
+
},
|
|
5977
|
+
"responses": {
|
|
5978
|
+
"200": {
|
|
5979
|
+
"content": {
|
|
5980
|
+
"text/html": {
|
|
5981
|
+
"schema": {
|
|
5982
|
+
"description": "An HTML payload of the website or HTML after JavaScript\nparsing and execution.",
|
|
5983
|
+
"type": "string",
|
|
5984
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
5985
|
+
}
|
|
5986
|
+
}
|
|
5987
|
+
},
|
|
5988
|
+
"description": "An HTML payload of the website or HTML after JavaScript\nparsing and execution."
|
|
5989
|
+
},
|
|
5990
|
+
"400": {
|
|
5991
|
+
"code": 400,
|
|
5992
|
+
"description": "The request contains errors or didn't properly encode content.",
|
|
5993
|
+
"message": "HTTP/1.1 400 Bad Request"
|
|
5994
|
+
},
|
|
5995
|
+
"401": {
|
|
5996
|
+
"code": 401,
|
|
5997
|
+
"description": "The request is missing, or contains bad, authorization credentials.",
|
|
5998
|
+
"message": "HTTP/1.1 401 Unauthorized"
|
|
5999
|
+
},
|
|
6000
|
+
"404": {
|
|
6001
|
+
"code": 404,
|
|
6002
|
+
"description": "Resource couldn't be found.",
|
|
6003
|
+
"message": "HTTP/1.1 404 Not Found"
|
|
6004
|
+
},
|
|
6005
|
+
"408": {
|
|
6006
|
+
"code": 408,
|
|
6007
|
+
"description": "The request took has taken too long to process.",
|
|
6008
|
+
"message": "HTTP/1.1 408 Request Timeout"
|
|
6009
|
+
},
|
|
6010
|
+
"429": {
|
|
6011
|
+
"code": 429,
|
|
6012
|
+
"description": "Too many requests are currently being processed.",
|
|
6013
|
+
"message": "HTTP/1.1 429 Too Many Requests"
|
|
6014
|
+
},
|
|
6015
|
+
"500": {
|
|
6016
|
+
"code": 500,
|
|
6017
|
+
"description": "An internal error occurred when handling the request.",
|
|
6018
|
+
"message": "HTTP/1.1 500 Internal Server Error"
|
|
6019
|
+
}
|
|
6020
|
+
},
|
|
6021
|
+
"summary": "/edge/content",
|
|
6022
|
+
"tags": [
|
|
6023
|
+
"Browser REST APIs"
|
|
6024
|
+
]
|
|
6025
|
+
}
|
|
6026
|
+
},
|
|
6027
|
+
"/edge/download": {
|
|
6028
|
+
"post": {
|
|
6029
|
+
"definitions": {},
|
|
6030
|
+
"description": "A JSON or JavaScript content-type API for returning files Chrome has downloaded during\nthe execution of puppeteer code, which is ran inside context of the browser.\nBrowserless sets up a blank page, a fresh download directory, injects your puppeteer code, and then executes it.\nYou can load external libraries via the \"import\" syntax, and import ESM-style modules\nthat are written for execution inside of the browser. Once your script is finished, any\ndownloaded files from Chromium are returned back with the appropriate content-type header.",
|
|
6031
|
+
"parameters": [
|
|
6032
|
+
{
|
|
6033
|
+
"in": "query",
|
|
6034
|
+
"name": "blockAds",
|
|
6035
|
+
"schema": {
|
|
6036
|
+
"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.",
|
|
6037
|
+
"type": "boolean"
|
|
6038
|
+
}
|
|
6039
|
+
},
|
|
6040
|
+
{
|
|
6041
|
+
"in": "query",
|
|
6042
|
+
"name": "launch",
|
|
6043
|
+
"schema": {
|
|
6044
|
+
"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.",
|
|
6045
|
+
"anyOf": [
|
|
6046
|
+
{
|
|
6047
|
+
"$ref": "#/definitions/CDPLaunchOptions"
|
|
6048
|
+
},
|
|
6049
|
+
{
|
|
6050
|
+
"type": "string"
|
|
6051
|
+
}
|
|
6052
|
+
]
|
|
6053
|
+
}
|
|
6054
|
+
},
|
|
6055
|
+
{
|
|
6056
|
+
"in": "query",
|
|
6057
|
+
"name": "timeout",
|
|
6058
|
+
"schema": {
|
|
6059
|
+
"description": "Override the system-level timeout for this request.\nAccepts a value in milliseconds.",
|
|
6060
|
+
"type": "number"
|
|
6061
|
+
}
|
|
6062
|
+
},
|
|
6063
|
+
{
|
|
6064
|
+
"in": "query",
|
|
6065
|
+
"name": "token",
|
|
6066
|
+
"schema": {
|
|
6067
|
+
"description": "The authorization token",
|
|
6068
|
+
"type": "string"
|
|
6069
|
+
}
|
|
6070
|
+
},
|
|
6071
|
+
{
|
|
6072
|
+
"in": "query",
|
|
6073
|
+
"name": "trackingId",
|
|
6074
|
+
"schema": {
|
|
6075
|
+
"description": "Custom session identifier",
|
|
6076
|
+
"type": "string"
|
|
6077
|
+
}
|
|
6078
|
+
}
|
|
6079
|
+
],
|
|
6080
|
+
"requestBody": {
|
|
6081
|
+
"content": {
|
|
6082
|
+
"application/json": {
|
|
6083
|
+
"schema": {
|
|
6084
|
+
"$ref": "#/definitions/JSONSchema"
|
|
6085
|
+
}
|
|
6086
|
+
},
|
|
6087
|
+
"application/javascript": {
|
|
6088
|
+
"schema": {
|
|
6089
|
+
"type": "string"
|
|
6090
|
+
}
|
|
6091
|
+
}
|
|
6092
|
+
}
|
|
6093
|
+
},
|
|
6094
|
+
"responses": {
|
|
6095
|
+
"200": {
|
|
6096
|
+
"content": {
|
|
6097
|
+
"*/*": {
|
|
6098
|
+
"schema": {
|
|
6099
|
+
"description": "Responses are determined by the returned value of the downloads\nthemselves, so there isn't a static response type for this API.",
|
|
6100
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
6101
|
+
}
|
|
6102
|
+
}
|
|
6103
|
+
},
|
|
6104
|
+
"description": "Responses are determined by the returned value of the downloads\nthemselves, so there isn't a static response type for this API."
|
|
6105
|
+
},
|
|
6106
|
+
"400": {
|
|
6107
|
+
"code": 400,
|
|
6108
|
+
"description": "The request contains errors or didn't properly encode content.",
|
|
6109
|
+
"message": "HTTP/1.1 400 Bad Request"
|
|
6110
|
+
},
|
|
6111
|
+
"401": {
|
|
6112
|
+
"code": 401,
|
|
6113
|
+
"description": "The request is missing, or contains bad, authorization credentials.",
|
|
6114
|
+
"message": "HTTP/1.1 401 Unauthorized"
|
|
6115
|
+
},
|
|
6116
|
+
"404": {
|
|
6117
|
+
"code": 404,
|
|
6118
|
+
"description": "Resource couldn't be found.",
|
|
6119
|
+
"message": "HTTP/1.1 404 Not Found"
|
|
6120
|
+
},
|
|
6121
|
+
"408": {
|
|
6122
|
+
"code": 408,
|
|
6123
|
+
"description": "The request took has taken too long to process.",
|
|
6124
|
+
"message": "HTTP/1.1 408 Request Timeout"
|
|
6125
|
+
},
|
|
6126
|
+
"429": {
|
|
6127
|
+
"code": 429,
|
|
6128
|
+
"description": "Too many requests are currently being processed.",
|
|
6129
|
+
"message": "HTTP/1.1 429 Too Many Requests"
|
|
6130
|
+
},
|
|
6131
|
+
"500": {
|
|
6132
|
+
"code": 500,
|
|
6133
|
+
"description": "An internal error occurred when handling the request.",
|
|
6134
|
+
"message": "HTTP/1.1 500 Internal Server Error"
|
|
6135
|
+
}
|
|
6136
|
+
},
|
|
6137
|
+
"summary": "/edge/download",
|
|
6138
|
+
"tags": [
|
|
6139
|
+
"Browser REST APIs"
|
|
6140
|
+
]
|
|
6141
|
+
}
|
|
6142
|
+
},
|
|
6143
|
+
"/edge/function": {
|
|
6144
|
+
"post": {
|
|
6145
|
+
"definitions": {},
|
|
6146
|
+
"description": "A JSON or JavaScript content-type API for running puppeteer code in the browser's context.\nBrowserless sets up a blank page, injects your puppeteer code, and runs it.\nYou can optionally load external libraries via the \"import\" module that are meant for browser usage.\nValues returned from the function are checked and an appropriate content-type and response is sent back\nto your HTTP call.",
|
|
6147
|
+
"parameters": [
|
|
6148
|
+
{
|
|
6149
|
+
"in": "query",
|
|
6150
|
+
"name": "blockAds",
|
|
6151
|
+
"schema": {
|
|
6152
|
+
"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.",
|
|
6153
|
+
"type": "boolean"
|
|
6154
|
+
}
|
|
6155
|
+
},
|
|
6156
|
+
{
|
|
6157
|
+
"in": "query",
|
|
6158
|
+
"name": "launch",
|
|
6159
|
+
"schema": {
|
|
6160
|
+
"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.",
|
|
6161
|
+
"anyOf": [
|
|
6162
|
+
{
|
|
6163
|
+
"$ref": "#/definitions/CDPLaunchOptions"
|
|
6164
|
+
},
|
|
6165
|
+
{
|
|
6166
|
+
"type": "string"
|
|
6167
|
+
}
|
|
6168
|
+
]
|
|
6169
|
+
}
|
|
6170
|
+
},
|
|
6171
|
+
{
|
|
6172
|
+
"in": "query",
|
|
6173
|
+
"name": "timeout",
|
|
6174
|
+
"schema": {
|
|
6175
|
+
"description": "Override the system-level timeout for this request.\nAccepts a value in milliseconds.",
|
|
6176
|
+
"type": "number"
|
|
6177
|
+
}
|
|
6178
|
+
},
|
|
6179
|
+
{
|
|
6180
|
+
"in": "query",
|
|
6181
|
+
"name": "token",
|
|
6182
|
+
"schema": {
|
|
6183
|
+
"description": "The authorization token",
|
|
6184
|
+
"type": "string"
|
|
6185
|
+
}
|
|
6186
|
+
},
|
|
6187
|
+
{
|
|
6188
|
+
"in": "query",
|
|
6189
|
+
"name": "trackingId",
|
|
6190
|
+
"schema": {
|
|
6191
|
+
"description": "Custom session identifier",
|
|
6192
|
+
"type": "string"
|
|
6193
|
+
}
|
|
6194
|
+
}
|
|
6195
|
+
],
|
|
6196
|
+
"requestBody": {
|
|
6197
|
+
"content": {
|
|
6198
|
+
"application/json": {
|
|
6199
|
+
"schema": {
|
|
6200
|
+
"$ref": "#/definitions/JSONSchema"
|
|
6201
|
+
}
|
|
6202
|
+
},
|
|
6203
|
+
"application/javascript": {
|
|
6204
|
+
"schema": {
|
|
6205
|
+
"type": "string"
|
|
6206
|
+
}
|
|
6207
|
+
}
|
|
6208
|
+
}
|
|
6209
|
+
},
|
|
6210
|
+
"responses": {
|
|
6211
|
+
"200": {
|
|
6212
|
+
"content": {
|
|
6213
|
+
"*/*": {
|
|
6214
|
+
"schema": {
|
|
6215
|
+
"description": "Responses are determined by the returned value of the function\nitself. Binary responses (PDF's, screenshots) are returned back\nas binary data, and primitive JavaScript values are returned back\nby type (HTML data is \"text/html\", Objects are \"application/json\")",
|
|
6216
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
6217
|
+
}
|
|
6218
|
+
}
|
|
6219
|
+
},
|
|
6220
|
+
"description": "Responses are determined by the returned value of the function\nitself. Binary responses (PDF's, screenshots) are returned back\nas binary data, and primitive JavaScript values are returned back\nby type (HTML data is \"text/html\", Objects are \"application/json\")"
|
|
6221
|
+
},
|
|
6222
|
+
"400": {
|
|
6223
|
+
"code": 400,
|
|
6224
|
+
"description": "The request contains errors or didn't properly encode content.",
|
|
6225
|
+
"message": "HTTP/1.1 400 Bad Request"
|
|
6226
|
+
},
|
|
6227
|
+
"401": {
|
|
6228
|
+
"code": 401,
|
|
6229
|
+
"description": "The request is missing, or contains bad, authorization credentials.",
|
|
6230
|
+
"message": "HTTP/1.1 401 Unauthorized"
|
|
6231
|
+
},
|
|
6232
|
+
"404": {
|
|
6233
|
+
"code": 404,
|
|
6234
|
+
"description": "Resource couldn't be found.",
|
|
6235
|
+
"message": "HTTP/1.1 404 Not Found"
|
|
6236
|
+
},
|
|
6237
|
+
"408": {
|
|
6238
|
+
"code": 408,
|
|
6239
|
+
"description": "The request took has taken too long to process.",
|
|
6240
|
+
"message": "HTTP/1.1 408 Request Timeout"
|
|
6241
|
+
},
|
|
6242
|
+
"429": {
|
|
6243
|
+
"code": 429,
|
|
6244
|
+
"description": "Too many requests are currently being processed.",
|
|
6245
|
+
"message": "HTTP/1.1 429 Too Many Requests"
|
|
6246
|
+
},
|
|
6247
|
+
"500": {
|
|
6248
|
+
"code": 500,
|
|
6249
|
+
"description": "An internal error occurred when handling the request.",
|
|
6250
|
+
"message": "HTTP/1.1 500 Internal Server Error"
|
|
6251
|
+
}
|
|
6252
|
+
},
|
|
6253
|
+
"summary": "/edge/function",
|
|
6254
|
+
"tags": [
|
|
6255
|
+
"Browser REST APIs"
|
|
6256
|
+
]
|
|
6257
|
+
}
|
|
6258
|
+
},
|
|
6259
|
+
"/edge/pdf": {
|
|
6260
|
+
"post": {
|
|
6261
|
+
"definitions": {},
|
|
6262
|
+
"description": "A JSON-based API for getting a PDF binary from either a supplied\n\"url\" or \"html\" payload in your request. Many options exist for\ninjecting cookies, request interceptors, user-agents and waiting for\nselectors, timers and more.",
|
|
6263
|
+
"parameters": [
|
|
6264
|
+
{
|
|
6265
|
+
"in": "query",
|
|
6266
|
+
"name": "blockAds",
|
|
6267
|
+
"schema": {
|
|
6268
|
+
"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.",
|
|
6269
|
+
"type": "boolean"
|
|
6270
|
+
}
|
|
6271
|
+
},
|
|
6272
|
+
{
|
|
6273
|
+
"in": "query",
|
|
6274
|
+
"name": "launch",
|
|
6275
|
+
"schema": {
|
|
6276
|
+
"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.",
|
|
6277
|
+
"anyOf": [
|
|
6278
|
+
{
|
|
6279
|
+
"$ref": "#/definitions/CDPLaunchOptions"
|
|
6280
|
+
},
|
|
6281
|
+
{
|
|
6282
|
+
"type": "string"
|
|
6283
|
+
}
|
|
6284
|
+
]
|
|
6285
|
+
}
|
|
6286
|
+
},
|
|
6287
|
+
{
|
|
6288
|
+
"in": "query",
|
|
6289
|
+
"name": "timeout",
|
|
6290
|
+
"schema": {
|
|
6291
|
+
"description": "Override the system-level timeout for this request.\nAccepts a value in milliseconds.",
|
|
6292
|
+
"type": "number"
|
|
6293
|
+
}
|
|
6294
|
+
},
|
|
6295
|
+
{
|
|
6296
|
+
"in": "query",
|
|
6297
|
+
"name": "token",
|
|
6298
|
+
"schema": {
|
|
6299
|
+
"description": "The authorization token",
|
|
6300
|
+
"type": "string"
|
|
6301
|
+
}
|
|
6302
|
+
},
|
|
6303
|
+
{
|
|
6304
|
+
"in": "query",
|
|
6305
|
+
"name": "trackingId",
|
|
6306
|
+
"schema": {
|
|
6307
|
+
"description": "Custom session identifier",
|
|
6308
|
+
"type": "string"
|
|
6309
|
+
}
|
|
6310
|
+
}
|
|
6311
|
+
],
|
|
6312
|
+
"requestBody": {
|
|
6313
|
+
"content": {
|
|
6314
|
+
"application/json": {
|
|
6315
|
+
"schema": {
|
|
6316
|
+
"properties": {
|
|
6317
|
+
"addScriptTag": {
|
|
6318
|
+
"type": "array",
|
|
6319
|
+
"items": {
|
|
6320
|
+
"$ref": "#/definitions/FrameAddScriptTagOptions"
|
|
6321
|
+
}
|
|
6322
|
+
},
|
|
6323
|
+
"addStyleTag": {
|
|
6324
|
+
"type": "array",
|
|
6325
|
+
"items": {
|
|
6326
|
+
"$ref": "#/definitions/FrameAddStyleTagOptions"
|
|
6327
|
+
}
|
|
6328
|
+
},
|
|
6329
|
+
"authenticate": {
|
|
6330
|
+
"anyOf": [
|
|
6331
|
+
{
|
|
6332
|
+
"$ref": "#/definitions/Credentials"
|
|
6333
|
+
},
|
|
6334
|
+
{
|
|
6335
|
+
"type": "null"
|
|
6336
|
+
}
|
|
6337
|
+
]
|
|
6338
|
+
},
|
|
6339
|
+
"bestAttempt": {
|
|
6340
|
+
"description": "When bestAttempt is set to true, browserless attempt to proceed\nwhen \"awaited\" events fail or timeout. This includes things like\ngoto, waitForSelector, and more.",
|
|
6341
|
+
"type": "boolean"
|
|
6342
|
+
},
|
|
6343
|
+
"cookies": {
|
|
6344
|
+
"type": "array",
|
|
6345
|
+
"items": {
|
|
6346
|
+
"$ref": "#/definitions/CookieParam"
|
|
6347
|
+
}
|
|
6348
|
+
},
|
|
6349
|
+
"emulateMediaType": {
|
|
6350
|
+
"type": "string"
|
|
6351
|
+
},
|
|
6352
|
+
"gotoOptions": {
|
|
6353
|
+
"$ref": "#/definitions/GoToOptions"
|
|
6354
|
+
},
|
|
6355
|
+
"html": {
|
|
6356
|
+
"type": "string"
|
|
6357
|
+
},
|
|
6358
|
+
"options": {
|
|
6359
|
+
"$ref": "#/definitions/PDFOptions"
|
|
6360
|
+
},
|
|
6361
|
+
"rejectRequestPattern": {
|
|
6362
|
+
"type": "array",
|
|
6363
|
+
"items": {
|
|
6364
|
+
"type": "string"
|
|
6365
|
+
}
|
|
6366
|
+
},
|
|
6367
|
+
"rejectResourceTypes": {
|
|
6368
|
+
"type": "array",
|
|
6369
|
+
"items": {
|
|
6370
|
+
"enum": [
|
|
6371
|
+
"cspviolationreport",
|
|
6372
|
+
"document",
|
|
6373
|
+
"eventsource",
|
|
6374
|
+
"fetch",
|
|
6375
|
+
"font",
|
|
6376
|
+
"image",
|
|
6377
|
+
"manifest",
|
|
6378
|
+
"media",
|
|
6379
|
+
"other",
|
|
6380
|
+
"ping",
|
|
6381
|
+
"prefetch",
|
|
6382
|
+
"preflight",
|
|
6383
|
+
"script",
|
|
6384
|
+
"signedexchange",
|
|
6385
|
+
"stylesheet",
|
|
6386
|
+
"texttrack",
|
|
6387
|
+
"websocket",
|
|
6388
|
+
"xhr"
|
|
6389
|
+
],
|
|
6390
|
+
"type": "string"
|
|
6391
|
+
}
|
|
6392
|
+
},
|
|
6393
|
+
"requestInterceptors": {
|
|
6394
|
+
"type": "array",
|
|
6395
|
+
"items": {
|
|
6396
|
+
"description": "An array of patterns (using `req.url().match(r.pattern)` to match) and their\ncorresponding responses to use in order to fulfill those requests.",
|
|
6397
|
+
"type": "object",
|
|
6398
|
+
"properties": {
|
|
6399
|
+
"pattern": {
|
|
6400
|
+
"description": "An array of patterns (using `req.url().match(r.pattern)` to match) and their\ncorresponding responses to use in order to fulfill those requests.",
|
|
6401
|
+
"type": "string"
|
|
6402
|
+
},
|
|
6403
|
+
"response": {
|
|
6404
|
+
"$ref": "#/definitions/Partial<ResponseForRequest>"
|
|
6405
|
+
}
|
|
6406
|
+
},
|
|
6407
|
+
"additionalProperties": false,
|
|
6408
|
+
"required": [
|
|
6409
|
+
"pattern",
|
|
6410
|
+
"response"
|
|
6411
|
+
]
|
|
6412
|
+
}
|
|
6413
|
+
},
|
|
6414
|
+
"setExtraHTTPHeaders": {
|
|
6415
|
+
"$ref": "#/definitions/Record<string,string>"
|
|
6416
|
+
},
|
|
6417
|
+
"setJavaScriptEnabled": {
|
|
6418
|
+
"type": "boolean"
|
|
6419
|
+
},
|
|
6420
|
+
"url": {
|
|
6421
|
+
"type": "string"
|
|
6422
|
+
},
|
|
6423
|
+
"userAgent": {
|
|
6424
|
+
"type": "string"
|
|
6425
|
+
},
|
|
6426
|
+
"viewport": {
|
|
6427
|
+
"anyOf": [
|
|
6428
|
+
{
|
|
6429
|
+
"$ref": "#/definitions/Viewport"
|
|
6430
|
+
},
|
|
6431
|
+
{
|
|
6432
|
+
"type": "null"
|
|
6433
|
+
}
|
|
6434
|
+
]
|
|
6435
|
+
},
|
|
6436
|
+
"waitForEvent": {
|
|
6437
|
+
"type": "object",
|
|
6438
|
+
"properties": {
|
|
6439
|
+
"event": {
|
|
6440
|
+
"type": "string"
|
|
6441
|
+
},
|
|
6442
|
+
"timeout": {
|
|
6443
|
+
"type": "number"
|
|
6444
|
+
}
|
|
6445
|
+
},
|
|
6446
|
+
"additionalProperties": false,
|
|
6447
|
+
"required": [
|
|
6448
|
+
"event"
|
|
6449
|
+
]
|
|
6450
|
+
},
|
|
6451
|
+
"waitForFunction": {
|
|
6452
|
+
"type": "object",
|
|
6453
|
+
"properties": {
|
|
6454
|
+
"fn": {
|
|
6455
|
+
"description": "The function, or statement, to be evaluated in browser context",
|
|
6456
|
+
"type": "string"
|
|
6457
|
+
},
|
|
6458
|
+
"polling": {
|
|
6459
|
+
"description": "An interval at which the pageFunction is executed, defaults to raf.\nIf polling is a number, then it is treated as an interval in milliseconds\nat which the function would be executed. If polling is a string,\nthen it can be one of the following values: \"raf\" or \"mutation\"",
|
|
6460
|
+
"type": [
|
|
6461
|
+
"string",
|
|
6462
|
+
"number"
|
|
6463
|
+
]
|
|
6464
|
+
},
|
|
6465
|
+
"timeout": {
|
|
6466
|
+
"description": "Maximum time to wait for in milliseconds. Defaults to 30000 (30 seconds).\nPass 0 to disable timeout.",
|
|
6467
|
+
"type": "number"
|
|
6468
|
+
}
|
|
6469
|
+
},
|
|
6470
|
+
"additionalProperties": false,
|
|
6471
|
+
"required": [
|
|
6472
|
+
"fn"
|
|
6473
|
+
]
|
|
6474
|
+
},
|
|
6475
|
+
"waitForSelector": {
|
|
6476
|
+
"type": "object",
|
|
6477
|
+
"properties": {
|
|
6478
|
+
"hidden": {
|
|
6479
|
+
"type": "boolean"
|
|
6480
|
+
},
|
|
6481
|
+
"selector": {
|
|
6482
|
+
"type": "string"
|
|
6483
|
+
},
|
|
6484
|
+
"timeout": {
|
|
6485
|
+
"type": "number"
|
|
6486
|
+
},
|
|
6487
|
+
"visible": {
|
|
6488
|
+
"type": "boolean"
|
|
6489
|
+
}
|
|
6490
|
+
},
|
|
6491
|
+
"additionalProperties": false,
|
|
6492
|
+
"required": [
|
|
6493
|
+
"selector"
|
|
6494
|
+
]
|
|
6495
|
+
},
|
|
6496
|
+
"waitForTimeout": {
|
|
6497
|
+
"type": "number"
|
|
6498
|
+
}
|
|
6499
|
+
},
|
|
6500
|
+
"type": "object"
|
|
6501
|
+
}
|
|
6502
|
+
}
|
|
6503
|
+
}
|
|
6504
|
+
},
|
|
6505
|
+
"responses": {
|
|
6506
|
+
"200": {
|
|
6507
|
+
"content": {
|
|
6508
|
+
"application/pdf": {
|
|
6509
|
+
"schema": {
|
|
6510
|
+
"description": "Responds with an application/pdf content-type and a binary PDF",
|
|
6511
|
+
"type": "string",
|
|
6512
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
6513
|
+
}
|
|
6514
|
+
}
|
|
6515
|
+
},
|
|
6516
|
+
"description": "Responds with an application/pdf content-type and a binary PDF"
|
|
6517
|
+
},
|
|
6518
|
+
"400": {
|
|
6519
|
+
"code": 400,
|
|
6520
|
+
"description": "The request contains errors or didn't properly encode content.",
|
|
6521
|
+
"message": "HTTP/1.1 400 Bad Request"
|
|
6522
|
+
},
|
|
6523
|
+
"401": {
|
|
6524
|
+
"code": 401,
|
|
6525
|
+
"description": "The request is missing, or contains bad, authorization credentials.",
|
|
6526
|
+
"message": "HTTP/1.1 401 Unauthorized"
|
|
6527
|
+
},
|
|
6528
|
+
"404": {
|
|
6529
|
+
"code": 404,
|
|
6530
|
+
"description": "Resource couldn't be found.",
|
|
6531
|
+
"message": "HTTP/1.1 404 Not Found"
|
|
6532
|
+
},
|
|
6533
|
+
"408": {
|
|
6534
|
+
"code": 408,
|
|
6535
|
+
"description": "The request took has taken too long to process.",
|
|
6536
|
+
"message": "HTTP/1.1 408 Request Timeout"
|
|
6537
|
+
},
|
|
6538
|
+
"429": {
|
|
6539
|
+
"code": 429,
|
|
6540
|
+
"description": "Too many requests are currently being processed.",
|
|
6541
|
+
"message": "HTTP/1.1 429 Too Many Requests"
|
|
6542
|
+
},
|
|
6543
|
+
"500": {
|
|
6544
|
+
"code": 500,
|
|
6545
|
+
"description": "An internal error occurred when handling the request.",
|
|
6546
|
+
"message": "HTTP/1.1 500 Internal Server Error"
|
|
6547
|
+
}
|
|
6548
|
+
},
|
|
6549
|
+
"summary": "/edge/pdf",
|
|
6550
|
+
"tags": [
|
|
6551
|
+
"Browser REST APIs"
|
|
6552
|
+
]
|
|
6553
|
+
}
|
|
6554
|
+
},
|
|
6555
|
+
"/edge/performance": {
|
|
6556
|
+
"post": {
|
|
6557
|
+
"definitions": {},
|
|
6558
|
+
"description": "Run lighthouse performance audits with a supplied \"url\" in your JSON payload.",
|
|
6559
|
+
"parameters": [
|
|
6560
|
+
{
|
|
6561
|
+
"in": "query",
|
|
6562
|
+
"name": "blockAds",
|
|
6563
|
+
"schema": {
|
|
6564
|
+
"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.",
|
|
6565
|
+
"type": "boolean"
|
|
6566
|
+
}
|
|
6567
|
+
},
|
|
6568
|
+
{
|
|
6569
|
+
"in": "query",
|
|
6570
|
+
"name": "launch",
|
|
6571
|
+
"schema": {
|
|
6572
|
+
"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.",
|
|
6573
|
+
"anyOf": [
|
|
6574
|
+
{
|
|
6575
|
+
"$ref": "#/definitions/CDPLaunchOptions"
|
|
6576
|
+
},
|
|
6577
|
+
{
|
|
6578
|
+
"type": "string"
|
|
6579
|
+
}
|
|
6580
|
+
]
|
|
6581
|
+
}
|
|
6582
|
+
},
|
|
6583
|
+
{
|
|
6584
|
+
"in": "query",
|
|
6585
|
+
"name": "timeout",
|
|
6586
|
+
"schema": {
|
|
6587
|
+
"description": "Override the system-level timeout for this request.\nAccepts a value in milliseconds.",
|
|
6588
|
+
"type": "number"
|
|
6589
|
+
}
|
|
6590
|
+
},
|
|
6591
|
+
{
|
|
6592
|
+
"in": "query",
|
|
6593
|
+
"name": "token",
|
|
6594
|
+
"schema": {
|
|
6595
|
+
"description": "The authorization token",
|
|
6596
|
+
"type": "string"
|
|
6597
|
+
}
|
|
6598
|
+
},
|
|
6599
|
+
{
|
|
6600
|
+
"in": "query",
|
|
6601
|
+
"name": "trackingId",
|
|
6602
|
+
"schema": {
|
|
6603
|
+
"description": "Custom session identifier",
|
|
6604
|
+
"type": "string"
|
|
6605
|
+
}
|
|
6606
|
+
}
|
|
6607
|
+
],
|
|
6608
|
+
"requestBody": {
|
|
6609
|
+
"content": {
|
|
6610
|
+
"application/json": {
|
|
6611
|
+
"schema": {
|
|
6612
|
+
"properties": {
|
|
6613
|
+
"budgets": {
|
|
6614
|
+
"type": "array",
|
|
6615
|
+
"items": {
|
|
6616
|
+
"type": "object",
|
|
6617
|
+
"properties": {},
|
|
6618
|
+
"additionalProperties": true
|
|
6619
|
+
}
|
|
6620
|
+
},
|
|
6621
|
+
"config": {
|
|
6622
|
+
"type": "object",
|
|
6623
|
+
"properties": {},
|
|
6624
|
+
"additionalProperties": true
|
|
6625
|
+
},
|
|
6626
|
+
"url": {
|
|
6627
|
+
"type": "string"
|
|
6628
|
+
}
|
|
6629
|
+
},
|
|
6630
|
+
"type": "object"
|
|
6631
|
+
}
|
|
6632
|
+
}
|
|
6633
|
+
}
|
|
6634
|
+
},
|
|
6635
|
+
"responses": {
|
|
6636
|
+
"200": {
|
|
6637
|
+
"content": {
|
|
6638
|
+
"application/json": {
|
|
6639
|
+
"schema": {
|
|
6640
|
+
"description": "The response of the lighthouse stats. Response objects are\ndetermined by the type of budgets and config in the POST\nJSON body",
|
|
6641
|
+
"type": "object",
|
|
6642
|
+
"properties": {},
|
|
6643
|
+
"additionalProperties": true,
|
|
6644
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
6645
|
+
}
|
|
6646
|
+
}
|
|
6647
|
+
},
|
|
6648
|
+
"description": "The response of the lighthouse stats. Response objects are\ndetermined by the type of budgets and config in the POST\nJSON body"
|
|
6649
|
+
},
|
|
6650
|
+
"400": {
|
|
6651
|
+
"code": 400,
|
|
6652
|
+
"description": "The request contains errors or didn't properly encode content.",
|
|
6653
|
+
"message": "HTTP/1.1 400 Bad Request"
|
|
6654
|
+
},
|
|
6655
|
+
"401": {
|
|
6656
|
+
"code": 401,
|
|
6657
|
+
"description": "The request is missing, or contains bad, authorization credentials.",
|
|
6658
|
+
"message": "HTTP/1.1 401 Unauthorized"
|
|
6659
|
+
},
|
|
6660
|
+
"404": {
|
|
6661
|
+
"code": 404,
|
|
6662
|
+
"description": "Resource couldn't be found.",
|
|
6663
|
+
"message": "HTTP/1.1 404 Not Found"
|
|
6664
|
+
},
|
|
6665
|
+
"408": {
|
|
6666
|
+
"code": 408,
|
|
6667
|
+
"description": "The request took has taken too long to process.",
|
|
6668
|
+
"message": "HTTP/1.1 408 Request Timeout"
|
|
6669
|
+
},
|
|
6670
|
+
"429": {
|
|
6671
|
+
"code": 429,
|
|
6672
|
+
"description": "Too many requests are currently being processed.",
|
|
6673
|
+
"message": "HTTP/1.1 429 Too Many Requests"
|
|
6674
|
+
},
|
|
6675
|
+
"500": {
|
|
6676
|
+
"code": 500,
|
|
6677
|
+
"description": "An internal error occurred when handling the request.",
|
|
6678
|
+
"message": "HTTP/1.1 500 Internal Server Error"
|
|
6679
|
+
}
|
|
6680
|
+
},
|
|
6681
|
+
"summary": "/edge/performance",
|
|
6682
|
+
"tags": [
|
|
6683
|
+
"Browser REST APIs"
|
|
6684
|
+
]
|
|
6685
|
+
}
|
|
6686
|
+
},
|
|
6687
|
+
"/edge/scrape": {
|
|
6688
|
+
"post": {
|
|
6689
|
+
"definitions": {},
|
|
6690
|
+
"description": "A JSON-based API that returns text, html, and meta-data from a given list of selectors.\nDebugging information is available by sending in the appropriate flags in the \"debugOpts\"\nproperty. Responds with an array of JSON objects.",
|
|
6691
|
+
"parameters": [
|
|
6692
|
+
{
|
|
6693
|
+
"in": "query",
|
|
6694
|
+
"name": "blockAds",
|
|
6695
|
+
"schema": {
|
|
6696
|
+
"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.",
|
|
6697
|
+
"type": "boolean"
|
|
6698
|
+
}
|
|
6699
|
+
},
|
|
6700
|
+
{
|
|
6701
|
+
"in": "query",
|
|
6702
|
+
"name": "launch",
|
|
6703
|
+
"schema": {
|
|
6704
|
+
"anyOf": [
|
|
6705
|
+
{
|
|
6706
|
+
"$ref": "#/definitions/CDPLaunchOptions"
|
|
6707
|
+
},
|
|
6708
|
+
{
|
|
6709
|
+
"type": "string"
|
|
6710
|
+
}
|
|
6711
|
+
]
|
|
6712
|
+
}
|
|
6713
|
+
},
|
|
6714
|
+
{
|
|
6715
|
+
"in": "query",
|
|
6716
|
+
"name": "timeout",
|
|
6717
|
+
"schema": {
|
|
6718
|
+
"description": "Override the system-level timeout for this request.\nAccepts a value in milliseconds.",
|
|
6719
|
+
"type": "number"
|
|
6720
|
+
}
|
|
6721
|
+
},
|
|
6722
|
+
{
|
|
6723
|
+
"in": "query",
|
|
6724
|
+
"name": "token",
|
|
6725
|
+
"schema": {
|
|
6726
|
+
"description": "The authorization token",
|
|
6727
|
+
"type": "string"
|
|
6728
|
+
}
|
|
6729
|
+
},
|
|
6730
|
+
{
|
|
6731
|
+
"in": "query",
|
|
6732
|
+
"name": "trackingId",
|
|
6733
|
+
"schema": {
|
|
6734
|
+
"description": "Custom session identifier",
|
|
6735
|
+
"type": "string"
|
|
6736
|
+
}
|
|
6737
|
+
}
|
|
6738
|
+
],
|
|
6739
|
+
"requestBody": {
|
|
6740
|
+
"content": {
|
|
6741
|
+
"application/json": {
|
|
6742
|
+
"schema": {
|
|
6743
|
+
"properties": {
|
|
6744
|
+
"addScriptTag": {
|
|
6745
|
+
"type": "array",
|
|
6746
|
+
"items": {
|
|
6747
|
+
"$ref": "#/definitions/FrameAddScriptTagOptions"
|
|
6748
|
+
}
|
|
6749
|
+
},
|
|
6750
|
+
"addStyleTag": {
|
|
6751
|
+
"type": "array",
|
|
6752
|
+
"items": {
|
|
6753
|
+
"$ref": "#/definitions/FrameAddStyleTagOptions"
|
|
6754
|
+
}
|
|
6755
|
+
},
|
|
6756
|
+
"authenticate": {
|
|
6757
|
+
"anyOf": [
|
|
6758
|
+
{
|
|
6759
|
+
"$ref": "#/definitions/Credentials"
|
|
6760
|
+
},
|
|
6761
|
+
{
|
|
6762
|
+
"type": "null"
|
|
6763
|
+
}
|
|
6764
|
+
]
|
|
6765
|
+
},
|
|
6766
|
+
"bestAttempt": {
|
|
6767
|
+
"description": "When bestAttempt is set to true, browserless attempt to proceed\nwhen \"awaited\" events fail or timeout. This includes things like\ngoto, waitForSelector, and more.",
|
|
6768
|
+
"type": "boolean"
|
|
6769
|
+
},
|
|
6770
|
+
"cookies": {
|
|
6771
|
+
"type": "array",
|
|
6772
|
+
"items": {
|
|
6773
|
+
"$ref": "#/definitions/CookieParam"
|
|
6774
|
+
}
|
|
6775
|
+
},
|
|
6776
|
+
"debugOpts": {
|
|
6777
|
+
"$ref": "#/definitions/ScrapeDebugOptions"
|
|
6778
|
+
},
|
|
6779
|
+
"elements": {
|
|
6780
|
+
"type": "array",
|
|
6781
|
+
"items": {
|
|
6782
|
+
"$ref": "#/definitions/ScrapeElementSelector"
|
|
6783
|
+
}
|
|
6784
|
+
},
|
|
6785
|
+
"emulateMediaType": {
|
|
6786
|
+
"type": "string"
|
|
6787
|
+
},
|
|
6788
|
+
"gotoOptions": {
|
|
6789
|
+
"$ref": "#/definitions/GoToOptions"
|
|
6790
|
+
},
|
|
6791
|
+
"html": {
|
|
6792
|
+
"type": "string"
|
|
6793
|
+
},
|
|
6794
|
+
"rejectRequestPattern": {
|
|
6795
|
+
"type": "array",
|
|
6796
|
+
"items": {
|
|
6797
|
+
"type": "string"
|
|
6798
|
+
}
|
|
6799
|
+
},
|
|
6800
|
+
"rejectResourceTypes": {
|
|
6801
|
+
"type": "array",
|
|
6802
|
+
"items": {
|
|
6803
|
+
"enum": [
|
|
6804
|
+
"cspviolationreport",
|
|
6805
|
+
"document",
|
|
6806
|
+
"eventsource",
|
|
6807
|
+
"fetch",
|
|
6808
|
+
"font",
|
|
6809
|
+
"image",
|
|
6810
|
+
"manifest",
|
|
6811
|
+
"media",
|
|
6812
|
+
"other",
|
|
6813
|
+
"ping",
|
|
6814
|
+
"prefetch",
|
|
6815
|
+
"preflight",
|
|
6816
|
+
"script",
|
|
6817
|
+
"signedexchange",
|
|
6818
|
+
"stylesheet",
|
|
6819
|
+
"texttrack",
|
|
6820
|
+
"websocket",
|
|
6821
|
+
"xhr"
|
|
6822
|
+
],
|
|
6823
|
+
"type": "string"
|
|
6824
|
+
}
|
|
6825
|
+
},
|
|
6826
|
+
"requestInterceptors": {
|
|
6827
|
+
"type": "array",
|
|
6828
|
+
"items": {
|
|
6829
|
+
"description": "An array of patterns (using `req.url().match(r.pattern)` to match) and their\ncorresponding responses to use in order to fulfill those requests.",
|
|
6830
|
+
"type": "object",
|
|
6831
|
+
"properties": {
|
|
6832
|
+
"pattern": {
|
|
6833
|
+
"description": "An array of patterns (using `req.url().match(r.pattern)` to match) and their\ncorresponding responses to use in order to fulfill those requests.",
|
|
6834
|
+
"type": "string"
|
|
6835
|
+
},
|
|
6836
|
+
"response": {
|
|
6837
|
+
"$ref": "#/definitions/Partial<ResponseForRequest>"
|
|
6838
|
+
}
|
|
6839
|
+
},
|
|
6840
|
+
"additionalProperties": false,
|
|
6841
|
+
"required": [
|
|
6842
|
+
"pattern",
|
|
6843
|
+
"response"
|
|
6844
|
+
]
|
|
6845
|
+
}
|
|
6846
|
+
},
|
|
6847
|
+
"setExtraHTTPHeaders": {
|
|
6848
|
+
"$ref": "#/definitions/Record<string,string>"
|
|
6849
|
+
},
|
|
6850
|
+
"setJavaScriptEnabled": {
|
|
6851
|
+
"type": "boolean"
|
|
6852
|
+
},
|
|
6853
|
+
"url": {
|
|
6854
|
+
"type": "string"
|
|
6855
|
+
},
|
|
6856
|
+
"userAgent": {
|
|
6857
|
+
"type": "string"
|
|
6858
|
+
},
|
|
6859
|
+
"viewport": {
|
|
6860
|
+
"anyOf": [
|
|
6861
|
+
{
|
|
6862
|
+
"$ref": "#/definitions/Viewport"
|
|
6863
|
+
},
|
|
6864
|
+
{
|
|
6865
|
+
"type": "null"
|
|
6866
|
+
}
|
|
6867
|
+
]
|
|
6868
|
+
},
|
|
6869
|
+
"waitForEvent": {
|
|
6870
|
+
"type": "object",
|
|
6871
|
+
"properties": {
|
|
6872
|
+
"event": {
|
|
6873
|
+
"type": "string"
|
|
6874
|
+
},
|
|
6875
|
+
"timeout": {
|
|
6876
|
+
"type": "number"
|
|
6877
|
+
}
|
|
6878
|
+
},
|
|
6879
|
+
"additionalProperties": false,
|
|
6880
|
+
"required": [
|
|
6881
|
+
"event"
|
|
6882
|
+
]
|
|
6883
|
+
},
|
|
6884
|
+
"waitForFunction": {
|
|
6885
|
+
"type": "object",
|
|
6886
|
+
"properties": {
|
|
6887
|
+
"fn": {
|
|
6888
|
+
"description": "The function, or statement, to be evaluated in browser context",
|
|
6889
|
+
"type": "string"
|
|
6890
|
+
},
|
|
6891
|
+
"polling": {
|
|
6892
|
+
"description": "An interval at which the pageFunction is executed, defaults to raf.\nIf polling is a number, then it is treated as an interval in milliseconds\nat which the function would be executed. If polling is a string,\nthen it can be one of the following values: \"raf\" or \"mutation\"",
|
|
6893
|
+
"type": [
|
|
6894
|
+
"string",
|
|
6895
|
+
"number"
|
|
6896
|
+
]
|
|
6897
|
+
},
|
|
6898
|
+
"timeout": {
|
|
6899
|
+
"description": "Maximum time to wait for in milliseconds. Defaults to 30000 (30 seconds).\nPass 0 to disable timeout.",
|
|
6900
|
+
"type": "number"
|
|
6901
|
+
}
|
|
6902
|
+
},
|
|
6903
|
+
"additionalProperties": false,
|
|
6904
|
+
"required": [
|
|
6905
|
+
"fn"
|
|
6906
|
+
]
|
|
6907
|
+
},
|
|
6908
|
+
"waitForSelector": {
|
|
6909
|
+
"type": "object",
|
|
6910
|
+
"properties": {
|
|
6911
|
+
"hidden": {
|
|
6912
|
+
"type": "boolean"
|
|
6913
|
+
},
|
|
6914
|
+
"selector": {
|
|
6915
|
+
"type": "string"
|
|
6916
|
+
},
|
|
6917
|
+
"timeout": {
|
|
6918
|
+
"type": "number"
|
|
6919
|
+
},
|
|
6920
|
+
"visible": {
|
|
6921
|
+
"type": "boolean"
|
|
6922
|
+
}
|
|
6923
|
+
},
|
|
6924
|
+
"additionalProperties": false,
|
|
6925
|
+
"required": [
|
|
6926
|
+
"selector"
|
|
6927
|
+
]
|
|
6928
|
+
},
|
|
6929
|
+
"waitForTimeout": {
|
|
6930
|
+
"type": "number"
|
|
6931
|
+
}
|
|
6932
|
+
},
|
|
6933
|
+
"type": "object"
|
|
6934
|
+
}
|
|
6935
|
+
}
|
|
6936
|
+
}
|
|
6937
|
+
},
|
|
6938
|
+
"responses": {
|
|
6939
|
+
"200": {
|
|
6940
|
+
"content": {
|
|
6941
|
+
"application/json": {
|
|
6942
|
+
"schema": {
|
|
6943
|
+
"description": "The JSON response body",
|
|
6944
|
+
"type": "object",
|
|
6945
|
+
"properties": {
|
|
6946
|
+
"data": {
|
|
6947
|
+
"anyOf": [
|
|
6948
|
+
{
|
|
6949
|
+
"type": "array",
|
|
6950
|
+
"items": {
|
|
6951
|
+
"type": "object",
|
|
6952
|
+
"properties": {
|
|
6953
|
+
"results": {
|
|
6954
|
+
"type": "array",
|
|
6955
|
+
"items": {
|
|
6956
|
+
"type": "object",
|
|
6957
|
+
"properties": {
|
|
6958
|
+
"attributes": {
|
|
6959
|
+
"description": "A list of HTML attributes of the element",
|
|
6960
|
+
"type": "array",
|
|
6961
|
+
"items": {
|
|
6962
|
+
"type": "object",
|
|
6963
|
+
"properties": {
|
|
6964
|
+
"name": {
|
|
6965
|
+
"description": "The name of the HTML attribute for the element",
|
|
6966
|
+
"type": "string"
|
|
6967
|
+
},
|
|
6968
|
+
"value": {
|
|
6969
|
+
"description": "The value of the HTML attribute for the element",
|
|
6970
|
+
"type": "string"
|
|
6971
|
+
}
|
|
6972
|
+
},
|
|
6973
|
+
"additionalProperties": false,
|
|
6974
|
+
"required": [
|
|
6975
|
+
"name",
|
|
6976
|
+
"value"
|
|
6977
|
+
]
|
|
6978
|
+
}
|
|
6979
|
+
},
|
|
6980
|
+
"height": {
|
|
6981
|
+
"description": "The height the element",
|
|
6982
|
+
"type": "number"
|
|
6983
|
+
},
|
|
6984
|
+
"html": {
|
|
6985
|
+
"description": "The HTML the element",
|
|
6986
|
+
"type": "string"
|
|
6987
|
+
},
|
|
6988
|
+
"left": {
|
|
6989
|
+
"description": "The amount of pixels from the left of the page",
|
|
6990
|
+
"type": "number"
|
|
6991
|
+
},
|
|
6992
|
+
"text": {
|
|
6993
|
+
"description": "The text the element",
|
|
6994
|
+
"type": "string"
|
|
6995
|
+
},
|
|
6996
|
+
"top": {
|
|
6997
|
+
"description": "The amount of pixels from the top of the page",
|
|
6998
|
+
"type": "number"
|
|
6999
|
+
},
|
|
7000
|
+
"width": {
|
|
7001
|
+
"description": "The width the element",
|
|
7002
|
+
"type": "number"
|
|
7003
|
+
}
|
|
7004
|
+
},
|
|
7005
|
+
"additionalProperties": false,
|
|
7006
|
+
"required": [
|
|
7007
|
+
"attributes",
|
|
7008
|
+
"height",
|
|
7009
|
+
"html",
|
|
7010
|
+
"left",
|
|
7011
|
+
"text",
|
|
7012
|
+
"top",
|
|
7013
|
+
"width"
|
|
7014
|
+
]
|
|
7015
|
+
}
|
|
7016
|
+
},
|
|
7017
|
+
"selector": {
|
|
7018
|
+
"description": "The DOM selector of the element",
|
|
7019
|
+
"type": "string"
|
|
7020
|
+
}
|
|
7021
|
+
},
|
|
7022
|
+
"additionalProperties": false,
|
|
7023
|
+
"required": [
|
|
7024
|
+
"results",
|
|
7025
|
+
"selector"
|
|
7026
|
+
]
|
|
7027
|
+
}
|
|
7028
|
+
},
|
|
7029
|
+
{
|
|
7030
|
+
"type": "null"
|
|
7031
|
+
}
|
|
7032
|
+
]
|
|
7033
|
+
},
|
|
7034
|
+
"debug": {
|
|
7035
|
+
"description": "When debugOpts options are present, results are here",
|
|
7036
|
+
"anyOf": [
|
|
7037
|
+
{
|
|
7038
|
+
"type": "object",
|
|
7039
|
+
"properties": {
|
|
7040
|
+
"console": {
|
|
7041
|
+
"description": "A list of console messages from the browser",
|
|
7042
|
+
"type": "array",
|
|
7043
|
+
"items": {
|
|
7044
|
+
"type": "string"
|
|
7045
|
+
}
|
|
7046
|
+
},
|
|
7047
|
+
"cookies": {
|
|
7048
|
+
"description": "List of cookies for the site or null",
|
|
7049
|
+
"anyOf": [
|
|
7050
|
+
{
|
|
7051
|
+
"type": "array",
|
|
7052
|
+
"items": {
|
|
7053
|
+
"$ref": "#/definitions/Cookie"
|
|
7054
|
+
}
|
|
7055
|
+
},
|
|
7056
|
+
{
|
|
7057
|
+
"type": "null"
|
|
7058
|
+
}
|
|
7059
|
+
]
|
|
7060
|
+
},
|
|
7061
|
+
"html": {
|
|
7062
|
+
"description": "The HTML string of the website or null",
|
|
7063
|
+
"type": [
|
|
7064
|
+
"null",
|
|
7065
|
+
"string"
|
|
7066
|
+
]
|
|
7067
|
+
},
|
|
7068
|
+
"network": {
|
|
7069
|
+
"type": "object",
|
|
7070
|
+
"properties": {
|
|
7071
|
+
"inbound": {
|
|
7072
|
+
"type": "array",
|
|
7073
|
+
"items": {
|
|
7074
|
+
"$ref": "#/definitions/InBoundRequest"
|
|
7075
|
+
}
|
|
7076
|
+
},
|
|
7077
|
+
"outbound": {
|
|
7078
|
+
"type": "array",
|
|
7079
|
+
"items": {
|
|
7080
|
+
"$ref": "#/definitions/OutBoundRequest"
|
|
7081
|
+
}
|
|
7082
|
+
}
|
|
7083
|
+
},
|
|
7084
|
+
"additionalProperties": false,
|
|
7085
|
+
"required": [
|
|
7086
|
+
"inbound",
|
|
7087
|
+
"outbound"
|
|
7088
|
+
]
|
|
7089
|
+
},
|
|
7090
|
+
"screenshot": {
|
|
7091
|
+
"description": "A base64-encoded string of the site or null",
|
|
7092
|
+
"type": [
|
|
7093
|
+
"null",
|
|
7094
|
+
"string"
|
|
7095
|
+
]
|
|
7096
|
+
}
|
|
7097
|
+
},
|
|
7098
|
+
"additionalProperties": false,
|
|
7099
|
+
"required": [
|
|
7100
|
+
"console",
|
|
7101
|
+
"cookies",
|
|
7102
|
+
"html",
|
|
7103
|
+
"network",
|
|
7104
|
+
"screenshot"
|
|
7105
|
+
]
|
|
7106
|
+
},
|
|
7107
|
+
{
|
|
7108
|
+
"type": "null"
|
|
7109
|
+
}
|
|
7110
|
+
]
|
|
7111
|
+
}
|
|
7112
|
+
},
|
|
7113
|
+
"additionalProperties": false,
|
|
7114
|
+
"required": [
|
|
7115
|
+
"data",
|
|
7116
|
+
"debug"
|
|
7117
|
+
],
|
|
7118
|
+
"definitions": {
|
|
7119
|
+
"Cookie": {
|
|
7120
|
+
"description": "Represents a cookie object.",
|
|
7121
|
+
"type": "object",
|
|
7122
|
+
"properties": {
|
|
7123
|
+
"name": {
|
|
7124
|
+
"description": "Cookie name.",
|
|
7125
|
+
"type": "string"
|
|
7126
|
+
},
|
|
7127
|
+
"value": {
|
|
7128
|
+
"description": "Cookie value.",
|
|
7129
|
+
"type": "string"
|
|
7130
|
+
},
|
|
7131
|
+
"domain": {
|
|
7132
|
+
"description": "Cookie domain.",
|
|
7133
|
+
"type": "string"
|
|
7134
|
+
},
|
|
7135
|
+
"path": {
|
|
7136
|
+
"description": "Cookie path.",
|
|
7137
|
+
"type": "string"
|
|
7138
|
+
},
|
|
7139
|
+
"expires": {
|
|
7140
|
+
"description": "Cookie expiration date as the number of seconds since the UNIX epoch. Set to `-1` for\nsession cookies",
|
|
7141
|
+
"type": "number"
|
|
7142
|
+
},
|
|
7143
|
+
"size": {
|
|
7144
|
+
"description": "Cookie size.",
|
|
7145
|
+
"type": "number"
|
|
7146
|
+
},
|
|
7147
|
+
"httpOnly": {
|
|
7148
|
+
"description": "True if cookie is http-only.",
|
|
7149
|
+
"type": "boolean"
|
|
7150
|
+
},
|
|
7151
|
+
"secure": {
|
|
7152
|
+
"description": "True if cookie is secure.",
|
|
7153
|
+
"type": "boolean"
|
|
7154
|
+
},
|
|
7155
|
+
"session": {
|
|
7156
|
+
"description": "True in case of session cookie.",
|
|
7157
|
+
"type": "boolean"
|
|
7158
|
+
},
|
|
7159
|
+
"sameSite": {
|
|
7160
|
+
"description": "Cookie SameSite type.",
|
|
7161
|
+
"enum": [
|
|
7162
|
+
"Lax",
|
|
7163
|
+
"None",
|
|
7164
|
+
"Strict"
|
|
7165
|
+
],
|
|
7166
|
+
"type": "string"
|
|
7167
|
+
},
|
|
7168
|
+
"priority": {
|
|
7169
|
+
"description": "Cookie Priority. Supported only in Chrome.",
|
|
7170
|
+
"enum": [
|
|
7171
|
+
"High",
|
|
7172
|
+
"Low",
|
|
7173
|
+
"Medium"
|
|
7174
|
+
],
|
|
7175
|
+
"type": "string"
|
|
7176
|
+
},
|
|
7177
|
+
"sameParty": {
|
|
7178
|
+
"description": "True if cookie is SameParty. Supported only in Chrome.",
|
|
7179
|
+
"type": "boolean"
|
|
7180
|
+
},
|
|
7181
|
+
"sourceScheme": {
|
|
7182
|
+
"description": "Cookie source scheme type. Supported only in Chrome.",
|
|
7183
|
+
"enum": [
|
|
7184
|
+
"NonSecure",
|
|
7185
|
+
"Secure",
|
|
7186
|
+
"Unset"
|
|
7187
|
+
],
|
|
7188
|
+
"type": "string"
|
|
7189
|
+
},
|
|
7190
|
+
"partitionKey": {
|
|
7191
|
+
"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).",
|
|
7192
|
+
"anyOf": [
|
|
7193
|
+
{
|
|
7194
|
+
"$ref": "#/definitions/CookiePartitionKey"
|
|
7195
|
+
},
|
|
7196
|
+
{
|
|
7197
|
+
"type": "string"
|
|
7198
|
+
}
|
|
7199
|
+
]
|
|
7200
|
+
},
|
|
7201
|
+
"partitionKeyOpaque": {
|
|
7202
|
+
"description": "True if cookie partition key is opaque. Supported only in Chrome.",
|
|
7203
|
+
"type": "boolean"
|
|
7204
|
+
}
|
|
7205
|
+
},
|
|
7206
|
+
"additionalProperties": false,
|
|
7207
|
+
"required": [
|
|
7208
|
+
"domain",
|
|
7209
|
+
"expires",
|
|
7210
|
+
"httpOnly",
|
|
7211
|
+
"name",
|
|
7212
|
+
"path",
|
|
7213
|
+
"secure",
|
|
7214
|
+
"session",
|
|
7215
|
+
"size",
|
|
7216
|
+
"value"
|
|
7217
|
+
]
|
|
7218
|
+
},
|
|
7219
|
+
"CookiePartitionKey": {
|
|
7220
|
+
"description": "Represents a cookie partition key in Chrome.",
|
|
7221
|
+
"type": "object",
|
|
7222
|
+
"properties": {
|
|
7223
|
+
"sourceOrigin": {
|
|
7224
|
+
"description": "The site of the top-level URL the browser was visiting at the start of the request\nto the endpoint that set the cookie.\n\nIn Chrome, maps to the CDP's `topLevelSite` partition key.",
|
|
7225
|
+
"type": "string"
|
|
7226
|
+
},
|
|
7227
|
+
"hasCrossSiteAncestor": {
|
|
7228
|
+
"description": "Indicates if the cookie has any ancestors that are cross-site to\nthe topLevelSite.\n\nSupported only in Chrome.",
|
|
7229
|
+
"type": "boolean"
|
|
7230
|
+
}
|
|
7231
|
+
},
|
|
7232
|
+
"additionalProperties": false,
|
|
7233
|
+
"required": [
|
|
7234
|
+
"sourceOrigin"
|
|
7235
|
+
]
|
|
7236
|
+
},
|
|
7237
|
+
"InBoundRequest": {
|
|
7238
|
+
"type": "object",
|
|
7239
|
+
"properties": {
|
|
7240
|
+
"headers": {},
|
|
7241
|
+
"status": {
|
|
7242
|
+
"type": "number"
|
|
7243
|
+
},
|
|
7244
|
+
"url": {
|
|
7245
|
+
"type": "string"
|
|
7246
|
+
}
|
|
7247
|
+
},
|
|
7248
|
+
"additionalProperties": false,
|
|
7249
|
+
"required": [
|
|
7250
|
+
"headers",
|
|
7251
|
+
"status",
|
|
7252
|
+
"url"
|
|
7253
|
+
]
|
|
7254
|
+
},
|
|
7255
|
+
"OutBoundRequest": {
|
|
7256
|
+
"type": "object",
|
|
7257
|
+
"properties": {
|
|
7258
|
+
"headers": {},
|
|
7259
|
+
"method": {
|
|
7260
|
+
"type": "string"
|
|
7261
|
+
},
|
|
7262
|
+
"url": {
|
|
7263
|
+
"type": "string"
|
|
7264
|
+
}
|
|
7265
|
+
},
|
|
7266
|
+
"additionalProperties": false,
|
|
7267
|
+
"required": [
|
|
7268
|
+
"headers",
|
|
7269
|
+
"method",
|
|
7270
|
+
"url"
|
|
7271
|
+
]
|
|
7272
|
+
}
|
|
7273
|
+
},
|
|
7274
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
7275
|
+
}
|
|
7276
|
+
}
|
|
7277
|
+
},
|
|
7278
|
+
"description": "The JSON response body"
|
|
7279
|
+
},
|
|
7280
|
+
"400": {
|
|
7281
|
+
"code": 400,
|
|
7282
|
+
"description": "The request contains errors or didn't properly encode content.",
|
|
7283
|
+
"message": "HTTP/1.1 400 Bad Request"
|
|
7284
|
+
},
|
|
7285
|
+
"401": {
|
|
7286
|
+
"code": 401,
|
|
7287
|
+
"description": "The request is missing, or contains bad, authorization credentials.",
|
|
7288
|
+
"message": "HTTP/1.1 401 Unauthorized"
|
|
7289
|
+
},
|
|
7290
|
+
"404": {
|
|
7291
|
+
"code": 404,
|
|
7292
|
+
"description": "Resource couldn't be found.",
|
|
7293
|
+
"message": "HTTP/1.1 404 Not Found"
|
|
7294
|
+
},
|
|
7295
|
+
"408": {
|
|
7296
|
+
"code": 408,
|
|
7297
|
+
"description": "The request took has taken too long to process.",
|
|
7298
|
+
"message": "HTTP/1.1 408 Request Timeout"
|
|
7299
|
+
},
|
|
7300
|
+
"429": {
|
|
7301
|
+
"code": 429,
|
|
7302
|
+
"description": "Too many requests are currently being processed.",
|
|
7303
|
+
"message": "HTTP/1.1 429 Too Many Requests"
|
|
7304
|
+
},
|
|
7305
|
+
"500": {
|
|
7306
|
+
"code": 500,
|
|
7307
|
+
"description": "An internal error occurred when handling the request.",
|
|
7308
|
+
"message": "HTTP/1.1 500 Internal Server Error"
|
|
7309
|
+
}
|
|
7310
|
+
},
|
|
7311
|
+
"summary": "/edge/scrape",
|
|
7312
|
+
"tags": [
|
|
7313
|
+
"Browser REST APIs"
|
|
7314
|
+
]
|
|
7315
|
+
}
|
|
7316
|
+
},
|
|
7317
|
+
"/edge/screenshot": {
|
|
7318
|
+
"post": {
|
|
7319
|
+
"definitions": {},
|
|
7320
|
+
"description": "A JSON-based API for getting a screenshot binary from either a supplied\n\"url\" or \"html\" payload in your request. Many options exist including\ncookies, user-agents, setting timers and network mocks.",
|
|
7321
|
+
"parameters": [
|
|
7322
|
+
{
|
|
7323
|
+
"in": "query",
|
|
7324
|
+
"name": "blockAds",
|
|
7325
|
+
"schema": {
|
|
7326
|
+
"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.",
|
|
7327
|
+
"type": "boolean"
|
|
7328
|
+
}
|
|
7329
|
+
},
|
|
7330
|
+
{
|
|
7331
|
+
"in": "query",
|
|
7332
|
+
"name": "launch",
|
|
7333
|
+
"schema": {
|
|
7334
|
+
"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.",
|
|
7335
|
+
"anyOf": [
|
|
7336
|
+
{
|
|
7337
|
+
"$ref": "#/definitions/CDPLaunchOptions"
|
|
7338
|
+
},
|
|
7339
|
+
{
|
|
7340
|
+
"type": "string"
|
|
7341
|
+
}
|
|
7342
|
+
]
|
|
7343
|
+
}
|
|
7344
|
+
},
|
|
7345
|
+
{
|
|
7346
|
+
"in": "query",
|
|
7347
|
+
"name": "timeout",
|
|
7348
|
+
"schema": {
|
|
7349
|
+
"description": "Override the system-level timeout for this request.\nAccepts a value in milliseconds.",
|
|
7350
|
+
"type": "number"
|
|
7351
|
+
}
|
|
7352
|
+
},
|
|
7353
|
+
{
|
|
7354
|
+
"in": "query",
|
|
7355
|
+
"name": "token",
|
|
7356
|
+
"schema": {
|
|
7357
|
+
"description": "The authorization token",
|
|
7358
|
+
"type": "string"
|
|
7359
|
+
}
|
|
7360
|
+
},
|
|
7361
|
+
{
|
|
7362
|
+
"in": "query",
|
|
7363
|
+
"name": "trackingId",
|
|
7364
|
+
"schema": {
|
|
7365
|
+
"description": "Custom session identifier",
|
|
7366
|
+
"type": "string"
|
|
7367
|
+
}
|
|
7368
|
+
}
|
|
7369
|
+
],
|
|
7370
|
+
"requestBody": {
|
|
7371
|
+
"content": {
|
|
7372
|
+
"application/json": {
|
|
7373
|
+
"schema": {
|
|
7374
|
+
"properties": {
|
|
7375
|
+
"addScriptTag": {
|
|
7376
|
+
"type": "array",
|
|
7377
|
+
"items": {
|
|
7378
|
+
"$ref": "#/definitions/FrameAddScriptTagOptions"
|
|
7379
|
+
}
|
|
7380
|
+
},
|
|
7381
|
+
"addStyleTag": {
|
|
7382
|
+
"type": "array",
|
|
7383
|
+
"items": {
|
|
7384
|
+
"$ref": "#/definitions/FrameAddStyleTagOptions"
|
|
7385
|
+
}
|
|
7386
|
+
},
|
|
7387
|
+
"authenticate": {
|
|
7388
|
+
"anyOf": [
|
|
7389
|
+
{
|
|
7390
|
+
"$ref": "#/definitions/Credentials"
|
|
7391
|
+
},
|
|
7392
|
+
{
|
|
7393
|
+
"type": "null"
|
|
7394
|
+
}
|
|
7395
|
+
]
|
|
7396
|
+
},
|
|
7397
|
+
"bestAttempt": {
|
|
7398
|
+
"description": "When bestAttempt is set to true, browserless attempt to proceed\nwhen \"awaited\" events fail or timeout. This includes things like\ngoto, waitForSelector, and more.",
|
|
7399
|
+
"type": "boolean"
|
|
7400
|
+
},
|
|
7401
|
+
"cookies": {
|
|
7402
|
+
"type": "array",
|
|
7403
|
+
"items": {
|
|
7404
|
+
"$ref": "#/definitions/CookieParam"
|
|
7405
|
+
}
|
|
7406
|
+
},
|
|
7407
|
+
"emulateMediaType": {
|
|
7408
|
+
"type": "string"
|
|
7409
|
+
},
|
|
7410
|
+
"gotoOptions": {
|
|
7411
|
+
"$ref": "#/definitions/GoToOptions"
|
|
7412
|
+
},
|
|
7413
|
+
"html": {
|
|
7414
|
+
"type": "string"
|
|
7415
|
+
},
|
|
7416
|
+
"options": {
|
|
7417
|
+
"$ref": "#/definitions/ScreenshotOptions"
|
|
7418
|
+
},
|
|
7419
|
+
"rejectRequestPattern": {
|
|
7420
|
+
"type": "array",
|
|
7421
|
+
"items": {
|
|
7422
|
+
"type": "string"
|
|
7423
|
+
}
|
|
7424
|
+
},
|
|
7425
|
+
"rejectResourceTypes": {
|
|
7426
|
+
"type": "array",
|
|
7427
|
+
"items": {
|
|
7428
|
+
"enum": [
|
|
7429
|
+
"cspviolationreport",
|
|
7430
|
+
"document",
|
|
7431
|
+
"eventsource",
|
|
7432
|
+
"fetch",
|
|
7433
|
+
"font",
|
|
7434
|
+
"image",
|
|
7435
|
+
"manifest",
|
|
7436
|
+
"media",
|
|
7437
|
+
"other",
|
|
7438
|
+
"ping",
|
|
7439
|
+
"prefetch",
|
|
7440
|
+
"preflight",
|
|
7441
|
+
"script",
|
|
7442
|
+
"signedexchange",
|
|
7443
|
+
"stylesheet",
|
|
7444
|
+
"texttrack",
|
|
7445
|
+
"websocket",
|
|
7446
|
+
"xhr"
|
|
7447
|
+
],
|
|
7448
|
+
"type": "string"
|
|
7449
|
+
}
|
|
7450
|
+
},
|
|
7451
|
+
"requestInterceptors": {
|
|
7452
|
+
"type": "array",
|
|
7453
|
+
"items": {
|
|
7454
|
+
"description": "An array of patterns (using `req.url().match(r.pattern)` to match) and their\ncorresponding responses to use in order to fulfill those requests.",
|
|
7455
|
+
"type": "object",
|
|
7456
|
+
"properties": {
|
|
7457
|
+
"pattern": {
|
|
7458
|
+
"description": "An array of patterns (using `req.url().match(r.pattern)` to match) and their\ncorresponding responses to use in order to fulfill those requests.",
|
|
7459
|
+
"type": "string"
|
|
7460
|
+
},
|
|
7461
|
+
"response": {
|
|
7462
|
+
"$ref": "#/definitions/Partial<ResponseForRequest>"
|
|
7463
|
+
}
|
|
7464
|
+
},
|
|
7465
|
+
"additionalProperties": false,
|
|
7466
|
+
"required": [
|
|
7467
|
+
"pattern",
|
|
7468
|
+
"response"
|
|
7469
|
+
]
|
|
7470
|
+
}
|
|
7471
|
+
},
|
|
7472
|
+
"scrollPage": {
|
|
7473
|
+
"type": "boolean"
|
|
7474
|
+
},
|
|
7475
|
+
"selector": {
|
|
7476
|
+
"type": "string"
|
|
7477
|
+
},
|
|
7478
|
+
"setExtraHTTPHeaders": {
|
|
7479
|
+
"$ref": "#/definitions/Record<string,string>"
|
|
7480
|
+
},
|
|
7481
|
+
"setJavaScriptEnabled": {
|
|
7482
|
+
"type": "boolean"
|
|
7483
|
+
},
|
|
7484
|
+
"url": {
|
|
7485
|
+
"type": "string"
|
|
7486
|
+
},
|
|
7487
|
+
"userAgent": {
|
|
7488
|
+
"type": "string"
|
|
7489
|
+
},
|
|
7490
|
+
"viewport": {
|
|
7491
|
+
"anyOf": [
|
|
7492
|
+
{
|
|
7493
|
+
"$ref": "#/definitions/Viewport"
|
|
7494
|
+
},
|
|
7495
|
+
{
|
|
7496
|
+
"type": "null"
|
|
7497
|
+
}
|
|
7498
|
+
]
|
|
7499
|
+
},
|
|
7500
|
+
"waitForEvent": {
|
|
7501
|
+
"type": "object",
|
|
7502
|
+
"properties": {
|
|
7503
|
+
"event": {
|
|
7504
|
+
"type": "string"
|
|
7505
|
+
},
|
|
7506
|
+
"timeout": {
|
|
7507
|
+
"type": "number"
|
|
7508
|
+
}
|
|
7509
|
+
},
|
|
7510
|
+
"additionalProperties": false,
|
|
7511
|
+
"required": [
|
|
7512
|
+
"event"
|
|
7513
|
+
]
|
|
7514
|
+
},
|
|
7515
|
+
"waitForFunction": {
|
|
7516
|
+
"type": "object",
|
|
7517
|
+
"properties": {
|
|
7518
|
+
"fn": {
|
|
7519
|
+
"description": "The function, or statement, to be evaluated in browser context",
|
|
7520
|
+
"type": "string"
|
|
7521
|
+
},
|
|
7522
|
+
"polling": {
|
|
7523
|
+
"description": "An interval at which the pageFunction is executed, defaults to raf.\nIf polling is a number, then it is treated as an interval in milliseconds\nat which the function would be executed. If polling is a string,\nthen it can be one of the following values: \"raf\" or \"mutation\"",
|
|
7524
|
+
"type": [
|
|
7525
|
+
"string",
|
|
7526
|
+
"number"
|
|
7527
|
+
]
|
|
7528
|
+
},
|
|
7529
|
+
"timeout": {
|
|
7530
|
+
"description": "Maximum time to wait for in milliseconds. Defaults to 30000 (30 seconds).\nPass 0 to disable timeout.",
|
|
7531
|
+
"type": "number"
|
|
7532
|
+
}
|
|
7533
|
+
},
|
|
7534
|
+
"additionalProperties": false,
|
|
7535
|
+
"required": [
|
|
7536
|
+
"fn"
|
|
7537
|
+
]
|
|
7538
|
+
},
|
|
7539
|
+
"waitForSelector": {
|
|
7540
|
+
"type": "object",
|
|
7541
|
+
"properties": {
|
|
7542
|
+
"hidden": {
|
|
7543
|
+
"type": "boolean"
|
|
7544
|
+
},
|
|
7545
|
+
"selector": {
|
|
7546
|
+
"type": "string"
|
|
7547
|
+
},
|
|
7548
|
+
"timeout": {
|
|
7549
|
+
"type": "number"
|
|
7550
|
+
},
|
|
7551
|
+
"visible": {
|
|
7552
|
+
"type": "boolean"
|
|
7553
|
+
}
|
|
7554
|
+
},
|
|
7555
|
+
"additionalProperties": false,
|
|
7556
|
+
"required": [
|
|
7557
|
+
"selector"
|
|
7558
|
+
]
|
|
7559
|
+
},
|
|
7560
|
+
"waitForTimeout": {
|
|
7561
|
+
"type": "number"
|
|
7562
|
+
}
|
|
7563
|
+
},
|
|
7564
|
+
"type": "object"
|
|
7565
|
+
}
|
|
7566
|
+
}
|
|
7567
|
+
}
|
|
7568
|
+
},
|
|
7569
|
+
"responses": {
|
|
7570
|
+
"200": {
|
|
7571
|
+
"content": {
|
|
7572
|
+
"image/png": {
|
|
7573
|
+
"schema": {
|
|
7574
|
+
"type": "text"
|
|
7575
|
+
}
|
|
7576
|
+
},
|
|
7577
|
+
"image/jpeg": {
|
|
7578
|
+
"schema": {
|
|
7579
|
+
"type": "text"
|
|
7580
|
+
}
|
|
7581
|
+
},
|
|
7582
|
+
"text/plain": {
|
|
7583
|
+
"schema": {
|
|
7584
|
+
"type": "text"
|
|
7585
|
+
}
|
|
7586
|
+
}
|
|
7587
|
+
},
|
|
7588
|
+
"description": "Response can either be a text/plain base64 encoded body\nor a binary stream with png/jpeg as a content-type"
|
|
7589
|
+
},
|
|
7590
|
+
"400": {
|
|
7591
|
+
"code": 400,
|
|
7592
|
+
"description": "The request contains errors or didn't properly encode content.",
|
|
7593
|
+
"message": "HTTP/1.1 400 Bad Request"
|
|
7594
|
+
},
|
|
7595
|
+
"401": {
|
|
7596
|
+
"code": 401,
|
|
7597
|
+
"description": "The request is missing, or contains bad, authorization credentials.",
|
|
7598
|
+
"message": "HTTP/1.1 401 Unauthorized"
|
|
7599
|
+
},
|
|
7600
|
+
"404": {
|
|
7601
|
+
"code": 404,
|
|
7602
|
+
"description": "Resource couldn't be found.",
|
|
7603
|
+
"message": "HTTP/1.1 404 Not Found"
|
|
7604
|
+
},
|
|
7605
|
+
"408": {
|
|
7606
|
+
"code": 408,
|
|
7607
|
+
"description": "The request took has taken too long to process.",
|
|
7608
|
+
"message": "HTTP/1.1 408 Request Timeout"
|
|
7609
|
+
},
|
|
7610
|
+
"429": {
|
|
7611
|
+
"code": 429,
|
|
7612
|
+
"description": "Too many requests are currently being processed.",
|
|
7613
|
+
"message": "HTTP/1.1 429 Too Many Requests"
|
|
7614
|
+
},
|
|
7615
|
+
"500": {
|
|
7616
|
+
"code": 500,
|
|
7617
|
+
"description": "An internal error occurred when handling the request.",
|
|
7618
|
+
"message": "HTTP/1.1 500 Internal Server Error"
|
|
7619
|
+
}
|
|
7620
|
+
},
|
|
7621
|
+
"summary": "/edge/screenshot",
|
|
7622
|
+
"tags": [
|
|
7623
|
+
"Browser REST APIs"
|
|
7624
|
+
]
|
|
7625
|
+
}
|
|
7626
|
+
},
|
|
7627
|
+
"/edge": {
|
|
7628
|
+
"get": {
|
|
7629
|
+
"definitions": {},
|
|
7630
|
+
"description": "Launch and connect to Chromium with a library like puppeteer or others that work over chrome-devtools-protocol.",
|
|
7631
|
+
"parameters": [
|
|
7632
|
+
{
|
|
7633
|
+
"in": "query",
|
|
7634
|
+
"name": "blockAds",
|
|
7635
|
+
"schema": {
|
|
7636
|
+
"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.",
|
|
7637
|
+
"type": "boolean"
|
|
7638
|
+
}
|
|
7639
|
+
},
|
|
7640
|
+
{
|
|
7641
|
+
"in": "query",
|
|
7642
|
+
"name": "launch",
|
|
7643
|
+
"schema": {
|
|
7644
|
+
"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.",
|
|
7645
|
+
"anyOf": [
|
|
7646
|
+
{
|
|
7647
|
+
"$ref": "#/definitions/CDPLaunchOptions"
|
|
7648
|
+
},
|
|
7649
|
+
{
|
|
7650
|
+
"type": "string"
|
|
7651
|
+
}
|
|
7652
|
+
]
|
|
7653
|
+
}
|
|
7654
|
+
},
|
|
7655
|
+
{
|
|
7656
|
+
"in": "query",
|
|
7657
|
+
"name": "timeout",
|
|
7658
|
+
"schema": {
|
|
7659
|
+
"description": "Override the system-level timeout for this request.\nAccepts a value in milliseconds.",
|
|
7660
|
+
"type": "number"
|
|
7661
|
+
}
|
|
7662
|
+
},
|
|
7663
|
+
{
|
|
7664
|
+
"in": "query",
|
|
7665
|
+
"name": "token",
|
|
7666
|
+
"schema": {
|
|
7667
|
+
"description": "The authorization token",
|
|
7668
|
+
"type": "string"
|
|
7669
|
+
}
|
|
7670
|
+
},
|
|
7671
|
+
{
|
|
7672
|
+
"in": "query",
|
|
7673
|
+
"name": "trackingId",
|
|
7674
|
+
"schema": {
|
|
7675
|
+
"description": "Custom session identifier",
|
|
7676
|
+
"type": "string"
|
|
7677
|
+
}
|
|
7678
|
+
}
|
|
7679
|
+
],
|
|
7680
|
+
"requestBody": {
|
|
7681
|
+
"content": {}
|
|
7682
|
+
},
|
|
7683
|
+
"responses": {
|
|
7684
|
+
"101": {
|
|
7685
|
+
"description": "Indicates successful WebSocket upgrade."
|
|
7686
|
+
},
|
|
7687
|
+
"400": {
|
|
7688
|
+
"code": 400,
|
|
7689
|
+
"description": "The request contains errors or didn't properly encode content.",
|
|
7690
|
+
"message": "HTTP/1.1 400 Bad Request"
|
|
7691
|
+
},
|
|
7692
|
+
"401": {
|
|
7693
|
+
"code": 401,
|
|
7694
|
+
"description": "The request is missing, or contains bad, authorization credentials.",
|
|
7695
|
+
"message": "HTTP/1.1 401 Unauthorized"
|
|
7696
|
+
},
|
|
7697
|
+
"404": {
|
|
7698
|
+
"code": 404,
|
|
7699
|
+
"description": "Resource couldn't be found.",
|
|
7700
|
+
"message": "HTTP/1.1 404 Not Found"
|
|
7701
|
+
},
|
|
7702
|
+
"408": {
|
|
7703
|
+
"code": 408,
|
|
7704
|
+
"description": "The request took has taken too long to process.",
|
|
7705
|
+
"message": "HTTP/1.1 408 Request Timeout"
|
|
7706
|
+
},
|
|
7707
|
+
"429": {
|
|
7708
|
+
"code": 429,
|
|
7709
|
+
"description": "Too many requests are currently being processed.",
|
|
7710
|
+
"message": "HTTP/1.1 429 Too Many Requests"
|
|
7711
|
+
},
|
|
7712
|
+
"500": {
|
|
7713
|
+
"code": 500,
|
|
7714
|
+
"description": "An internal error occurred when handling the request.",
|
|
7715
|
+
"message": "HTTP/1.1 500 Internal Server Error"
|
|
7716
|
+
}
|
|
7717
|
+
},
|
|
7718
|
+
"summary": "/edge",
|
|
7719
|
+
"tags": [
|
|
7720
|
+
"Browser WebSocket APIs"
|
|
7721
|
+
]
|
|
7722
|
+
}
|
|
7723
|
+
},
|
|
7724
|
+
"/edge/playwright": {
|
|
7725
|
+
"get": {
|
|
7726
|
+
"definitions": {},
|
|
7727
|
+
"description": "Connect to Chromium with any playwright style library.",
|
|
7728
|
+
"parameters": [
|
|
7729
|
+
{
|
|
7730
|
+
"in": "query",
|
|
7731
|
+
"name": "blockAds",
|
|
7732
|
+
"schema": {
|
|
7733
|
+
"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.",
|
|
7734
|
+
"type": "boolean"
|
|
7735
|
+
}
|
|
7736
|
+
},
|
|
7737
|
+
{
|
|
7738
|
+
"in": "query",
|
|
7739
|
+
"name": "launch",
|
|
7740
|
+
"schema": {
|
|
7741
|
+
"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.",
|
|
7742
|
+
"anyOf": [
|
|
7743
|
+
{
|
|
7744
|
+
"$ref": "#/definitions/BrowserServerOptions"
|
|
7745
|
+
},
|
|
7746
|
+
{
|
|
7747
|
+
"type": "string"
|
|
7748
|
+
}
|
|
7749
|
+
]
|
|
7750
|
+
}
|
|
7751
|
+
},
|
|
7752
|
+
{
|
|
7753
|
+
"in": "query",
|
|
7754
|
+
"name": "timeout",
|
|
7755
|
+
"schema": {
|
|
7756
|
+
"description": "Override the system-level timeout for this request.\nAccepts a value in milliseconds.",
|
|
7757
|
+
"type": "number"
|
|
7758
|
+
}
|
|
7759
|
+
},
|
|
7760
|
+
{
|
|
7761
|
+
"in": "query",
|
|
7762
|
+
"name": "token",
|
|
7763
|
+
"schema": {
|
|
7764
|
+
"description": "The authorization token",
|
|
7765
|
+
"type": "string"
|
|
7766
|
+
}
|
|
7767
|
+
},
|
|
7768
|
+
{
|
|
7769
|
+
"in": "query",
|
|
7770
|
+
"name": "trackingId",
|
|
7771
|
+
"schema": {
|
|
7772
|
+
"description": "Custom session identifier",
|
|
7773
|
+
"type": "string"
|
|
7774
|
+
}
|
|
7775
|
+
}
|
|
7776
|
+
],
|
|
7777
|
+
"requestBody": {
|
|
7778
|
+
"content": {}
|
|
7779
|
+
},
|
|
7780
|
+
"responses": {
|
|
7781
|
+
"101": {
|
|
7782
|
+
"description": "Indicates successful WebSocket upgrade."
|
|
7783
|
+
},
|
|
7784
|
+
"400": {
|
|
7785
|
+
"code": 400,
|
|
7786
|
+
"description": "The request contains errors or didn't properly encode content.",
|
|
7787
|
+
"message": "HTTP/1.1 400 Bad Request"
|
|
7788
|
+
},
|
|
7789
|
+
"401": {
|
|
7790
|
+
"code": 401,
|
|
7791
|
+
"description": "The request is missing, or contains bad, authorization credentials.",
|
|
7792
|
+
"message": "HTTP/1.1 401 Unauthorized"
|
|
7793
|
+
},
|
|
7794
|
+
"404": {
|
|
7795
|
+
"code": 404,
|
|
7796
|
+
"description": "Resource couldn't be found.",
|
|
7797
|
+
"message": "HTTP/1.1 404 Not Found"
|
|
7798
|
+
},
|
|
7799
|
+
"408": {
|
|
7800
|
+
"code": 408,
|
|
7801
|
+
"description": "The request took has taken too long to process.",
|
|
7802
|
+
"message": "HTTP/1.1 408 Request Timeout"
|
|
7803
|
+
},
|
|
7804
|
+
"429": {
|
|
7805
|
+
"code": 429,
|
|
7806
|
+
"description": "Too many requests are currently being processed.",
|
|
7807
|
+
"message": "HTTP/1.1 429 Too Many Requests"
|
|
7808
|
+
},
|
|
7809
|
+
"500": {
|
|
7810
|
+
"code": 500,
|
|
7811
|
+
"description": "An internal error occurred when handling the request.",
|
|
7812
|
+
"message": "HTTP/1.1 500 Internal Server Error"
|
|
7813
|
+
}
|
|
7814
|
+
},
|
|
7815
|
+
"summary": "/edge/playwright",
|
|
7816
|
+
"tags": [
|
|
7817
|
+
"Browser WebSocket APIs"
|
|
7818
|
+
]
|
|
7819
|
+
}
|
|
7820
|
+
},
|
|
5734
7821
|
"/playwright/firefox /firefox/playwright": {
|
|
5735
7822
|
"get": {
|
|
5736
7823
|
"definitions": {},
|