BrowserlessChromiumHttpApi class
Methods
-
content({bool? blockAds, CDPLaunchOptionsOrString? launch, String? profile, num? timeout, String? token, String? trackingId, Map<String, dynamic>? body})
→ Future<String>
-
HTTP Method: POST
A JSON-based API. Given a "url" or "html" field, runs and returns HTML content after the page has loaded and JavaScript has parsed.
-
download({bool? blockAds, CDPLaunchOptionsOrString? launch, String? profile, num? timeout, String? token, String? trackingId, JSONSchema? body})
→ Future<String>
-
HTTP Method: POST
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.
-
function({bool? blockAds, CDPLaunchOptionsOrString? launch, String? profile, num? timeout, String? token, String? trackingId, JSONSchema? body})
→ Future<String>
-
HTTP Method: POST
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.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
pdf({bool? blockAds, CDPLaunchOptionsOrString? launch, String? profile, num? timeout, String? token, String? trackingId, Map<String, dynamic>? body})
→ Future<Uint8List>
-
HTTP Method: POST
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.
-
performance({bool? blockAds, CDPLaunchOptionsOrString? launch, String? profile, num? timeout, String? token, String? trackingId, Map<String, dynamic>? body})
→ Future<Map<String, dynamic>>
-
HTTP Method: POST
Run lighthouse performance audits with a supplied "url" in your JSON payload.
-
scrape({bool? blockAds, CDPLaunchOptionsOrString? launch, String? profile, num? timeout, String? token, String? trackingId, Map<String, dynamic>? body})
→ Future<Map<String, dynamic>>
-
HTTP Method: POST
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.
-
screenshot({bool? blockAds, CDPLaunchOptionsOrString? launch, String? profile, num? timeout, String? token, String? trackingId, Map<String, dynamic>? body})
→ Future<Uint8List>
-
HTTP Method: POST
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.
-
toString()
→ String
-
A string representation of this object.
inherited