Skip to content

The Browser Interaction API lets you navigate web pages, run JavaScript in a browser context, extract page content, export PDFs, and capture screenshots. All endpoints operate against a browser instance identified by browser_id and support multi-tab workflows.

Each endpoint accepts a browser_id query parameter referencing an existing instance. The start parameter controls whether the instance is auto-created: in default mode instances are created on first use; pass start=false to require a pre-existing instance, or start=true when auto-start has been disabled globally.

Opens a new tab (or reuses an existing one) and navigates to a URL.

Terminal window
curl -X GET "https://api.hoody.com/api/v1/browser/browse?browser_id=0&url=https%3A%2F%2Fexample.com&active=true"
NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
startquerybooleanNoControls instance creation behavior. Default: true. In default mode, instances are created automatically. Set to false to prevent creation. When auto-start is disabled globally, set to true to create an instance.
urlquerystringNoThe URL to navigate to
tabIdqueryintegerNoThe ID of the tab to interact with
activequerybooleanNoMake the tab active (focused) after navigation. Default: true
onlyIfNotExistsquerybooleanNoOnly create a new tab if no tab with the same URL exists. Default: false
ignoreGetParametersquerybooleanNoIgnore query parameters when checking for existing URL. Default: false
{
"tabId": 2,
"url": "https://example.com/welcome",
"created": true,
"reused": false
}

Opens a new tab (or reuses an existing one) and navigates to a URL. The URL and tab options are supplied in the JSON request body.

Terminal window
curl -X POST "https://api.hoody.com/api/v1/browser/browse?browser_id=0" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/dashboard",
"active": true,
"onlyIfNotExists": true
}'
NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
startquerybooleanNoControls instance creation behavior. Default: true. In default mode, instances are created automatically. Set to false to prevent creation. When auto-start is disabled globally, set to true to create an instance.
FieldTypeRequiredDescription
urlstringYesThe URL to navigate to
tabIdintegerNoThe ID of the tab to interact with
activebooleanNoMake the tab active (focused) after navigation. Default: true
onlyIfNotExistsbooleanNoOnly create a new tab if no tab with the same URL exists. Default: false
ignoreGetParametersbooleanNoIgnore query parameters when checking for existing URL. Default: false
{
"url": "https://example.com/dashboard",
"tabId": 1,
"active": true,
"onlyIfNotExists": true,
"ignoreGetParameters": false
}
{
"tabId": 1,
"url": "https://example.com/dashboard",
"created": false,
"reused": true
}

Executes a JavaScript snippet in the context of the last active tab. The script is passed as a query parameter and may be base64-encoded.

Terminal window
curl -X GET "https://api.hoody.com/api/v1/browser/eval?browser_id=0&script=ZG9jdW1lbnQudGl0bGU="
NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
startquerybooleanNoControls instance creation behavior. Default: true. In default mode, instances are created automatically. Set to false to prevent creation. When auto-start is disabled globally, set to true to create an instance.
scriptquerystringYesJavaScript code to execute (can be base64 encoded)
{
"result": "Example Domain"
}

Executes a JavaScript snippet provided in the request body. Send either an application/json body with a script field or a raw text/plain JavaScript body.

Terminal window
curl -X POST "https://api.hoody.com/api/v1/browser/eval?browser_id=0" \
-H "Content-Type: application/json" \
-d '{
"script": "document.querySelectorAll(\"a\").length"
}'
NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
startquerybooleanNoControls instance creation behavior. Default: true. In default mode, instances are created automatically. Set to false to prevent creation. When auto-start is disabled globally, set to true to create an instance.

The request body is required. Send application/json with a script field, or text/plain with raw JavaScript code.

FieldTypeRequiredDescription
scriptstringNoJavaScript code to execute
{
"script": "document.querySelectorAll('a').length"
}
{
"result": 42
}

Returns the full HTML content of the active page, equivalent to document.documentElement.outerHTML.

Terminal window
curl -X GET "https://api.hoody.com/api/v1/browser/html?browser_id=0"
NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
tabIdqueryintegerNoThe ID of the tab to interact with
startquerybooleanNoControls instance creation behavior. Default: true. In default mode, instances are created automatically. Set to false to prevent creation. When auto-start is disabled globally, set to true to create an instance.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Example Domain</title>
</head>
<body>
<div>
<h1>Example Domain</h1>
</div>
</body>
</html>

The response is served as text/html with the raw HTML string as the body.

Returns the visible text content of the page, equivalent to document.body.innerText.

Terminal window
curl -X GET "https://api.hoody.com/api/v1/browser/text?browser_id=0&tabId=2"
NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
tabIdqueryintegerNoThe ID of the tab to interact with
startquerybooleanNoControls instance creation behavior. Default: true. In default mode, instances are created automatically. Set to false to prevent creation. When auto-start is disabled globally, set to true to create an instance.
Example Domain
This domain is for use in illustrative examples in documents...

The response is served as text/plain with the extracted text string as the body.

Generates a PDF of the current page. Supports paper format, orientation, background inclusion, and margins. Pass url to navigate to a different page before generating the PDF.

Terminal window
curl -X GET "https://api.hoody.com/api/v1/browser/pdf?browser_id=0&format=A4&landscape=true&printBackground=true&margin=1cm" \
--output page.pdf
NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
tabIdqueryintegerNoThe ID of the tab to interact with
startquerybooleanNoControls instance creation behavior. Default: true. In default mode, instances are created automatically. Set to false to prevent creation. When auto-start is disabled globally, set to true to create an instance.
urlquerystringNoOptional URL to navigate to before generating the PDF
formatquerystringNoPaper format (e.g. A4, Letter). Default: "Letter"
landscapequerybooleanNoUse landscape orientation. Default: false
printBackgroundquerybooleanNoInclude background graphics. Default: false
marginquerystringNoUniform margin (e.g. 1cm, 0.5in)

The response is served as application/pdf with the raw PDF binary as the body. Save the response directly to a .pdf file.

Navigates to a URL (when provided) and captures a screenshot of a browser tab. If url is omitted, the current page state is captured.

  • Smart tab management: pass onlyIfNotExists=true to avoid creating duplicate tabs.
  • Output formats: choose png, jpeg, or base64.
  • Full page capture: pass fullPage=true to capture the entire scrollable page.
  • JPEG quality: control compression with the quality parameter (0–100).

Common use cases include visual regression testing, website monitoring, and content verification.

Terminal window
curl -X GET "https://api.hoody.com/api/v1/browser/screenshot?browser_id=0&url=https%3A%2F%2Fexample.com&format=png&fullPage=true" \
--output page.png
NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
startquerybooleanNoControls instance creation behavior. Default: true. In default mode, instances are created automatically. Set to false to prevent creation. When auto-start is disabled globally, set to true to create an instance.
urlquerystringNoThe URL to navigate to
tabIdqueryintegerNoThe ID of the tab to interact with
onlyIfNotExistsquerybooleanNoOnly create a new tab if no tab with the same URL exists. Default: false
ignoreGetParametersquerybooleanNoIgnore query strings when checking for existing URL. Default: false
formatquerystringNoOutput format. Allowed values: png, jpeg, base64. Default: "png"
qualityqueryintegerNoImage quality for JPEG format (0–100)
fullPagequerybooleanNoCapture the entire scrollable page. Default: false

The response is the raw image bytes. Save the response body directly to a file (e.g. page.png or page.jpg).

For format=base64, the response is JSON:

{
"data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg=="
}