Browserless (2.24.2)
Download OpenAPI specification:Download
[!NOTE]
Looking for v1.x.x of browserless? You can find it here, although we recommend migrating to v2.
Browserless allows remote clients to connect and execute headless work, all inside of docker. It supports the standard, unforked Puppeteer and Playwright libraries, as well offering REST-based APIs for common actions like data collection, PDF generation and more.
We take care of common issues such as missing system-fonts, missing external libraries, and performance improvements, along with edge-cases like downloading files and managing sessions. For details, check out the documentation site built into the project which includes Open API docs.
If you've been struggling to deploy headless browsers without running into issues or bloated resource requirements, then Browserless was built for you. Run the browsers in our cloud or your own, free for non-commercial uses.
General
- Parallelism and request-queueing are built-in + configurable.
- Fonts and emoji's working out-of-the-box.
- Debug Viewer for actively viewing/debugging running sessions.
- An interactive puppeteer debugger, so you can see what the headless browser is doing and use its DevTools.
- Works with unforked Puppeteer and Playwright.
- Configurable session timers and health-checks to keep things running smoothly.
- Error tolerant: if Chrome dies it won't.
- Support for running and development on Apple's M1 machines
Cloud-only
Our cloud accounts include all the general features plus extras, such as:
- Inbuilt residential proxy
- /unblock API for avoiding detectors
- Automated captcha solving for getting past mandatory checks
- Hybrid automations for streaming login windows during scripts
- /reconnect API for keeping browsers alive for reuse
- REST APIs for tasks such as retrieving HTML, PDFs or Lighthouse metrics
- SSO, tokens and user roles
Browserless listens for both incoming websocket requests, generally issued by most libraries, as well as pre-build REST APIs to do common functions (PDF generation, images and so on). When a websocket connects to Browserless it starts Chrome and proxies your request into it. Once the session is done then it closes and awaits for more connections. Some libraries use Chrome's HTTP endpoints, like /json
to inspect debug-able targets, which Browserless also supports.
You still execute the script itself which gives you total control over what library you want to choose and when to do upgrades. This also comes with the benefit of keep your code proprietary and able to run on numerous platforms. We simply take care of all the browser-aspects and offer a management layer on top of the browser.
Docker
[!TIP] See more options on our full documentation site.
docker run -p 3000:3000 ghcr.io/browserless/chromium
- Visit
http://localhost:3000/docs
to see the documentation site. - See more at our docker package.
Hosting Providers
We offer a first-class hosted product located here. Alternatively you can host this image on just about any major platform that offers hosting for docker. Our hosted service takes care of all the machine provisioning, notifications, dashboards and monitoring plus more:
- Easily upgrade and toggle between versions at the press of a button. No managing repositories and other code artifacts.
- Never need to update or pull anything from docker. There's literally zero software to install to get started.
- Scale your consumption up or down with different plans. We support up to thousands of concurrent sessions at a given time.
If you're interested in using this image for commercial aspects, then please read the below section on licensing.
Puppeteer
Puppeteer allows you to specify a remote location for chrome via the browserWSEndpoint
option. Setting this for Browserless is a single line of code change.
Before
const browser = await puppeteer.launch();
After
const browser = await puppeteer.connect({
browserWSEndpoint: 'ws://localhost:3000',
});
Playwright
We support running with playwright via their their browser's remote connection protocols interface out of the box. Just make sure that your Docker image, playwright browser type and endpoint match:
Before
import pw from "playwright";
const browser = await pw.firefox.launch();
After
docker run -p 3000:3000 ghcr.io/browserless/firefox
# or ghcr.io/browserless/multi for all the browsers
import pw from "playwright-core";
const browser = await pw.firefox.connect(
'ws://localhost:3000/firefox/playwright',
);
After that, the rest of your code remains the same with no other changes required.
Browserless comes with built-in extension capabilities, and allows for extending nearly any aspect of the system (for Version 2+). For more details on how to write your own routes, build docker images, and more, see our SDK README.md or simply run "npx @browserless.io/browserless create" in a terminal and follow the onscreen prompts.
You can install a first-party interactive debugger for Browserless, that makes writing scripts faster and interactive. You can take advantage of things like debugger;
calls and the page's console output to see what's happening on the page while your script is running. All of the Chrome devtools are there at your disposal.
A small list of features includes:
- Running
debugger;
andconsole.log
calls - Errors in the script are caught and show up in the console tab
- DOM inspection, watch network requests, and even see how the page is rendering
- Exporting you debugging script as a Node project
- Everything included in Chrome DevTools
Install debugger
Installing the debugger is as simple as running the install:debugger
script after the project has been built. This way:
$ npm run build
$ npm run install:debugger #or npm install:dev
You will then see the debugger url during the startup process.
---------------------------------------------------------
| browserless.io
| To read documentation and more, load in your browser:
|
| OpenAPI: http://localhost:3000/docs
| Full Documentation: https://docs.browserless.io/
| Debbuger: http://localhost:3000/debugger/?token=6R0W53R135510
---------------------------------------------------------
Most libraries allow you to specify a remote instance of Chrome to interact with. They are either looking for a websocket endpoint, a host and port, or some address. Browserless supports these by default, however if you're having issues please make an issue in this project and we'll try and work with the library authors to get them integrated with browserless. Please note that in V2 we no longer support selenium or webdriver integrations.
You can find a much larger list of supported libraries on our documentation site.
Running Chrome on lambda or on your own is a fantastic idea but in practice is quite challenging in production. You're met with pretty tough cloud limits, possibly building Chrome yourself, and then dealing with odd invocation issues should everything else go ok. A lot of issues in various repositories are due to just challenges of getting Chrome running smoothly in AWS (see here). You can see for yourself by going to nearly any library and sorting issues by most commented.
Getting Chrome running well in docker is also a challenge as there's quiet a few packages you need in order to get Chrome running. Once that's done then there's still missing fonts, getting libraries to work with it, and having limitations on service reliability. This is also ignoring CVEs, access-controls, and scaling strategies.
All of these issues prompted us to build a first-class image and workflow for interacting with Chrome in a more streamlined way. With Browserless you never have to worry about fonts, extra packages, library support, security, or anything else. It just works reliably like any other modern web service. On top of that it comes with a prescribed approach on how you interact with Chrome, which is through socket connections (similar to a database or any other external appliance). What this means is that you get the ability to drive Chrome remotely without having to do updates/releases to the thing that runs Chrome since it's divorced from your application.
SPDX-License-Identifier: SSPL-1.0 OR Browserless Commercial License.
If you want to use Browserless to build commercial sites, applications, or in a continuous-integration system that's closed-source then you'll need to purchase a commercial license. This allows you to keep your software proprietary whilst still using browserless. You can purchase a commercial license here. A commercial license grants you:
- Priority support on issues and features.
- On-premise running as well as running on public cloud providers for commercial/CI purposes for proprietary systems.
- Ability to modify the source (forking) for your own purposes.
- A new admin user-interface.
Not only does it grant you a license to run such a critical piece of infrastructure, but you are also supporting further innovation in this space and our ability to contribute to it.
If you are creating an open source application under a license compatible with the Server Side License 1.0, you may use Browserless under those terms.
Latest
- Dependency updates.
Latest
- Dependency updates.
- Fix issues with Firefox when using a proxy.
- Fixes for the
/meta
API in SDK projects. - Lint fixes.
- Link fixes in this CHANGELOG.md file.
v2.24.1
- Dependency updates.
- Fixes for /performance API in SDK projects.
v2.24.0
- Dependency updates.
- Supports:
- puppeteer-core: 23.10.1.
- playwright-core: 1.49.0, 1.48.2, 1.47.2, 1.46.1, 1.45.3 and 1.44.1.
- Chromium: 131.0.6778.33.
- Chrome: 131.0.6778.109.
- Firefox: 132.0.
- Webkit: 18.2.
- New
/meta
API route for getting details about the container (versions, etc). - Bump NodeJS to
v22.11.0
. - Add
libwebp-dev
for Webkit. - Add support for
trackingId
and/kill/{id}
and/kill/all
. - Prettier, internal fixes and improvements.
v2.23.0
- Dependency updates.
- Fixes
--proxy-bypass-list
CLI arguments not being passed through with function API. - Addition of
fonts-open-sans
to image.
v2.22.0
- Dependency updates.
- New SDK project command of
npm run install:browsers
to help with browser management. - SDK projects now appropriately handle routes when only certain browsers are available.
v2.21.1
- Dependency updates.
- Ensure we don't load Chrome routes for SDK projects running linux/arm64.
v2.21.0
- Dependency updates.
- Supports:
- puppeteer-core: 23.4.1
- playwright-core: 1.47.2, 1.46.1, 1.45.3, 1.44, and 1.43.
- Stream PDF using createPDFStream() in the PDF APIs.
- Inject file-system managers in browser-manager.
v2.20.2
- Dependency updates.
- Adds a fix to SDK routes that might not require a browser but browserless will still make one.
v2.20.1
- Dependency updates.
- Fix issues where connecting to a bad /devtools/page route can cause 500's.
v2.20.0
- Dependency updates.
- Supports
puppeteer@23.3.0
. - Support
playwright@1.47.0
. - Use installed playwright-core for downloading browser binaries instead of
npx
, ensuring the appropriate browsers are installed. - Fix JSON routes 404-ing when charset is specified in the content-type header.
- Disable the built-in debugger by setting
ENABLE_DEBUGGER=false
. - Automatically run prettier on file save in VS Code.
- Windows fixes for SDK projects.
- README link fixes.
v2.19.0
- Dependency updates.
- Drop
sort-keys
for eslint integrations. - Fix devtools URLs when
PROXY
is set and contains a path. - Disable
auth
when using Chrome's internal/page
APIs. - Small fixes for new eslint rules.
v2.18.0
- Dependency updates.
- Supports
puppeteer-core@23.1.1
. - Supports
playwright-core@1.46.1, 1.44.1, 1.43.1, 1.42.1, 1.41.2
. - Trailing slashes on routes now won't 404, so
/chrome
and/chrome/
are treated as the same and will route properly. /function
API now works properly when applying a 3rd-party proxy.
v2.17.0
- Dependency updates.
- Hide token in logs on startup.
- Fixes an issue where using
--proxy-server
now works with /function-API calls. - Adds support for the following CORS headers via env variables (headers and their corresponding config names are below). Please note that these are very permissive by default, but only set when
ENABLE_CORS
istrue
!- 'Access-Control-Allow-Credentials': CORS_ALLOW_CREDENTIALS (default '*')
- 'Access-Control-Allow-Headers': CORS_ALLOW_HEADERS (default: '*')
- 'Access-Control-Allow-Methods': CORS_ALLOW_METHODS (default: 'OPTIONS, POST, GET')
- 'Access-Control-Allow-Origin': CORS_ALLOW_ORIGIN (default: '*')
- 'Access-Control-Expose-Headers': CORS_EXPOSE_HEADERS (default: '*')
- 'Access-Control-Max-Age': CORS_MAX_AGE (default: '2592000')
v2.16.1
- Dependency updates.
- Fixes numerous SDK issues when creating and building new projects.
v2.16.0
- Dependency updates.
- Better extension handling and merging when passing in custom extensions.
- Fixes a bug where a failed job (error thrown) causes the internal queue to drain.
- Prettier and other source improvements.
v2.15.0
- Bug fix to avoid removing healthy jobs from limiter when a job fails
- Dependency updates.
v2.14.0
Potentially Breaking
- Merged duplicate code in browsers and fixed name
WebkitPlaywright
toWebKitPlaywright
(capitalized "K"). - Devtools now bundled into the repository at build-time for the
/debugger
route. - Dependency updates.
v2.13.0
Potentially Breaking
- The
browser
hook now gets thereq
property for the full request instead ofmeta
. - Now embeds the debugger located at
/debugger
. - Preliminary support for
trackingId
. - Bug fixes when dealing with ignoreHTTPSError parameters.
- Bug fixes to the /function API when it throws errors.
- Prettier fixes.
- Dependency updates.
v2.12.0
Potentially Breaking
- SDK projects should now use conventional class method properties versus the "fat-arrow" style instance methods.
Updates
- Support for multi-version playwright (puppeteer coming soon). Browserless now checks the version in the User-Agent header and loads the appropriate playwright server for it.
- Dependency updates.
v2.11.0
- Wrap the pressure response in a pressure key.
- New
keepAlive
property on browser objects for downstream SDK projects to flag. - Dependency updates.
v2.10.0
- Adds back in the
/pressure
API from V1. - Dependency updates.
v2.9.0
- Dependency updates.
- Debugger is now included and mounted under the
/debugger
path. - Browserless now uses the
Logger
utility internally. Better logs for certain classes as well. - Fix number of connected clients when using the Page websocket route.
- Allows "HEAD" requests for most "GET"-based APIs.
v2.8.0
April 12, 2024 Potentially Breaking
- New
Logger
class and SDK primitives in support of that. - Routes now get an instance of
Logger
, before thebrowser
argument or as the last argument for HTTP routes.
Updates
- Numerous SDK fixes and updates in the CLI.
- Dependency updates.
v2.7.1
April 11, 2024
- Fixes a boot-looping issue due to bad startup script. Adds tests for this as well.
- Dependency updates.
v2.7.0
- Support for Running GPUs
- Dependency updates.
v2.6.1
- Fixes for function API calls when behind an external URL.
- Dependency updates.
v2.6.0
- Adds a
GET /active
route that responds with no message and a204
http code. - Move to NodeJS 20.12.0.
- README, CHANGELOG, Migration and spelling fixes.
- New
/active
route for determining if server is able to handle requests. - Better logging around 404'd HTTP requests.
- Dependency updates.
v2.5.0
Config
now allows for programmatic getting and setting of the external address.- Support for a new
Hooks
module for setting up hooks in a more SDK-friendly manner. - Adds new exports for building downstream SDK projects more easily, versus using our CLI:
getArgSwitches
getSourceFiles
installDependencies
buildDockerImage
buildTypeScript
README.md
updates.- Dependency updates.
v2.4.0
Potentially Breaking
- Drops support for recording and screencasting in favor of library-based approaches.
playwright@1.42.1
andpuppeteer@22.4.0
.
Other Changes
- SDK routes now take precedence over core routes when a path-collision occurs.
- Support SDK projects with their own
static
directories. - Adds support for user-specified
stop
methods in SDK Module extensions. - Core modules now extend
EventEmitter
, making them able to publish events. - Fixes issues with
addStyleTag
happening beforegoto
calls in REST APIs. - Dependency updates.
v2.3.0
Potentially Breaking
- Routes must define a unique
name
property in order to remove them in SDK projects. - A new
browserless
object in the SDKpackage.json
file can specify module overrides, in camelCase, instead of using a path-based semantic. - Fixes issues with
npx playwright-core install...
potentially installing other browser versions than what is a dependency of Browserless. - Fixes and other general improvements.
- Dependency updates.
v2.2.0
Potentially Breaking
ghcr.io/browserless/chrome
now runs actual Chrome and not Chromium! If you were using this tag please update to useghcr.io/browserless/chromium
!- This Chrome tag uses the new routing convention below. If you get random 404's, please add
/chrome
to the start of the route. EG,/pdf
becomes/chrome/pdf
. - Websocket connections follow a similar breakage in that the URL will go from something like
ws://localhost:3000
tows://localhost:3000/chrome
.
- This Chrome tag uses the new routing convention below. If you get random 404's, please add
- Adds a new
ghcr.io/browserless/chromium
, and updatesghcr.io/browserless/chrome
to use actual Chrome. - New and current APIs now follow a routing convention of
/$BROWSER/$ACTION
. In our Chrome image, you'll see/chrome/pdf
for the PDF route as opposed to/pdf
.- To keep things backwards compatible, all our prior REST APIs still have the same path as well as the new semantic, but only in the
multi
andchromium
tags. - These backwards compatible routes are ONLY available in
ghcr.io/browserless/chromium
andghcr.io/browserless/multi
.
- To keep things backwards compatible, all our prior REST APIs still have the same path as well as the new semantic, but only in the
- Refer to the embedded documentation site for any and all updates on API differences.
Other Changes
- HTTPRoutes and WebSocket routes can now have multiple paths to listen on.
- Add
clean
command to@browserless.io/browserless
CLI. - Adds support for
/json/list
,/json/new
,/json/version
andjson/protocol
APIs (Chrome and Chromium only).- When both Chrome and Chromium are present (in the case of the multi image), browserless opts for Chromium for these requests.
- Removes legacy
browser.json
files since browserless now generates those and caches when requested. - Stable docker images are coming! Please be sure to see our packages page for stable tags.
- Only verify that internally managed browsers are installed when starting.
- Preliminary support for
--headless=shell
. - More unit-tests for the Chrome /json APIs.
- Dependency updates.
v2.1.0
- Dependency updates.
- Name is now
@browserless.io/browserless
to reflect our npm package. - NEW: SDK is now live here: https://www.npmjs.com/package/@browserless.io/browserless.
- Drops gulp and other gulp utilities in favor of our own. Move to modules in
scripts
dir. - Many private class properties now use
protected
so they can be referenced in SDK extensions. - Adds a
/json/version
route for older libraries that use it. - Merge startup/test scripts into
scripts
dir. - Moves installed browsers to
/usr/local/bin/playwright-browsers
. - Merge root files into package.json where possible.
- README updates and fixes.
- Numerous link and copyright fixes.
v2.0.0
browserless 2.0.0 represents the best body of work after running browserless for over 5 years. It contains mostly the same functionality and more, and is rebuilt to be more modular and offer a NodeJS SDK. It's also much lighter and faster than prior versions and includes a lot of semantic changes.
Features
- ECMAScript style module loading and dependencies.
- New routing system using purely NodeJS's HTTP module.
- Better logs and concurrency/queueing parameters.
- Support for running the other major browser vendors in the same format and package.
- The service now compiles TypeScript to runtime JOI validation for our routes.
- Soon: upcoming support for extensions, long-running sessions and more.
Breaking Changes
- Remove support for Selenium.
- The
/function
API now runs inside the context of the browser and not in Node. - Drop support for keep-alive and pre-booting.
- Support for a single
launch
query-string parameter for launching a browser versus many individual parameters.
Minor Changes
- Many docker parameters have been renamed, but are backwards compatible. See config.ts for details.
v1.61.0
- FINAL of V1 for browserless/chrome. See notes on V2 here
- Dependency updates.
- Added
fonts-urw-base35
. - Supports puppeteer
1.20
,10.4.0
,13.1.3
,14.4.1
,16.2.0
,19.7.5
and21.4.1
. - Supports playwright
1.39
,1.38
,1.37
,1.36
,1.35
,1.34
, and1.33
. - Fixes an issue where keep-alive chrome instances aren't properly tracked when
browser.close
is called. - Fix improper handling of HTTP writing on bare sockets with 500 errors.
v1.60.2
- Dependency updates.
- Fixes an issue where calls to GET /sessions sometimes return blank results.
- Drop puppeteer
21.3.1
in favor of21.3.6
.
v1.60.1
- Dependency updates.
- Drop the
partner
repo from builds as we no longer use it for installingflash
. - Bump to
Ubuntu
lunar. - Bump to NodeJS 18.17.0
- Package.json
engines.node
now reflects what node version we run on the docker image. - Drops support for playwright@
1.33
and default playwright to1.38
. - Drops support for puppeteer@
21.1.1
in favor of21.3.1
. - Replaces legacy
request
module with Node's nativefetch
for webhooks. - Drops
node-fetch
across the board in favor offetch
native.
v1.60.0
- Dependency updates.
- New build arguments in our Dockerfile to apply different named base repo.
- New
CHROME_STABLE_VERSION
build arg for specifying a particular chrome stable version. - Fixes in postinstall hooks for various platforms and chrome-stable.
- NEW:
waitFor
properties in our APIs now supports an object with selector + timeouts for more fine tuning. - Bump puppeteer
20.x.x
to21.1.1
(116.0.5845.96). - Supports playwright versions
1.37
,1.36
,1.35
,1.34
, and1.33
. - Fixes in deploy script to handle versions, platforms and architectures.
- Fixes an issue where headless defaults to
DEFAULT_STEALTH
. - New
PREBOOT_QUANTITY
for overriding the amount of pre-booted instances of Chrome. - Allow using a host's display by setting
DISPLAY
env variable. - Link fixes in README.md.
v1.59.0
- Dependency updates.
- Bump to Ubuntu Kinetic release + updates to use relevant packages.
- In support of puppeteer 20+, updates to
env.js
for finding/symlinking Chrome. - Supports playwright
1.33
,1.32
,1.31
, and1.29.
. Drops support for earlier versions. - Ad-blocking and other request-interception in browserless is graceful using the
isInterceptResolutionHandled
method.
v1.58.0
- Dependency updates.
- Documentation link fixes.
- Add new required lib
libu2f-udev
. - Support for puppeteer@19.7.5.
- Supports playwright versions:
1.27
,1.28
,1.29
,1.30
and1.31
. - Better internal TypeScript definitions.
- Print's a few extra log-lines at startup for links to various resources.
/kill/all
now supports rebooting when PREBOOT is turned on.- Fixes an issue with chromedriver boot-looping in modern versions.
- Adds support for
--headless=new
. - Fixes an issue where user-data-dirs aren't deleted due to a crashed container.
v1.57.0
- Dependency updates.
- Add back in
puppeteer@13.1.3
for PDF/Screenshot performance. - Replace
puppeteer@18.0.5
in favor ofpuppeteer@19.2.2
. - Better puppeteer install/binary path lookups.
- Support for the following playwright versions via the /playwright path:
- 1.23.3
- 1.24.2
- 1.25.2
- 1.26.1
- 1.27.1
v1.56.0
- Dependency updates.
- Fixes various puppeteer issues with regards to revision information and browser-fetching.
- Fixes a Selenium issue where failed browsers can cause session to zombie.
- Small fix for route error handling.
- Better selenium W3C support.
v1.55.0
Potentially Breaking
- Update base OS from Ubuntu 20.04 to Ubuntu 22.04.
- Drops
path
support for bothaddScriptTag
andaddStyleTag
. Useurl
or inject content directly.
- Dependency updates.
- We now support multiple versions of playwright via
playwright-core
. browserless checks the User-Agent string and tries to load a compatible playwright server at runtime in order to avoid breakages between versions. - New
scrollPage
boolean parameter for the screenshot and other relevant APIs. - browserless now writes appropriately formatted HTTP and WebSocket messages for non-2xx responses.
- Better CI coverage with prior puppeteer versions.
- Adds back a
browser.json
file in our docker images for easier CDP-related queries. - A new
PORT
arg is available at build time in order to specify a PORT to listen onto. - Updated links for browserless documentation in docs.
v1.54.1
- Dependency updates.
- Add
browser.json
file to git tags. - Prettier fixes on source.
- deploy.js file fixes for creating production tags.
- Fix: add the
userDataDir
option so that we don't fill disks when usingstealth
. - Fix: allow
disconnect
listeners to fire before closing.
v1.54.0
- Dependency updates.
- Move to using
mocha
for better esm support. - Drop puppeteer
13.6.0
in favor of14.4.1
. - Utilize puppeteer
14.4.1
forchrome-stable
. - New internal
getCDPClient
for loading a page's CPD connection.
v1.53.0
- Dependency updates.
- Bump
browserless:base
to1.16.0
. - Drop
--quiet
from deploy scripts. arm64
support for latest as well as puppeteer at versions 9,10 and 13.- Update puppeteer 13 from
13.5.2
to13.6.0
(revision982053
). - README updates.
v1.52.1
- Dependency updates.
- Playwright example correction in README.md.
- Use revision
970485
for puppeteer 13.x.x,latest
, chrome-stable andarm64
. - When using
KEEPALIVE
andPREBOOT
, don't create new blank pages, and use the existing one instead.
v1.52.0
- Dependency updates.
- Added in new fonts:
fonts-gfs-neohellenic
. - Minor code formatting changes.
- Drop puppeteer@13.1.3 in favor of 13.5.2.
- Make
heapdump
an optional dependency as it's not always used, and add it back in. - Utilize
fs/promise
vs home-rolled promisified utils. - Fix an issue where PREBOOT and KEEPALIVE might return an
undefined
browser. - Logging when file-protocol requests happen and terminate a session.
- Move the browser process exit listener into the puppeteer-provider for better session cleanup.
- Allow "headfull" playwright sessions.
- Don't
await
chrome-helper's closing of the browser as it's not truly async. - Remove
body-parser
in favor ofexpress
's JSON and other parsers. - Fixes an issue where using a user-data-dir that doesn't exist causes chrome to crash.
- Add in more unit and integration tests.
v1.52.0
- Dependency updates.
- Added in new fonts:
fonts-gfs-neohellenic
. - Minor code formatting changes.
- Drop puppeteer@13.1.3 in favor of 13.5.2.
- Make
heapdump
an optional dependency as it's not always used, and add it back in. - Utilize
fs/promise
vs home-rolled promisified utils. - Fix an issue where PREBOOT and KEEPALIVE might return an
undefined
browser. - Logging when file-protocol requests happen and terminate a session.
- Move the browser process exit listener into the puppeteer-provider for better session cleanup.
- Allow "headfull" playwright sessions.
- Don't
await
chrome-helper's closing of the browser as it's not truly async. - Remove
body-parser
in favor ofexpress
's JSON and other parsers. - Fixes an issue where using a user-data-dir that doesn't exist causes chrome to crash.
- Add in more unit and integration tests.
v1.51.1
- Dependency updates.
- Updates the
vm2
module to3.9.7
.
v1.51.0
- Dependency updates.
- New
viewport
option inside of the content API. - New
encoding
option in the screenshot API. - Drop puppeteer@12.x.x in favor of 13.x.x.
- Fixes in our deploy scripts.
- Fixes for windows binaries in our postinstall hook.
- Fixes an issue where playwright tries to use a pre-booted chrome instance.
- Small type updates.
v1.50.0
- Dependency updates.
- Drops support for
puppeteer-4.0.1
in favor ofpuppeteer-12.0.1
. - Chrome-stable now utilizes puppeteer @
12.0.1
. - Support for
arm64
via production tags (1-arm64
) as well as inlatest
. - Static JSON files (
protocol.json
,version.json
) are built at runtime on their first request and then cached in memory. - Bumps
browserless/base
to1.14.0
. - New
selector
property for screenshot-ing a single DOM node in the screenshot API. puppeteerVersions
in the package.json file has been rename dochromeVersions
.- Internal changes for deploying production tag scripts.
- Consolidate scripts for
postinstall
. - Drop support for
heapdump
due to its age and lack of platform varieties. - New
/metrics/total
route for summing up all statistics in a single JSON payload.
v1.49.1
- Dependency updates.
- Fix webhook not using timeout URL.
v1.49.0
- Dependency updates.
- Support for ARM64 builds by dropping flash for it.
- Bump puppeteer 10.2.0 for 10.4.0.
- New puppeteer-hook for injecting a puppeteer-compatible library, eg. puppeteer-extra.
v1.48.0
Potentially Breaking
- API calls with
html
in their payloads now use thepage.setContent
API versus a prior hack using one-time network-request interception (example here). Old versions of puppeteer might not work properly with this (<= 5.x.x). This effects the following APIS:/content
,/pdf
and/screenshot
.
- Dependency updates.
- Bump
browserless/base
to1.12.0
(add user-id toblessuser
ofBLESS_USER_ID=999
). - Bumps puppeteer @10.x.x to
10.2.0
with revision901912
. - Makes API calls use
setContent
properly now (no more one-time network interception). This fixes certain issues with images not loading in PDFs and screenshots. - Fix some typings in tests.
v1.47.0
- Dependency updates.
- Bump
browserless/base
to1.11.0
. - Add new lint task and rename GitHub actions tasks, remove
tslint
. - Lint and prettier fixes.
- Delay url parsing until after
before
hook runs. - New
meta
object param for page hooks (passing through arbitrary meta data set by prior hooks). - New
FUNCTION_ENV_VARS
environment variable pass through an allow-list of environment variables for functions to access. - Fix
someObject.hasOwnProperty
toObject.prototype.hasOwnProperty.call
.
v1.46.0
- Dependency updates.
- Move to Node 16.x.x.
- Bump browserless/base to 1.10.0.
- Limit
x-response-url
to 100 characters. - Add support for puppeteer@10.x.x.
- Add
maxConcurrent
stat for metrics API + log stats every 5 minutes to stdout. - Some performance improvements to how pages/browsers are setup and torn down.
- Add
API_DOCS_ENDPOINT
as a filterable API to deny access to. - Minor code reformatting from prettier.
- Better page setup and logging.
- Fixes
DEFAULT_STEALTH
for self-hosted deployments. - Improvements on how chrome is closed.
1.45.0
- Dependency Updates.
- Support for playwright proxies.
- Fixes an issue with larger headers potentially causing load-balancers to crash and fail.
v1.44.0
Potentially Breaking
PROXY_HOST
andPROXY_PORT
are now replaced with a singlePROXY_URL
param, eg:https://www.mybrowserless.com/optional/paths
. When set, browserless uses this fully-qualified URL to build out links back to its internal debugger and sessions. Useful when you're instance is behind a proxy or load-balancer of some kind.
- Dependency Updates.
- Use recent Node 14 (browserless-base 1.7.0).
- New
rejectResourceTypes
property on most APIs (content, screenshot, pdf, etc.). - Allow serving of
file://
protocols when explicitly enabled (default is off due to security concerns). SetALLOW_FILE_PROTOCOL=true
in your env params. - The
/pressure
API now takes into account CPU/Memory consumption, and adds a "reason" property for why the machine might be not available. - Fixes an issue where playwright couldn't download files.
- You can now filter /sessions calls with a
trackingId
parameter. detached
functions now return atrackingId
when present.- More types, tests, and utility consolidation.
v1.43.0
- Dependency Updates.
- Fixes an issue where --user-data-dirs aren't deleted properly, potentially filling disks.
- Changes CPU/Memory checks to be user-based and not the entire OS.
- Adds tests for the user-data-dir issue.
v1.42.0
- Dependency Updates.
- Move to Node 14!
- Use
esModuleInterop
for imports. - Remove
page.waitFor
in favor of downstream methods. - Adds new
?stealth
parameter for API calls (see puppeteer-extra-stealth-plugin). - New
DEFAULT_STEALTH
param for making stealth calls by default. - Fixes
ignoreDefaultArgs
in chrome stable. - Ensure temp user-data-dirs are always cleaned up.
v1.41.0
- Dependency Updates.
- New
SESSION_CHECK_FAIL_URL
webhook for when pre-session checks fail. - Health checks now take the last two CPU/Memory samples to determine if a failure (5 minutes).
v1.40.2
- Dependency Updates.
- Fix potentially unhandled stream error events when closing chrome.
- Bump puppeteer to 5.4.1 for major 5.
v1.40.1
- Dependency Updates
- New
SOCKET_CLOSE_METHOD
for better load-balancing behavior when under load.
v1.40.0
- Dependency Updates
- Support for playwright 1.4.0 and greater. See more here.
- New
PRE_REQUEST_HEALTH_CHECK
env variable to check CPU/Memory prior to running a session. SetMAX_CPU_PERCENT
orMAX_MEMORY_PERCENT
for setting these thresholds. Responds with a503
HTTP code if CPU/Memory are high on any inbound session (API, puppeteer or webdriver).
v1.39.0
- Dependency Updates
- Fixes a crash due to
browser.close
streams not completing properly. - Adds a
dumpio
query-string parameter for launching with puppeteer.
v1.38.0
- Dependency Updates
- Fixes a memory leak when browsers don't close properly.
- Adds a
/heapdump
route for capturing heap dumps. Turn on by settingENABLE_HEAP_DUMP=true
in your docker env. emulateMedia
fixes on the pdf route.- CodeQL implemented.
- README fixes.
v1.37.2
- Dependency Updates
- Fixes an issue where the webserver can crash after rejecting a request.
- Fixes deployment script not waiting for zip files to be finished unzipped.
1.37.1
- Dependency Updates
- Fixes an issue in webdriver not starting properly.
1.37.0
Potentially Breaking
- Due to stability issues, puppeteer version 3.x.x and 4.x.x now use chromium revision
782078
. See ourpackage.json
for details.
- Dependency Updates
- README Updates
- Fixes an issue for secured containers using prometheus (plus tests).
- Support for puppeteer
5.2.1
1.36.0
- Dependency Updates
- Drops support for puppeteer
2.0.0
and3.0.4
, please use2.1.1
and3.3.0
for those revisions. - Adds support for puppeteer
5.0.0
. - Bug-fix with the server randomly closing with an uncaught error event thrown from inside underlying socket connection.
- Adds back in
--disable-dev-shm-usage
to default arguments for better SHM performance.
1.35.0
- Dependency Updates
- New
maxTime
,minTime
,meanTime
andtotalTime
of all sessions for a given period in /stats. - Bugfix on CPU/Memory triggering health failure webhooks.
- Fix issues in websocket errors by awaiting browser.close (or 5 seconds, whichever is quickest).
v1.34.0
Potentially Breaking
- screencast API no longer supports
audio
or thesetPreferences
function in order to offer a better video experience. In order to set the width/height, simply set a page width height to what you'd like. chrome-stable
will now usepuppeteer@3.1.0
for better compatibility.
- Dependency updates.
- Drops puppeteer version
1.20.0
and below. - Move
browserless/base
tov1.5.0
. - Puppeteer support for
3.3.0
(3.2.x and 3.1.x have the same chromium revision). - Fixes
trackingId
on pre-booted sessions. about:blank
pages now are returned in the/sessions
API for transparency of open sessions/browsers.
1.33.1
- Dependency updates.
- Fix socket errors from accidentally firing error webhooks.
1.33.0
- Drops support for puppeteer 1.17.x and 1.18.x
- Support for puppeteer 3.0.x
- Dependency updates
- Fix reject stat firing on debugger pages not being found
- Consolidates more types.
1.32.0
- Dependency Updates.
- Adds roboto fonts.
- Updates
pressure
API to take account of running browsers in therunning
count. - Adds
maxConcurrent
,maxQueued
,cpu
andmemory
to pressure.
1.31.1
- Dependency Updates.
- Fixes a small issue where XVFB doesn't start properly during an automated restart.
1.31.0
- Dependency Updates.
- Allows
trackingId
on uploaded files to save in the appropriate tracking-ID folder. - New
userAgent
param for setting user-agent in API requests. - Fixes an issue where chrome wasn't being closed in rare cases.
1.30.0
- Dependency Updates.
- Updates to Node 13 for speed and memory improvements.
- browserless/base@1.4.0
1.29.1
- Dependency Updates.
- Fixes how deploy script determines errors when running child commands.
- Fixes issues when many selenium sessions can potentially fill up disk space.
1.29.0
- Dependency updates.
- Uses
pipe
's for most API calls and other internal endpoints for faster/better throughput. Works only forheadless
API/puppeteer calls. - Allows custom lighthouse configs via POST
config
property. - Patches vm2.
- Before hooks no longer end requests forcefully -- external hooks must manually end the request/sockets themselves.
- Properly passes socket errors to the error handler/webhook
1.28.0
- Dependency updates.
- Sets a system-default font of Ubuntu for most sites that use
system-ui
in their font declarations. - Fixes health-check failure webhooks.
- New
PROXY_HOST
,PROXY_PORT
andPROXY_SSL
for external load-balancers. See docsite for more info. - Moves over to GH actions over Travis for CI.
1.27.0
- Dependency updates.
- New
manipulate
params for screenshots, allowing for resizing, flipping and more. - Better tracking of chrome-process for cleanup of zombied sessions.
1.26.1
- Dependency updates.
- Added
git
as a dependency in dockerfile for git-based npm dependencies to work. - Fixed an issue in
start.sh
so that errors bubble up properly and close the process. - Bumps
browserless/base
to1.2.0
.
1.26.0
- Dependency updates.
- Dropping pre-push hooks for speed.
- Consolidate all interfaces/types to a types.d.ts file.
- Fixes an issue where numerous chrome instances launch when prebooting.
- Fixes an issue where incoming requests don't use the pre-booted chrome instance.
- Uses
page.setViewport
when--window-size
is set in params to help with screenshots not appearing properly (chromedriver only).
1.25.0
- Dependency updates.
- Stricter build-time arguments for chromium and chromedriver assets.
- Better XVFB functionality.
- New parameters for most API's,
addScriptTag
andaddStyleTag
, accepting an array of scripts/styles respectively. - Drop support for
puppeteer@1.17.0
. - Proper support for parsing
ignoreDefaultArgs
query-parameters.
1.24.0
- Dependency updates.
- Bugfix on our debugger's play button being off-center.
- Fixes driver.close() calls not cleaning the browser.
- New
/GET
option for most our APIs. Stringify your JSON and add a ?body=YOUR-JSON with a /GET call to most of our functions! RequiresENABLE_API_GET=true
in you docker env variables. - WebSocket (Socket) exception handling and logging.
- More integration and unit tests added.
1.23.1
- Fixes an issue in chromedriver where commands would hang.
- Fixes an issue in chromedriver sessions not being removed properly.
- Fixes and pins the base image so that headful sessions work again.
1.23.0
- Dependency updates.
- Use
apt-get
to installdumb-init
. - Add a LANG arg in docker.
- New
setJavaScriptEnabled
property for REST APIs. - Fixes an issue with
waitFor
functions in REST API calls. - Fixes issues when PREBOOT_CHROME and KEEPALIVE are true.
- Updates protocol and host information in ad-blocking.
1.22.0
- Dependency updates.
- Removal of unnecessary '--disable-dev-shm-usage'
- Squelching of chromedriver's verbose args unless
DEBUG=*
is set. - New
/kill/${id}
route for remotely killing a certain browser. - Allowing of sub-child routes in workspaces.
1.21.0
- Dependency updates.
- New
viewport
property option for PDF endpoint. - The
/stats
endpoint now runs in a separate process meaning it can be parallelized. - Fixed a bug where hardware monitoring can cause the container to restart/crash.
- Fixes an issue with the file-chooser API not working in puppeteer.
1.20.0
- Dependency updates.
- New
/scrape
API!
1.19.0
- Dependency updates.
- Fixes chrome-stable's binary chromedriver.
- Move over to Node 12.
- Bugfix on width/height in the screencast API.
- Support for puppeteer@2.0.0.
- Fixed issues with the devtools JS files missing.
- Adds support for blacklisting routes in Docker.
- Consolidates hooks into a hooks module.
- Allows Selenium to specify download-paths and pausing via preferences.
- Fixes an issue in certain JSON-based CDP libraries.
- Function API's can now run incognito mode with a new Docker param.
1.18.0
- Dependency updates
- Better
IS_DOCKER
check for kubernetes. - Updates to README.md, spelling fixes and Slack link.
- Fixes to debugger and larger code bodies.
- Removal of analytics in debugger.
- Screencast improvements and adding ability to set new options.
- New
waitFor
property in our APIs (content, pdf and screenshot). - Don't allow file requests on the debugger for security reasons.
- Better metrics monitoring.
singleRun
mode in docker.- New prometheus support!
- Fixing issues with keeping chrome alive (only closing once TTL is met).
1.17.0
- Dependency updates
- Splitting docker images into two repositories for faster builds and pulls
- Adding in external routing capabilities
- New error hook
- More/better types
- Updating
deviceScaleFactor
in API's for more granular control. - Better chromedriver failure messages.
1.16.0
- Adding
ffmpeg
to the docker dependency list. - Add
timecut
as a dependency for recording. - Better logs on chrome PID's and closing forcefully.
- Fixed
DEFAULT_CHROME
=>DEFAULT_HEADLESS
. - Fixed a bug where
xvfb
doesn't start in time. - Use
SIGKILL
for killing chromedriver. /json/version
now returns awebSocketDebuggerUrl
.
1.15.0
- New
page
andbrowser
hooks for docker images thatFROM
browserless. bluebird
added as a module forfunction
and other endpoints.- More dependency updates.
1.14.1
- Bugfix when running multiple "headfull" sessions.
- Dependency updates.
1.14.0
- New
WORKSPACE_DELETE_EXPIRED
andWORKSPACE_EXPIRE_DAYS
to auto-cleanup workspace dirs. - README.md cleanup now that HTTPS is no longer required.
- Support for
~
in docker env parameters. - More alignment with how chromedriver and puppeteer sessions get cleaned up.
/session
API now returnsbrowserWSEndpoint
andbrowserId
properties for having multiple debuggers connected.- Support for reconnecting(!!). When a
?keepalive=KEEP-ALIVE-IN-MS
is seen in thepuppeteer.connect
call we keep the browser active for that many ms after the debugger disconnects. - New
/kill/all
route which closes all actively running sessions. - New internal scheduler module, making future things like cron-based jobs a possibility.
- Better internal types.
1.13.0
- A minor refactor to consolidate calls to
url.parse
for performance gains. - Introduces a per-session based timeout that overrides the global timeout.
- Consolidates authorization checks to remove duplication.
- Moves more types into their backing modules in order to better consolidate files.
1.12.0
- Set's a non-conflicting
WORKSPACE_DIR
andDEFAULT_USER_DATA_DIR
in docker by default. - Drops support for puppeteer
1.15.0
and adds1.19.0
. - Web-based debugger now sends cookies for docker deployments that are secure.
1.11.0
- Live debugger is now self-hosted, no more enforced https though it's still recommended.
- Consolidated build steps.
- Using the same chromedriver binary that matches the puppeteer's bundled chromium.
- Introducing
trackingId
workflows. - Fixing unused export's, removing extraneous internal methods.
/workspace
API now returns sub-files and scopes sessions bytrackingId
when present.- Support for
/json/new
protocol. - Dependency updates.
1.10.0
- Dropped support for puppeteer
1.9.0 => 1.14.0
. - Added support for puppeteer
1.16.0 => 1.18.0
. - A version of chromedriver is now installed to perfectly match the version of puppeteer's chromium.
- In dev, chromedriver now uses the puppeteer version of chromium.
- Defaulted most ENV-variables in docker to sensible defaults.
- New
rotate
feature for PDF endpoint:{ rotate: 90 }
=> rotate left 90 degrees. - Support for
browserless.token
in the docker image. - puppeteer integration now returns semantic HTTP codes for certain errors (
400
,403
and429
). - Support for chromedriver's move to the W3C spec 'goog:chromeOptions'.
- The debugger now filters out
about:blank
pages, and includes sessions by Selenium. - Workspace support for selenium-based integrations.
1.9.0
- Better handling of browser/socket closing in puppeteer integrations.
- Numerous screencast fixes.
- Moved all GH links to new repo location.
- Dep updates.
1.8.0
- Better windows dev experience.
- Indian font support.
- Video capture now supports audio and browser width/height.
- Dependency updates.
- DEFAULT env variables for launching pre-booted Chrome.
1.7.0
- Dep updates
- New
?blockAds
query-parameter for disabling 3rd-party ad calls.
1.6.0
- New
authenticate
andsetExtraHTTPHeaders
params for thecontent
,pdf
, andscreenshot
APIs. Useful for using proxies in our REST APIs. - Fixed a bunch of bugs inside of the webdriver integration, making it more REST-ful.
- Updated dependencies inside of Chromedriver.
- New
DISABLE_AUTO_SET_DOWNLOAD_BEHAVIOR
for mitigating errors in puppeteer < 1.15.0. - Bumped Puppeteer to 1.15.0.
1.5.0
- New
/session
API (and accompanying routes) for display/viewing active sesions in a remote debugger(!). - New
?pause
query-param for pausing sessions prior to running them (useful for the live debug viewer). - The browserless debugger now exposes links to these debug pages via the sidebar.
- New Debugger page can be disabled via the
ENABLE_DEBUG_VIEWER=false
environment variable flag. - Move to use
node@10
. - No more
no-implicit-any
's inside the codebase.
1.4.0
- During connection, we now set the download dir of REST and puppeteer sessions. Cloud users and docker users no longer have to manually set this field, and the
/workspace
API references it as well!
1.3.1
Fixes
- New deploy.js file to do deployments "on-prem"
- Updated new builds for puppeteer 1.12.2 and 1.13.0
- Fixes an issues in CORS handling
1.3.0
Minor changes
- The
screenshot
,function
,pdf
, andcontent
API's now accept new content-types for easier POSTing of small payloads (see docsite). - The
screencast
API can now start/stop recording programmatically via astartScreencast
andstopScreencast
params (see docsite). - New
external
dir for injecting custombefore
andafter
hooks in external docker builds. - A new
timeout
query-option for session-based timeouts vs using the global one. - New
requestInterceptors
for injection custom request behavior.
Fixes
- Numerous default fixes in the APIs.
- Stray consoles removed :)
- Consolidated download behavior in
screencast
anddownload
APIs
1.2.0
Minor Changes
- New
requestInterceptors
for the /screenshot API, allowing you to mock data in response to a request. - Code debugger now transmits code over-the-wire via cookies to avoid URL max-length issues.
- Now supports cookie-based authentication via a
browserless_token=TOKEN;
cookie.
Fixes
- Comments in the debugger won't break it.
- Requests that are rejected due to auth reasons aren't logged in stats.
1.1.0
With 1.1.0 we offer a refined way of dealing with both downloads and uploads. Both use-cases are tightly coupled to the file-system, and can leave you scratching your head as to what's going one. For more information and detailed documentation, please refer to our doc-site at https://www.browserless.io/
Minor Changes
- New
WORKSPACE_DIR
variable for controlling where browserless stores files and uploads. - New
/workspace
API for doing RESTful operations on the downloads/uploads file-system. - New
/download
API for running a puppeteer-script, and responding with the resulting downloaded file.
Internal Changes
- Moved routes out of the browserless module and into their own file/module.
- Renamed the
browserless-web-service
module to justbrowserless
for simplicity. - Moved the
DOWNLOAD_DIR
toWORKSPACE_DIR
since it handles both uploads and downloads.
1.0.0
🥁 -- Stable version 1.0 is here! While this doesn't include major functionality changes, it does change how the docker builds are generated going forward. The versioning will now contain two pieces of crucial information: the version of the browserless service + the version of Chrome under-the-hood. For instance 1.2.3-puppeteer-1.10.0
is browserless at 1.2.3
, exposing puppeteer at 1.10.0
.
Similar to how NodeJS itself does docker releases, we'll now provide releases in 3 distinct ways:
- An immutable, pinned version release:
1.0.0-puppeteer-1.11.0
- A mutable minor version release:
1.1-puppeteer-1.12.0
- A mutable major version release:
1-puppeteer-1.9.0
For production deployments, we recommend using pinned version releases as they won't change once released. The mutable minor/major releases will receive on-going updates whenever we do changes that are bug-fixes or feature release. Even with the best intentions it's possible that instability can be introduced with these mutable images, hence why recommend the pinned version releases.
Finally, we'll continue to ship support for the last 5 minor versions of Puppeteer + the Google Chrome (stable). Old images will remain, but newer versions of browserless won't be included.
We'll continue to keep this changelog up-to-date anytime we do docker releases.
/chrome/content
A JSON-based API. Given a "url" or "html" field, runs and returns HTML content after the page has loaded and JavaScript has parsed.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Request Body schema: application/json
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
object | |
setJavaScriptEnabled | boolean Whether or not to allow JavaScript to run on the page. |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
Responses
Request samples
- Payload
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "status": 0,
- "headers": { },
- "contentType": "string",
- "body": {
- "BYTES_PER_ELEMENT": 0,
- "buffer": {
- "byteLength": 0,
- "__@toStringTag@29073": "string"
}, - "byteLength": 0,
- "byteOffset": 0,
- "length": 0,
- "__@toStringTag@29073": "Uint8Array"
}
}
}
], - "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
/chrome/download
A JSON or JavaScript content-type API for returning files Chrome has downloaded during the execution of puppeteer code, which is ran inside context of the browser. Browserless sets up a blank page, a fresh download directory, injects your puppeteer code, and then executes it. You can load external libraries via the "import" syntax, and import ESM-style modules that are written for execution inside of the browser. Once your script is finished, any downloaded files from Chromium are returned back with the appropriate content-type header.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Request Body schema:
code required | string |
object |
Responses
Request samples
- Payload
{- "code": "string",
- "context": { }
}
/chrome/function
A JSON or JavaScript content-type API for running puppeteer code in the browser's context. Browserless sets up a blank page, injects your puppeteer code, and runs it. You can optionally load external libraries via the "import" module that are meant for browser usage. Values returned from the function are checked and an appropriate content-type and response is sent back to your HTTP call.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Request Body schema:
code required | string |
object |
Responses
Request samples
- Payload
{- "code": "string",
- "context": { }
}
/json/list
Returns a JSON payload that acts as a pass-through to the DevTools /json/list HTTP API in Chromium and Chrome. Browserless crafts this payload so that remote clients can connect to the underlying "webSocketDebuggerUrl" properly, excluding any API tokens in that URL. If under authentication be sure to include your authorization.
Responses
Response samples
- 200
[- {
- "description": "string",
- "devtoolsFrontendUrl": "string",
- "id": "string",
- "title": "string",
- "type": "string",
- "url": "string",
- "webSocketDebuggerUrl": "string"
}
]
/json/new
Returns a JSON payload that acts as a pass-through to the DevTools /json/new HTTP API in Chromium. Browserless mocks this payload so that remote clients can connect to the underlying "webSocketDebuggerUrl" which will cause Browserless to start the browser and proxy that request into a blank page.
Responses
Response samples
- 200
{- "description": "string",
- "devtoolsFrontendUrl": "string",
- "id": "string",
- "title": "string",
- "type": "string",
- "url": "string",
- "webSocketDebuggerUrl": "string"
}
/json/version
Returns a JSON payload that acts as a pass-through to the DevTools /json/version protocol in Chrome and Chromium.
Responses
Response samples
- 200
{- "description": "string",
- "devtoolsFrontendUrl": "string",
- "id": "string",
- "title": "string",
- "type": "string",
- "url": "string",
- "webSocketDebuggerUrl": "string"
}
/chrome/pdf
A JSON-based API for getting a PDF binary from either a supplied "url" or "html" payload in your request. Many options exist for injecting cookies, request interceptors, user-agents and waiting for selectors, timers and more.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Request Body schema: application/json
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
object Valid options to configure PDF generation via {@link Page.pdf}. | |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
object | |
setJavaScriptEnabled | boolean |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
Responses
Request samples
- Payload
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "options": {
- "scale": 0,
- "displayHeaderFooter": true,
- "headerTemplate": "string",
- "footerTemplate": "string",
- "printBackground": true,
- "landscape": true,
- "pageRanges": "string",
- "format": "A0",
- "width": "string",
- "height": "string",
- "preferCSSPageSize": true,
- "margin": {
- "top": "string",
- "bottom": "string",
- "left": "string",
- "right": "string"
}, - "path": "string",
- "omitBackground": true,
- "tagged": true,
- "outline": true,
- "timeout": 0,
- "waitForFonts": true
}, - "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "status": 0,
- "headers": { },
- "contentType": "string",
- "body": {
- "BYTES_PER_ELEMENT": 0,
- "buffer": {
- "byteLength": 0,
- "__@toStringTag@29073": "string"
}, - "byteLength": 0,
- "byteOffset": 0,
- "length": 0,
- "__@toStringTag@29073": "Uint8Array"
}
}
}
], - "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
/chrome/performance
Run lighthouse performance audits with a supplied "url" in your JSON payload.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Request Body schema: application/json
budgets | Array of objects |
config | object |
url | string |
Responses
Request samples
- Payload
{- "budgets": [
- { }
], - "config": { },
- "url": "string"
}
Response samples
- 200
{ }
/chrome/scrape
A JSON-based API that returns text, html, and meta-data from a given list of selectors. Debugging information is available by sending in the appropriate flags in the "debugOpts" property. Responds with an array of JSON objects.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Request Body schema: application/json
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
object | |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
object | |
setJavaScriptEnabled | boolean |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
Responses
Request samples
- Payload
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "debugOpts": {
- "console": true,
- "cookies": true,
- "html": true,
- "network": true,
- "screenshot": true
}, - "elements": [
- {
- "selector": "string",
- "timeout": 0
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "status": 0,
- "headers": { },
- "contentType": "string",
- "body": {
- "BYTES_PER_ELEMENT": 0,
- "buffer": {
- "byteLength": 0,
- "__@toStringTag@29073": "string"
}, - "byteLength": 0,
- "byteOffset": 0,
- "length": 0,
- "__@toStringTag@29073": "Uint8Array"
}
}
}
], - "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
Response samples
- 200
{- "data": [
- {
- "results": [
- {
- "attributes": [
- {
- "name": "string",
- "value": "string"
}
], - "height": 0,
- "html": "string",
- "left": 0,
- "text": "string",
- "top": 0,
- "width": 0
}
], - "selector": "string"
}
], - "debug": {
- "console": [
- "string"
], - "cookies": [
- {
- "name": "string",
- "value": "string",
- "domain": "string",
- "path": "string",
- "expires": 0,
- "size": 0,
- "httpOnly": true,
- "secure": true,
- "session": true,
- "sameSite": "Lax",
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}, - "partitionKeyOpaque": true
}
], - "html": null,
- "network": {
- "inbound": [
- {
- "headers": null,
- "status": 0,
- "url": "string"
}
], - "outbound": [
- {
- "headers": null,
- "method": "string",
- "url": "string"
}
]
}, - "screenshot": null
}
}
/chrome/screenshot
A JSON-based API for getting a screenshot binary from either a supplied "url" or "html" payload in your request. Many options exist including cookies, user-agents, setting timers and network mocks.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Request Body schema: application/json
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
object | |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
scrollPage | boolean |
selector | string |
object | |
setJavaScriptEnabled | boolean |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
Responses
Request samples
- Payload
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "options": {
- "optimizeForSpeed": true,
- "type": "jpeg",
- "quality": 0,
- "fromSurface": true,
- "fullPage": true,
- "omitBackground": true,
- "path": "string",
- "clip": {
- "scale": 0,
- "width": 0,
- "height": 0,
- "x": 0,
- "y": 0
}, - "encoding": "base64",
- "captureBeyondViewport": true
}, - "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "status": 0,
- "headers": { },
- "contentType": "string",
- "body": {
- "BYTES_PER_ELEMENT": 0,
- "buffer": {
- "byteLength": 0,
- "__@toStringTag@29073": "string"
}, - "byteLength": 0,
- "byteOffset": 0,
- "length": 0,
- "__@toStringTag@29073": "Uint8Array"
}
}
}
], - "scrollPage": true,
- "selector": "string",
- "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
/content /chromium/content
A JSON-based API. Given a "url" or "html" field, runs and returns HTML content after the page has loaded and JavaScript has parsed.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Request Body schema: application/json
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
object | |
setJavaScriptEnabled | boolean Whether or not to allow JavaScript to run on the page. |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
Responses
Request samples
- Payload
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "status": 0,
- "headers": { },
- "contentType": "string",
- "body": {
- "BYTES_PER_ELEMENT": 0,
- "buffer": {
- "byteLength": 0,
- "__@toStringTag@29073": "string"
}, - "byteLength": 0,
- "byteOffset": 0,
- "length": 0,
- "__@toStringTag@29073": "Uint8Array"
}
}
}
], - "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
/download /chromium/download
A JSON or JavaScript content-type API for returning files Chrome has downloaded during the execution of puppeteer code, which is ran inside context of the browser. Browserless sets up a blank page, a fresh download directory, injects your puppeteer code, and then executes it. You can load external libraries via the "import" syntax, and import ESM-style modules that are written for execution inside of the browser. Once your script is finished, any downloaded files from Chromium are returned back with the appropriate content-type header.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Request Body schema:
code required | string |
object |
Responses
Request samples
- Payload
{- "code": "string",
- "context": { }
}
/function /chromium/function
A JSON or JavaScript content-type API for running puppeteer code in the browser's context. Browserless sets up a blank page, injects your puppeteer code, and runs it. You can optionally load external libraries via the "import" module that are meant for browser usage. Values returned from the function are checked and an appropriate content-type and response is sent back to your HTTP call.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Request Body schema:
code required | string |
object |
Responses
Request samples
- Payload
{- "code": "string",
- "context": { }
}
/pdf /chromium/pdf
A JSON-based API for getting a PDF binary from either a supplied "url" or "html" payload in your request. Many options exist for injecting cookies, request interceptors, user-agents and waiting for selectors, timers and more.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Request Body schema: application/json
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
object Valid options to configure PDF generation via {@link Page.pdf}. | |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
object | |
setJavaScriptEnabled | boolean |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
Responses
Request samples
- Payload
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "options": {
- "scale": 0,
- "displayHeaderFooter": true,
- "headerTemplate": "string",
- "footerTemplate": "string",
- "printBackground": true,
- "landscape": true,
- "pageRanges": "string",
- "format": "A0",
- "width": "string",
- "height": "string",
- "preferCSSPageSize": true,
- "margin": {
- "top": "string",
- "bottom": "string",
- "left": "string",
- "right": "string"
}, - "path": "string",
- "omitBackground": true,
- "tagged": true,
- "outline": true,
- "timeout": 0,
- "waitForFonts": true
}, - "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "status": 0,
- "headers": { },
- "contentType": "string",
- "body": {
- "BYTES_PER_ELEMENT": 0,
- "buffer": {
- "byteLength": 0,
- "__@toStringTag@29073": "string"
}, - "byteLength": 0,
- "byteOffset": 0,
- "length": 0,
- "__@toStringTag@29073": "Uint8Array"
}
}
}
], - "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
/performance /chromium/performance
Run lighthouse performance audits with a supplied "url" in your JSON payload.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Request Body schema: application/json
budgets | Array of objects |
config | object |
url | string |
Responses
Request samples
- Payload
{- "budgets": [
- { }
], - "config": { },
- "url": "string"
}
Response samples
- 200
{ }
/scrape /chromium/scrape
A JSON-based API that returns text, html, and meta-data from a given list of selectors. Debugging information is available by sending in the appropriate flags in the "debugOpts" property. Responds with an array of JSON objects.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Request Body schema: application/json
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
object | |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
object | |
setJavaScriptEnabled | boolean |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
Responses
Request samples
- Payload
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "debugOpts": {
- "console": true,
- "cookies": true,
- "html": true,
- "network": true,
- "screenshot": true
}, - "elements": [
- {
- "selector": "string",
- "timeout": 0
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "status": 0,
- "headers": { },
- "contentType": "string",
- "body": {
- "BYTES_PER_ELEMENT": 0,
- "buffer": {
- "byteLength": 0,
- "__@toStringTag@29073": "string"
}, - "byteLength": 0,
- "byteOffset": 0,
- "length": 0,
- "__@toStringTag@29073": "Uint8Array"
}
}
}
], - "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
Response samples
- 200
{- "data": [
- {
- "results": [
- {
- "attributes": [
- {
- "name": "string",
- "value": "string"
}
], - "height": 0,
- "html": "string",
- "left": 0,
- "text": "string",
- "top": 0,
- "width": 0
}
], - "selector": "string"
}
], - "debug": {
- "console": [
- "string"
], - "cookies": [
- {
- "name": "string",
- "value": "string",
- "domain": "string",
- "path": "string",
- "expires": 0,
- "size": 0,
- "httpOnly": true,
- "secure": true,
- "session": true,
- "sameSite": "Lax",
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}, - "partitionKeyOpaque": true
}
], - "html": null,
- "network": {
- "inbound": [
- {
- "headers": null,
- "status": 0,
- "url": "string"
}
], - "outbound": [
- {
- "headers": null,
- "method": "string",
- "url": "string"
}
]
}, - "screenshot": null
}
}
/screenshot /chromium/screenshot
A JSON-based API for getting a screenshot binary from either a supplied "url" or "html" payload in your request. Many options exist including cookies, user-agents, setting timers and network mocks.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Request Body schema: application/json
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
object | |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
scrollPage | boolean |
selector | string |
object | |
setJavaScriptEnabled | boolean |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
Responses
Request samples
- Payload
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "options": {
- "optimizeForSpeed": true,
- "type": "jpeg",
- "quality": 0,
- "fromSurface": true,
- "fullPage": true,
- "omitBackground": true,
- "path": "string",
- "clip": {
- "scale": 0,
- "width": 0,
- "height": 0,
- "x": 0,
- "y": 0
}, - "encoding": "base64",
- "captureBeyondViewport": true
}, - "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "status": 0,
- "headers": { },
- "contentType": "string",
- "body": {
- "BYTES_PER_ELEMENT": 0,
- "buffer": {
- "byteLength": 0,
- "__@toStringTag@29073": "string"
}, - "byteLength": 0,
- "byteOffset": 0,
- "length": 0,
- "__@toStringTag@29073": "Uint8Array"
}
}
}
], - "scrollPage": true,
- "selector": "string",
- "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
/devtools/browser/*
Connect to an already-running Chromium process with a library like puppeteer, or others, that work over chrome-devtools-protocol. Chromium must already be launched in order to not return a 404.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Responses
/chrome
Launch and connect to Chromium with a library like puppeteer or others that work over chrome-devtools-protocol.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Responses
/devtools/page/*
Connect to an existing page in Chromium with a library like chrome-remote-interface or others that work the page websocketDebugger URL. You can get this unique URL by calling the /json/list API or by finding the page's unique ID from your library of choice.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Responses
/chrome/playwright
Connect to Chromium with any playwright style library.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Responses
/chromium
Launch and connect to Chromium with a library like puppeteer or others that work over chrome-devtools-protocol.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Responses
/playwright/chromium /chromium/playwright
Connect to Chromium with any playwright style library.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Responses
/playwright/firefox /firefox/playwright
Connect to Firefox with any playwright-compliant library.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Responses
/playwright/webkit /webkit/playwright
Connect to Webkit with any playwright-compliant library.
query Parameters
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Responses
Response samples
- 200
{- "allowCORS": true,
- "allowFileProtocol": true,
- "allowGetCalls": true,
- "concurrent": 0,
- "data": "string",
- "debug": "string",
- "errorAlertURL": null,
- "healthFailureURL": null,
- "host": "string",
- "maxCPU": 0,
- "maxMemory": 0,
- "metricsJSONPath": "string",
- "port": 0,
- "queued": 0,
- "queuedAlertURL": null,
- "rejectAlertURL": null,
- "retries": 0,
- "timeout": 0,
- "timeoutAlertURL": null,
- "token": null
}
/kill/+([0-9a-zA-Z-_])
Kill running sessions based on BrowserId or TrackingId.
query Parameters
token required | string The authorization token |
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
browserId | string |
object or object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
trackingId | string Custom session identifier |
Responses
/sessions
Lists all currently running sessions and relevant meta-data excluding potentially open pages.
query Parameters
token required | string The authorization token |
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly. |
object or object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
trackingId | string Custom session identifier |