Skip to content

The Browser Interaction API provides endpoints to navigate to URLs, execute JavaScript in the browser context, extract page content (HTML, text, PDF), and capture screenshots. Use these endpoints to automate web interactions, scrape content, run scripts, and generate visual or document exports from a controlled browser instance.

All endpoints require a browser_id query parameter identifying the target browser instance, plus a start parameter that controls automatic instance creation. The start parameter works as follows: in default mode instances are created automatically (set start=false to prevent creation); when auto-start is disabled globally, set start=true to explicitly create a new instance.


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

NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
startquerybooleanNoControls instance creation behavior. Default: true
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

This endpoint takes no request body.

Terminal window
curl -G "https://api.hoody.com/api/browser/interaction/browse" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "browser_id=0" \
--data-urlencode "url=https://example.com" \
--data-urlencode "active=true"

Opens a new tab (or reuses an existing one) and navigates to a URL. Identical behavior to GET /browse, but accepts the parameters as a JSON request body.

NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
startquerybooleanNoControls instance creation behavior. Default: true
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
Terminal window
curl -X POST "https://api.hoody.com/api/browser/interaction/browse?browser_id=0" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"active": true
}'

Executes a JavaScript snippet in the context of the last active tab.

NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
startquerybooleanNoControls instance creation behavior. Default: true
scriptquerystringYesJavaScript code to execute (can be base64 encoded)

This endpoint takes no request body.

Terminal window
curl -G "https://api.hoody.com/api/browser/interaction/eval" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "browser_id=0" \
--data-urlencode "script=document.title"

Executes a JavaScript snippet provided in the request body. Accepts either a JSON body with a script field or a raw text/plain body containing the JavaScript code directly.

NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
startquerybooleanNoControls instance creation behavior. Default: true
FieldTypeRequiredDescription
scriptstringNoJavaScript code to execute (when using application/json)

Alternatively, send raw JavaScript as a text/plain body.

Terminal window
curl -X POST "https://api.hoody.com/api/browser/interaction/eval?browser_id=0" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"script": "document.querySelectorAll(\"a\").length"
}'

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

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

This endpoint takes no request body.

Terminal window
curl -G "https://api.hoody.com/api/browser/interaction/html" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "browser_id=0"

Returns the visible text content of the active page (equivalent to document.body.innerText).

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

This endpoint takes no request body.

Terminal window
curl -G "https://api.hoody.com/api/browser/interaction/text" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "browser_id=0"

Generates a PDF of the current page. Supports format, landscape, margins, and background options.

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
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’)

This endpoint takes no request body.

Terminal window
curl -G "https://api.hoody.com/api/browser/interaction/pdf" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "browser_id=0" \
--data-urlencode "format=A4" \
--data-urlencode "landscape=false" \
--data-urlencode "printBackground=true" \
--data-urlencode "margin=1cm" \
-o page.pdf

Navigates to a URL and/or captures a screenshot of a browser tab.

Navigation + Screenshot workflow:

  • If url is provided: Navigate to URL → Wait for page load → Capture screenshot
  • If url is omitted: Capture screenshot of the current page state

Key features:

  • Smart tab management with onlyIfNotExists to avoid duplicate tabs
  • Multiple output formats: PNG, JPEG, or Base64-encoded
  • Full page capture with fullPage=true
  • Quality control for JPEG compression

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

NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
startquerybooleanNoControls instance creation behavior. Default: true
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. One of png, jpeg, base64. Default: "png"
qualityqueryintegerNoImage quality for JPEG format (0-100)
fullPagequerybooleanNoCapture the entire scrollable page. Default: false

This endpoint takes no request body.

Terminal window
curl -G "https://api.hoody.com/api/browser/interaction/screenshot" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "browser_id=0" \
--data-urlencode "url=https://example.com" \
--data-urlencode "format=png" \
--data-urlencode "fullPage=true" \
-o screenshot.png