Skip to content
Hoody.com

Browser Interaction endpoints let you drive a managed Chromium instance exposed through the Hoody Browser container service. Use these operations to navigate to URLs, run arbitrary JavaScript against the active tab, extract structured page content, generate PDFs, and capture screenshots. All requests are served by the container’s browser service through the Hoody proxy.

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

NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
startquerybooleanNo (default: true)Controls instance creation behavior. 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
activequerybooleanNo (default: true)Make the tab active (focused) after navigation
onlyIfNotExistsquerybooleanNo (default: false)Only create a new tab if no tab with the same URL exists
ignoreGetParametersquerybooleanNo (default: false)Ignore query parameters when checking for existing URL
Terminal window
curl -X GET "https://proj-abc123-cont-xyz789-browser-1.eu-west-1.containers.hoody.icu/api/v1/browser/browse?browser_id=0&url=https%3A%2F%2Fexample.com"

Opens a new tab (or uses an existing one) and navigates to a URL using the POST method. Identical to the GET variant but accepts the navigation options in a JSON body, which is convenient when the URL or other parameters are long or contain characters that are awkward to encode into a query string.

NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
startquerybooleanNo (default: true)Controls instance creation behavior. 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.
FieldTypeRequiredDefaultDescription
urlstringYesTarget URL to navigate to
tabIdintegerNoThe ID of the tab to interact with
activebooleanNotrueMake the tab active (focused) after navigation
onlyIfNotExistsbooleanNofalseOnly create a new tab if no tab with the same URL exists
ignoreGetParametersbooleanNofalseIgnore query parameters when checking for existing URL
Terminal window
curl -X POST "https://proj-abc123-cont-xyz789-browser-1.eu-west-1.containers.hoody.icu/api/v1/browser/browse?browser_id=0" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/dashboard",
"tabId": 1,
"active": true,
"onlyIfNotExists": true
}'

Executes a JavaScript snippet in the context of the last active tab. The script parameter can be passed as a URL-encoded string or as a base64-encoded payload.

NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
startquerybooleanNo (default: true)Controls instance creation behavior. 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)
Terminal window
curl -X GET "https://proj-abc123-cont-xyz789-browser-1.eu-west-1.containers.hoody.icu/api/v1/browser/eval?browser_id=0&script=document.title"

Executes a JavaScript snippet provided in the request body. Use this variant when the script is large or contains characters that are awkward to place in a URL. The body can be sent as either application/json (with a script field) or as text/plain with the raw JavaScript code as the body.

NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
startquerybooleanNo (default: true)Controls instance creation behavior. 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
scriptstringNoJavaScript code to execute. When sending application/json, pass as the script field. When sending text/plain, place the raw code in the body.
Terminal window
curl -X POST "https://proj-abc123-cont-xyz789-browser-1.eu-west-1.containers.hoody.icu/api/v1/browser/eval?browser_id=0" \
-H "Content-Type: application/json" \
-d '{
"script": "Array.from(document.querySelectorAll(\"a\")).map(a => a.href)"
}'

Returns the full HTML content of the active page, equivalent to document.documentElement.outerHTML. Useful for scraping, diffing, or feeding into downstream text processing.

NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
tabIdqueryintegerNoThe ID of the tab to interact with
startquerybooleanNo (default: true)Controls instance creation behavior. 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.
Terminal window
curl -X GET "https://proj-abc123-cont-xyz789-browser-1.eu-west-1.containers.hoody.icu/api/v1/browser/html?browser_id=0"

Returns the visible text content of the page, equivalent to document.body.innerText. Useful for summarisation, search-indexing, or feeding into an LLM context window.

NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
tabIdqueryintegerNoThe ID of the tab to interact with
startquerybooleanNo (default: true)Controls instance creation behavior. 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.
Terminal window
curl -X GET "https://proj-abc123-cont-xyz789-browser-1.eu-west-1.containers.hoody.icu/api/v1/browser/text?browser_id=0"

Generates a PDF of the current page. Optionally navigate to a URL first, then export. Supports paper format, orientation, margins, and inclusion of background graphics.

NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
tabIdqueryintegerNoThe ID of the tab to interact with
startquerybooleanNo (default: true)Controls instance creation behavior. 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
formatquerystringNo (default: "Letter")Paper format (e.g. A4, Letter)
landscapequerybooleanNo (default: false)Use landscape orientation
printBackgroundquerybooleanNo (default: false)Include background graphics
marginquerystringNoUniform margin (e.g. 1cm, 0.5in)
Terminal window
curl -X GET "https://proj-abc123-cont-xyz789-browser-1.eu-west-1.containers.hoody.icu/api/v1/browser/pdf?browser_id=0&url=https%3A%2F%2Fexample.com%2Finvoice&format=A4&landscape=false&printBackground=true&margin=1cm" \
--output invoice.pdf

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

Navigation + Screenshot workflow

  • If url is provided: navigate to the URL, wait for page load, then capture.
  • If url is omitted: capture a 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 JSON.
  • Full-page capture with fullPage=true.
  • Quality control for JPEG compression.

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

NameInTypeRequiredDescription
browser_idquerystringYesUnique identifier for the browser instance (0-based index)
startquerybooleanNo (default: true)Controls instance creation behavior. 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
onlyIfNotExistsquerybooleanNo (default: false)Only create a new tab if no tab with the same URL exists
ignoreGetParametersquerybooleanNo (default: false)Ignore query strings when checking for existing URL
formatquerystringNo (default: "png")Output format. One of: png, jpeg, base64.
qualityqueryintegerNoImage quality for JPEG format (0-100)
fullPagequerybooleanNo (default: false)Capture the entire scrollable page
Terminal window
# Binary PNG
curl -X GET "https://proj-abc123-cont-xyz789-browser-1.eu-west-1.containers.hoody.icu/api/v1/browser/screenshot?browser_id=0&url=https%3A%2F%2Fexample.com&format=png&fullPage=true" \
--output page.png
# Base64 JSON
curl -X GET "https://proj-abc123-cont-xyz789-browser-1.eu-west-1.containers.hoody.icu/api/v1/browser/screenshot?browser_id=0&format=base64"