Output Ports
| Port | Operations | Description |
| success | All 8 operations | Browserless processed the request successfully. Output format varies by operation — see sections below. |
| error | All 8 operations | Invalid API token, page navigation failed, timeout exceeded (when BestAttempt=false), or selector not found. Includes errorCode and message. |
screenshot — Success Output
| Field | Type | Description |
data | string (base64) | Base64-encoded PNG or JPEG image data. Decode and save to a file, or pass to an email/S3 upload node. |
contentType | string | image/png or image/jpeg depending on the Type property. |
{
"data": "iVBORw0KGgoAAAANSUhEUgAAA...(base64 encoded PNG)...",
"contentType": "image/png"
}
pdf — Success Output
| Field | Type | Description |
data | string (base64) | Base64-encoded PDF bytes. Decode and save as a .pdf file, or attach to an email. |
contentType | string | Always application/pdf. |
{
"data": "JVBERi0xLjQKJeLjz9MKNiAwIG9iago...(base64 encoded PDF)...",
"contentType": "application/pdf"
}
content — Success Output
| Field | Type | Description |
data | string | Full rendered HTML of the page after JavaScript execution. This is the document.documentElement.outerHTML value. |
contentType | string | Always text/html. |
scrape — Success Output
Returns a structured object for each selector rule provided in the Elements input property.
| Field | Type | Description |
data | array | Array of extraction result objects — one per selector in Elements. |
data[].selector | string | The CSS selector that was matched. |
data[].results | array | Array of extraction results from matched elements. Each item has type (text/attribute/html/eval) and value (the extracted value). |
data[].results[].attributes | array | All HTML attributes of the matched element as key-value pairs. |
{
"data": [
{
"selector": ".product-title",
"results": [
{ "type": "text", "value": "Widget Pro 3000" },
{ "attributes": [{ "name": "class", "value": "product-title h2" }] }
]
},
{
"selector": ".product-price",
"results": [
{ "type": "text", "value": "$29.99" },
{ "type": "attribute", "attribute": "data-price-cents", "value": "2999" }
]
}
]
}
performance — Success Output
Returns the full Lighthouse audit JSON object. Key fields:
| Field | Type | Description |
categories.performance.score | number (0–1) | Overall performance score. Multiply by 100 for the familiar 0–100 score. |
categories.accessibility.score | number (0–1) | Accessibility score. |
categories.seo.score | number (0–1) | SEO score. |
audits.first-contentful-paint.numericValue | number | First Contentful Paint in milliseconds. |
audits.largest-contentful-paint.numericValue | number | Largest Contentful Paint in milliseconds. |
audits.cumulative-layout-shift.numericValue | number | Cumulative Layout Shift score (lower is better). |
audits.interactive.numericValue | number | Time to Interactive in milliseconds. |
{
"categories": {
"performance": { "score": 0.87 },
"accessibility": { "score": 0.94 },
"seo": { "score": 1.0 }
},
"audits": {
"first-contentful-paint": { "numericValue": 1240, "displayValue": "1.2 s" },
"largest-contentful-paint": { "numericValue": 2350, "displayValue": "2.4 s" },
"cumulative-layout-shift": { "numericValue": 0.02, "displayValue": "0.02" },
"interactive": { "numericValue": 3100, "displayValue": "3.1 s" }
}
}
download — Success Output
Returns data (base64-encoded binary content of the downloaded file) and contentType (the MIME type detected from the HTTP response headers).
unblock — Success Output
Returns data (full rendered HTML string of the unblocked page) and contentType (text/html). Also returns ttl (integer — seconds remaining in cache if TtlSeconds was set).
execute — Success Output
Returns data — the value returned by the JavaScript Code. Can be any JSON-serialisable type: string, number, boolean, array, or object. If the script throws an exception, the error port fires instead.
// If Code was: return document.title;
{ "data": "Acme Corp — Home" }
// If Code was: return { price: document.querySelector('.price').textContent, sku: document.querySelector('[data-sku]').dataset.sku };
{ "data": { "price": "$29.99", "sku": "WP-3000-BLK" } }
Error Port Output
| Field | Type | Description |
status | string | Always "error". |
errorCode | string | Error category: navigation-failed, timeout, selector-not-found, invalid-token, script-error. |
message | string | Human-readable error description. |
{
"status": "error",
"errorCode": "navigation-failed",
"message": "net::ERR_NAME_NOT_RESOLVED at https://nonexistent.example.com"
}