API Basics
★  Fundamentals
★  Error Codes
★  Examples
★  Batch Processing
★  Specification
★  SDKs
★  Stats
Data Tools
★  Browser Bot
★  HTML Clean
★  Code Highlight
★  URL Info
Security and Networking

Browser Bot

Browser bot can extract content, interact with keyboard and mouse events, and execute JavaScript on a website.

This API is based on the Chromium web browser so works exactly like the desktop browser. To extract live content from the page DOM use the "selector" option which will find page elements by CSS selector and return the results in the "elements" array. To automate user interactions on a page use the "exec" option, this takes an array of commands which can be either the special interaction functions (see docs below) or just plain old JavaScript code. Browser bot will also return useful HTTP status and response data for the given URL so can be handy for monitoring and analysis tasks too.

End Point

Test API
API Request
urlYesstringThe URL to load
timeoutNointeger30Timeout in seconds. Give up if still trying to load the page after this number of seconds
delayNointeger2Delay in seconds to wait before executing any selectors or JavaScript
selectorNostringExtract content from the page DOM using this selector. Commonly known as a CSS selector, you can find a good reference here
execNoarray[]Execute JavaScript on the page. Each array element should contain a valid JavaScript statement in string form.
If a statement returns any kind of value it will be returned in the 'exec-results' response.
For your convenience you can also use the following special shortcut functions:
sleep(seconds); Just wait/sleep for the specified number of seconds.
click('selector'); Click on the first element matching the given selector.
focus('selector'); Focus on the first element matching the given selector.
keys('characters'); Send the specified keyboard characters. Use click() or focus() first to send keys to a specific element.
enter(); Send the Enter key.
tab(); Send the Tab key.
user-agentNostringOverride the browsers default user-agent string with this one
ignore-certificate-errorsNobooleanfalseIgnore any TLS/SSL certificate errors and load the page anyway
API Response
urlstringThe page URL
contentstringThe complete raw, decompressed and decoded page content. Usually will be either HTML, JSON or XML
mime-typestringThe document MIME type
titlestringThe document title
is-errorbooleanTrue if an error has occurred loading the page. Check the 'error-message' field for details
is-timeoutbooleanTrue if a timeout occurred while loading the page. You can set the timeout with the request parameter 'timeout'
error-messagestringContains the error message if an error has occurred ('is-error' will be true)
http-status-codeintegerThe HTTP status code the URL returned
http-status-messagestringThe HTTP status message the URL returned
is-http-okbooleanTrue if the HTTP status is OK (200)
is-http-redirectbooleanTrue if the URL responded with an HTTP redirect
http-redirect-urlstringThe redirected URL if the URL responded with an HTTP redirect
server-ipstringThe HTTP servers IP address
load-timefloatThe number of seconds taken to load the page (from initial request until DOM ready)
response-headersmapMap containing all the HTTP response headers the URL responded with
is-securebooleanTrue if the page is secured using TLS/SSL
security-detailsmapMap containing details of the TLS/SSL setup
elementsarrayArray containing all the elements matching the supplied selector.
Each element object will contain the text content, HTML content and all current element attributes
exec-resultsarrayIf you executed any JavaScript this array holds the results as objects
Daily Limits
Free TierTier 1Tier 2Tier 3